Commit 156fdca4 authored by Cédric de Saint Martin's avatar Cédric de Saint Martin

Merge branch 'kvm'. Lot of conflicts.

Some branch must have badly used squash commit. Maybe me.
I hate me.

Conflicts:
	CHANGES.txt
	component/apache-php/buildout.cfg
	component/gcc/buildout.cfg
	component/java/buildout.cfg
	component/slapos/buildout.cfg
	component/stunnel/buildout.cfg
	setup.py
	slapos/recipe/kvm/__init__.py
	slapos/recipe/lamp/__init__.py
	slapos/recipe/lamp/template/apache.in
	slapos/recipe/lamp/template/php.ini.in
	slapos/recipe/librecipe/__init__.py
	slapos/recipe/mysql/__init__.py
	software/davstorage/instance.cfg
	software/davstorage/software.cfg
	software/erp5/software.cfg
	software/kvm/software.cfg
	software/lamp-template/instance.cfg
	software/lamp-template/software.cfg
	software/mariadb/instance.cfg
	software/mariadb/software.cfg
	software/phpmyadmin/software.cfg
	software/slaprunner/software.cfg
	software/wordpress/instance.cfg
	software/wordpress/software.cfg
parents da56db86 ad01afca
...@@ -59,7 +59,8 @@ class Recipe(BaseSlapRecipe): ...@@ -59,7 +59,8 @@ class Recipe(BaseSlapRecipe):
# Install the socket_connection_attempt script # Install the socket_connection_attempt script
catcher = zc.buildout.easy_install.scripts( catcher = zc.buildout.easy_install.scripts(
[('check_port_listening', __name__ + 'socket_connection_attempt', 'connection_attempt')], [('check_port_listening', 'slapos.recipe.kvm.socket_connection_attempt',
'connection_attempt')],
self.ws, self.ws,
sys.executable, sys.executable,
self.bin_directory, self.bin_directory,
...@@ -84,11 +85,11 @@ class Recipe(BaseSlapRecipe): ...@@ -84,11 +85,11 @@ class Recipe(BaseSlapRecipe):
self.linkBinary() self.linkBinary()
self.computer_partition.setConnectionDict(dict( self.computer_partition.setConnectionDict(dict(
url = "https://[%s]:%s/vnc.html?host=[%s]&port=%s&encrypt=1" % (noVNC_conf['source_ip'], url = "https://[%s]:%s/vnc_auto.html?host=[%s]&port=%s&encrypt=1" % (
noVNC_conf['source_port'], noVNC_conf['source_ip'],
noVNC_conf['source_ip'], noVNC_conf['source_port'],
noVNC_conf['source_port'] noVNC_conf['source_ip'],
), noVNC_conf['source_port']),
password = kvm_conf['vnc_passwd'])) password = kvm_conf['vnc_passwd']))
return self.path_list return self.path_list
...@@ -155,7 +156,8 @@ class Recipe(BaseSlapRecipe): ...@@ -155,7 +156,8 @@ class Recipe(BaseSlapRecipe):
# Instanciate KVM # Instanciate KVM
kvm_template_location = pkg_resources.resource_filename( kvm_template_location = pkg_resources.resource_filename(
__name__, 'template/kvm_run.in') __name__, os.path.join(
'template', 'kvm_run.in'))
kvm_runner_path = self.createRunningWrapper("kvm", kvm_runner_path = self.createRunningWrapper("kvm",
self.substituteTemplate(kvm_template_location, self.substituteTemplate(kvm_template_location,
...@@ -165,7 +167,9 @@ class Recipe(BaseSlapRecipe): ...@@ -165,7 +167,9 @@ class Recipe(BaseSlapRecipe):
# Instanciate KVM controller # Instanciate KVM controller
kvm_controller_template_location = pkg_resources.resource_filename( kvm_controller_template_location = pkg_resources.resource_filename(
__name__, 'template/kvm_controller_run.in') __name__, os.path.join(
'template',
'kvm_controller_run.in' ))
kvm_controller_runner_path = self.createRunningWrapper("kvm_controller", kvm_controller_runner_path = self.createRunningWrapper("kvm_controller",
self.substituteTemplate(kvm_controller_template_location, self.substituteTemplate(kvm_controller_template_location,
...@@ -205,34 +209,24 @@ class Recipe(BaseSlapRecipe): ...@@ -205,34 +209,24 @@ 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. execute_arguments = [[
# XXX-Cedric : this looks like a hack. Do we have better solution, knowing self.options['websockify'].strip(),
# That websockify is not an egg? '--web',
numpy = zc.buildout.easy_install.install(['numpy'], self.options['eggs-directory']) self.options['noVNC_location'],
environment = dict(PYTHONPATH='%s' % numpy.entries[0]) '--key=%s' % (self.key_path),
'--cert=%s' % (self.certificate_path),
# Instanciate Websockify '--ssl-only',
websockify_runner_path = zc.buildout.easy_install.scripts([('websockify', '%s:%s' % (source_ip, source_port),
'slapos.recipe.librecipe.execute', 'executee_wait')], self.ws, '%s:%s' % (target_ip, target_port)],
sys.executable, self.wrapper_directory, arguments=[ [self.certificate_path, self.key_path]]
[sys.executable.strip(),
self.options['websockify_path'], self.path_list.extend(zc.buildout.easy_install.scripts([('websockify',
'--web', 'slapos.recipe.librecipe.execute', 'execute_wait')], self.ws, sys.executable,
self.options['noVNC_location'], self.wrapper_directory, arguments=execute_arguments))
'--key=%s' % (self.key_path),
'--cert=%s' % (self.certificate_path),
'--ssl-only',
'%s:%s' % (source_ip, source_port),
'%s:%s' % (target_ip, target_port)],
[self.certificate_path, self.key_path],
environment]
)[0]
self.path_list.append(websockify_runner_path)
# Add noVNC promise # Add noVNC promise
self.port_listening_promise_conf.update(hostname=noVNC_conf['source_ip'], self.port_listening_promise_conf.update(hostname=noVNC_conf['source_ip'],
......
...@@ -11,7 +11,7 @@ qemu_path = ${kvm:location}/bin/qemu-system-x86_64 ...@@ -11,7 +11,7 @@ qemu_path = ${kvm:location}/bin/qemu-system-x86_64
qemu_img_path = ${kvm:location}/bin/qemu-img qemu_img_path = ${kvm:location}/bin/qemu-img
#slapmonitor_path = ${buildout:bin-directory}/slapmonitor #slapmonitor_path = ${buildout:bin-directory}/slapmonitor
#slapreport_path = ${buildout:bin-directory}/slapreport #slapreport_path = ${buildout:bin-directory}/slapreport
websockify_path = ${noVNC:location}/utils/wsproxy.py websockify = ${buildout:directory}/bin/websockify
noVNC_location = ${noVNC:location} noVNC_location = ${noVNC:location}
openssl_binary = ${openssl:location}/bin/openssl openssl_binary = ${openssl:location}/bin/openssl
rdiff_backup_binary = ${buildout:bin-directory}/rdiff-backup rdiff_backup_binary = ${buildout:bin-directory}/rdiff-backup
......
...@@ -2,76 +2,56 @@ ...@@ -2,76 +2,56 @@
extends = extends =
../../stack/kvm.cfg ../../stack/kvm.cfg
develop =
${:parts-directory}/websockify
parts =
template
kvm
eggs
check-local-eggs
#XXX-Cedric : Currently, one can only access to KVM using noVNC.
# Ideally one should be able to access KVM by using either NoVNC or VNC.
# Problem is : no native crypto support in web browsers. So we have to disable ssl
# In qemu builtin vnc server, and make it available only for localhost
# so that only novnc can listen to it.
#XXX-Cedric: Check status of https://github.com/kanaka/noVNC/issues/13 to see
# When qemu has builtin support for websockets in vnc server to get rid of
# 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.
[eggs]
dummy =
${websockify:location}
eggs +=
websockify
[websockify]
recipe = plone.recipe.command
stop-on-error = true
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = ${git:location}/bin/git clone --quiet https://github.com/desaintmartin/websockify.git ${:location}
update-command = cd ${:location} && ${git:location}/bin/git pull --quiet
[check-local-eggs]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/websockify.egg-link
depends = ${eggs:dummy}
[template] [template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg url = ${:_profile_base_location_}/instance.cfg
md5sum = d899f2111aab18ad25776f35ed49a91b md5sum = 298b146e4efce41bfd58b3f85d064ff1
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644 mode = 0644
[kvmsource]
command =
(${git:location}/bin/git clone --quiet http://git.erp5.org/repos/slapos.kvm.git ${:location} && cd ${:location} && ${git:location}/bin/git reset --hard 94ee45cc02e69798cac8209d2296fd1751125018) || (rm -fr ${:location} ; exit 1)
update-command =
[versions] [versions]
Jinja2 = 2.6 zc.buildout = 1.5.3-dev-SlapOS-010
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.recipe.template = 1.1
# Required by:
# slapos.core==0.14
Flask = 0.7.2
# Required by:
# slapos.cookbook==0.20
PyXML = 0.8.4
# Required by:
# slapos.recipe.template==1.1
collective.recipe.template = 1.9
# Required by:
# hexagonit.recipe.cmmi==1.5.0
hexagonit.recipe.download = 1.5.0
# Required by:
# slapos.cookbook==0.20
netaddr = 0.7.5
# Required by:
# slapos.core==0.14
netifaces = 0.5
# Required by:
# 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.20
slapos.core = 0.14
# Required by:
# slapos.core==0.14
supervisor = 3.0a10
# Required by:
# slapos.cookbook==0.20
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.20
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.14
zope.interface = 3.7.0
...@@ -14,20 +14,8 @@ extends = ...@@ -14,20 +14,8 @@ extends =
../component/dcron/buildout.cfg ../component/dcron/buildout.cfg
../component/libpng/buildout.cfg ../component/libpng/buildout.cfg
#XXX-Cedric : Currently, one can only access to KVM using noVNC.
# Ideally one should be able to access KVM by using either NoVNC or VNC.
# Problem is : no native crypto support in web browsers. So we have to disable ssl
# In qemu builtin vnc server, and make it available only for localhost
# so that only novnc can listen to it.
#XXX-Cedric: Check status of https://github.com/kanaka/noVNC/issues/13 to see
# When qemu has builtin support for websockets in vnc server to get rid of
# Websockify (socket <-> websocket proxy server) when it is ready.
# May solve previous XXX depending on the implementation.
parts = parts =
template template
gnutls
kvm kvm
eggs eggs
...@@ -36,6 +24,20 @@ find-links += ...@@ -36,6 +24,20 @@ find-links +=
versions = versions versions = versions
# Use only quite well working sites.
allow-hosts =
*.nexedi.org
*.python.org
*.sourceforge.net
alastairs-place.net
dist.repoze.org
effbot.org
github.com
peak.telecommunity.com
psutil.googlecode.com
www.dabeaz.com
www.owlfish.com
[gpg-error] [gpg-error]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.10.tar.gz url = ftp://ftp.gnupg.org/gcrypt/libgpg-error/libgpg-error-1.10.tar.gz
...@@ -52,6 +54,7 @@ environment = ...@@ -52,6 +54,7 @@ environment =
LDFLAGS=-Wl,-rpath -Wl,${gpg-error:location}/lib -Wl,${gpg-error:location}/lib/libgpg-error.so.0 LDFLAGS=-Wl,-rpath -Wl,${gpg-error:location}/lib -Wl,${gpg-error:location}/lib/libgpg-error.so.0
[gnutls] [gnutls]
# XXX-Cedric : update to latest gnutls
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
url = ftp://ftp.gnupg.org/gcrypt/gnutls/gnutls-2.8.6.tar.bz2 url = ftp://ftp.gnupg.org/gcrypt/gnutls/gnutls-2.8.6.tar.bz2
md5sum = eb0a6d7d3cb9ac684d971c14f9f6d3ba md5sum = eb0a6d7d3cb9ac684d971c14f9f6d3ba
...@@ -64,7 +67,8 @@ environment = ...@@ -64,7 +67,8 @@ environment =
[kvm] [kvm]
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
path = ${kvmsource:location}/ url = http://downloads.sourceforge.net/project/kvm/qemu-kvm/0.15.1/qemu-kvm-0.15.1.tar.gz
md5sum = 8800a7d6b3aa4a168ea7f78dc66c0320
configure-options = configure-options =
--disable-sdl --disable-sdl
--disable-xen --disable-xen
...@@ -77,20 +81,11 @@ configure-options = ...@@ -77,20 +81,11 @@ configure-options =
--enable-vnc-png --enable-vnc-png
--disable-vnc-jpeg --disable-vnc-jpeg
--extra-cflags="-I${gnutls:location}/include -I${libuuid:location}/include -I${zlib:location}/include -I${libpng:location}/include" --extra-cflags="-I${gnutls:location}/include -I${libuuid:location}/include -I${zlib:location}/include -I${libpng:location}/include"
--extra-ldflags="-Wl,-rpath -Wl,${gnutls:location}/lib -L${gnutls:location}/lib -Wl,-rpath -Wl,${libpng:location}/lib -L${libpng:location}/lib -L${libuuid:location}/lib -Wl,-rpath -Wl,${libuuid:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -lpng -lz -lgnutls" --extra-ldflags="-Wl,-rpath -Wl,${glib:location}/lib -L${glib:location}/lib -Wl,-rpath -Wl,${gnutls:location}/lib -L${gnutls:location}/lib -L${gettext:location}/lib -Wl,-rpath -Wl,${gettext:location}/lib -Wl,-rpath -Wl,${libpng:location}/lib -L${libpng:location}/lib -L${libuuid:location}/lib -Wl,-rpath -Wl,${libuuid:location}/lib -L${zlib:location}/lib -Wl,-rpath -Wl,${zlib:location}/lib -lpng -lz -lgnutls"
--disable-werror --disable-werror
environment = environment =
PKG_CONFIG_PATH=${gnutls:location}/lib/pkgconfig PATH=${pkgconfig:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${gnutls:location}/lib/pkgconfig:${glib:location}/lib/pkgconfig
[kvmsource]
recipe=plone.recipe.command
location = ${buildout:parts-directory}/${:_buildout_section_name_}
stop-on-error = true
#tag = slapos-v0.1
command =
(${git:location}/bin/git clone --quiet http://git.erp5.org/repos/slapos.kvm.git ${:location} ) || (rm -fr ${:location} ; exit 1)
update-command =
cd ${:location} && ${git:location}/bin/git pull --quiet origin master
[eggs] [eggs]
python = python2.7 python = python2.7
...@@ -98,7 +93,3 @@ recipe = z3c.recipe.scripts ...@@ -98,7 +93,3 @@ recipe = z3c.recipe.scripts
eggs = eggs =
${lxml-python:egg} ${lxml-python:egg}
slapos.cookbook slapos.cookbook
numpy
[versions]
zc.buildout = 1.5.3-dev-SlapOS-009
...@@ -37,6 +37,8 @@ version = 3 ...@@ -37,6 +37,8 @@ version = 3
eggs = slapos.libnetworkcache eggs = slapos.libnetworkcache
[nbdserver] [nbdserver]
# XXX-Cedric : use official tarball from kvm website
# (new kvm code does not seem to need special patch)
recipe = hexagonit.recipe.cmmi recipe = hexagonit.recipe.cmmi
path = ${nbdserversource:location}/ path = ${nbdserversource:location}/
configure-options = configure-options =
......
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