Add numpy in NoVNC path. Solves bug 20110819-11F4F70

parent 977179b9
......@@ -61,8 +61,7 @@ class Recipe(BaseSlapRecipe):
noVNC_conf = self.installNoVnc(source_ip = self.getGlobalIPv6Address(),
source_port = 6080,
target_ip = kvm_conf['vnc_ip'],
target_port = vnc_port,
python_path = kvm_conf['python_path'])
target_port = vnc_port)
self.linkBinary()
self.computer_partition.setConnectionDict(dict(
......@@ -167,8 +166,7 @@ class Recipe(BaseSlapRecipe):
return kvm_conf
def installNoVnc(self, source_ip, source_port, target_ip, target_port,
python_path):
def installNoVnc(self, source_ip, source_port, target_ip, target_port):
"""
Create noVNC configuration dictionnary and instanciate Websockify proxy
......@@ -184,11 +182,17 @@ class Recipe(BaseSlapRecipe):
noVNC_conf['source_ip'] = source_ip
noVNC_conf['source_port'] = source_port
# Install numpy.
# XXX-Cedric : this looks like a hack. Do we have better solution, knowing
# That websockify is not an egg?
numpy = zc.buildout.easy_install.install(['numpy'], self.options['eggs-directory'])
environment = dict(PYTHONPATH='%s' % numpy.entries[0])
# Instanciate Websockify
websockify_runner_path = zc.buildout.easy_install.scripts([('websockify',
'slapos.recipe.librecipe.execute', 'execute_wait')], self.ws,
'slapos.recipe.librecipe.execute', 'executee_wait')], self.ws,
sys.executable, self.wrapper_directory, arguments=[
[python_path.strip(),
[sys.executable.strip(),
self.options['websockify_path'],
'--web',
self.options['noVNC_location'],
......@@ -197,7 +201,8 @@ class Recipe(BaseSlapRecipe):
'--ssl-only',
'%s:%s' % (source_ip, source_port),
'%s:%s' % (target_ip, target_port)],
[self.certificate_path, self.key_path]]
[self.certificate_path, self.key_path],
environment]
)[0]
self.path_list.append(websockify_runner_path)
......
......@@ -25,10 +25,6 @@ extends =
# Websockify (socket <-> websocket proxy server) when it is ready.
# May solve previous XXX depending on the implementation.
#XXX-Cedric: Check status of
# https://www.tiolive.com/nexedi/bug_module/20110819-11F4F70 for
# Chrome >= 14 and Firefox >=7 can access to noVNC.
parts =
template
gnutls
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment