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

parent 977179b9
...@@ -61,8 +61,7 @@ class Recipe(BaseSlapRecipe): ...@@ -61,8 +61,7 @@ class Recipe(BaseSlapRecipe):
noVNC_conf = self.installNoVnc(source_ip = self.getGlobalIPv6Address(), noVNC_conf = self.installNoVnc(source_ip = self.getGlobalIPv6Address(),
source_port = 6080, source_port = 6080,
target_ip = kvm_conf['vnc_ip'], target_ip = kvm_conf['vnc_ip'],
target_port = vnc_port, target_port = vnc_port)
python_path = kvm_conf['python_path'])
self.linkBinary() self.linkBinary()
self.computer_partition.setConnectionDict(dict( self.computer_partition.setConnectionDict(dict(
...@@ -167,8 +166,7 @@ class Recipe(BaseSlapRecipe): ...@@ -167,8 +166,7 @@ class Recipe(BaseSlapRecipe):
return kvm_conf return kvm_conf
def installNoVnc(self, source_ip, source_port, target_ip, target_port, def installNoVnc(self, source_ip, source_port, target_ip, target_port):
python_path):
""" """
Create noVNC configuration dictionnary and instanciate Websockify proxy Create noVNC configuration dictionnary and instanciate Websockify proxy
...@@ -181,14 +179,20 @@ class Recipe(BaseSlapRecipe): ...@@ -181,14 +179,20 @@ class Recipe(BaseSlapRecipe):
noVNC_conf = {} noVNC_conf = {}
noVNC_conf['source_ip'] = source_ip noVNC_conf['source_ip'] = source_ip
noVNC_conf['source_port'] = source_port 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 # Instanciate Websockify
websockify_runner_path = zc.buildout.easy_install.scripts([('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=[ sys.executable, self.wrapper_directory, arguments=[
[python_path.strip(), [sys.executable.strip(),
self.options['websockify_path'], self.options['websockify_path'],
'--web', '--web',
self.options['noVNC_location'], self.options['noVNC_location'],
...@@ -197,7 +201,8 @@ class Recipe(BaseSlapRecipe): ...@@ -197,7 +201,8 @@ class Recipe(BaseSlapRecipe):
'--ssl-only', '--ssl-only',
'%s:%s' % (source_ip, source_port), '%s:%s' % (source_ip, source_port),
'%s:%s' % (target_ip, target_port)], '%s:%s' % (target_ip, target_port)],
[self.certificate_path, self.key_path]] [self.certificate_path, self.key_path],
environment]
)[0] )[0]
self.path_list.append(websockify_runner_path) self.path_list.append(websockify_runner_path)
......
...@@ -25,10 +25,6 @@ extends = ...@@ -25,10 +25,6 @@ extends =
# Websockify (socket <-> websocket proxy server) when it is ready. # Websockify (socket <-> websocket proxy server) when it is ready.
# May solve previous XXX depending on the implementation. # 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 = parts =
template template
gnutls 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