Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
slapos
Commits
5612f133
Commit
5612f133
authored
Sep 07, 2011
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'kvm'
Conflicts: software/kvm/software.cfg stack/kvm.cfg
parents
92222210
b086cbd5
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
39 deletions
+51
-39
slapos/recipe/kvm/__init__.py
slapos/recipe/kvm/__init__.py
+13
-8
slapos/recipe/librecipe/execute.py
slapos/recipe/librecipe/execute.py
+19
-0
software/kvm/software.cfg
software/kvm/software.cfg
+18
-26
stack/kvm.cfg
stack/kvm.cfg
+1
-5
No files found.
slapos/recipe/kvm/__init__.py
View file @
5612f133
...
...
@@ -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
...
...
@@ -181,14 +179,20 @@ class Recipe(BaseSlapRecipe):
noVNC_conf
=
{}
noVNC_conf
[
'source_ip'
]
=
source_ip
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'
,
'execute
e
_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
)
...
...
slapos/recipe/librecipe/execute.py
View file @
5612f133
...
...
@@ -39,6 +39,25 @@ def executee(args):
env
[
k
]
=
v
os
.
execve
(
exec_list
[
0
],
exec_list
+
sys
.
argv
[
1
:],
env
)
def
executee_wait
(
args
):
"""Portable execution with process replacement and environment manipulation"""
exec_list
=
list
(
args
[
0
])
file_list
=
list
(
args
[
1
])
environment
=
args
[
2
]
env
=
os
.
environ
.
copy
()
for
k
,
v
in
environment
.
iteritems
():
env
[
k
]
=
v
sleep
=
60
while
True
:
ready
=
True
for
f
in
file_list
:
if
not
os
.
path
.
exists
(
f
):
print
'File %r does not exists, sleeping for %s'
%
(
f
,
sleep
)
ready
=
False
if
ready
:
break
time
.
sleep
(
sleep
)
os
.
execve
(
exec_list
[
0
],
exec_list
+
sys
.
argv
[
1
:],
env
)
def
sig_handler
(
signal
,
frame
):
print
'Received signal %r, killing children and exiting'
%
signal
...
...
software/kvm/software.cfg
View file @
5612f133
...
...
@@ -15,71 +15,63 @@ command =
update-command =
[versions]
Jinja2 = 2.5.5
Werkzeug = 0.6.2
Jinja2 = 2.6
Werkzeug = 0.7.1
buildout-versions = 1.6
hexagonit.recipe.cmmi = 1.5.0
lxml = 2.3
meld3 = 0.6.7
numpy = 1.6.1
plone.recipe.command = 1.1
slapos.cookbook = 0.15
slapos.recipe.template = 1.1
z3c.recipe.scripts = 1.0.1
# Required by:
# slapos.core==0.
9
# slapos.core==0.
14
Flask = 0.7.2
# Required by:
# slapos.cookbook==0.
15
# slapos.cookbook==0.
20
PyXML = 0.8.4
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.
8
collective.recipe.template = 1.
9
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.
15
# slapos.cookbook==0.
20
netaddr = 0.7.5
# Required by:
# slapos.core==0.
9
# slapos.core==0.
14
netifaces = 0.5
# Required by:
# slapos.cookbook==0.
15
# slapos.core==0.
9
# slapos.cookbook==0.
20
# slapos.core==0.
14
# zc.buildout==1.5.3-dev-SlapOS-005
# zc.recipe.egg==1.3.2
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.
15
slapos.core = 0.
9
# slapos.cookbook==0.
20
slapos.core = 0.
14
# Required by:
# slapos.core==0.
9
# slapos.core==0.
14
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.
15
# slapos.cookbook==0.
20
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.
15
# slapos.cookbook==0.
20
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.9
zope.interface = 3.6.4
# Required by:
# novnc==0.1
numpy = 1.6.1
# XXX-CEDRIC Quick and dirty workaround to avoid m2crypto problems.
# should not be used elsewhere unless for urgent cases.
slapos.libnetworkcache = 0.2
# slapos.core==0.14
zope.interface = 3.7.0
stack/kvm.cfg
View file @
5612f133
...
...
@@ -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
...
...
@@ -105,4 +101,4 @@ eggs =
numpy
[versions]
zc.buildout = 1.5.3-dev-SlapOS-00
5
zc.buildout = 1.5.3-dev-SlapOS-00
9
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment