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
Leo Le Bouter
slapos
Commits
3cde8905
Commit
3cde8905
authored
Oct 17, 2012
by
Marco Mariani
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into lapp
parents
eaffed7d
41145f32
Changes
24
Hide whitespace changes
Inline
Side-by-side
Showing
24 changed files
with
155 additions
and
974 deletions
+155
-974
component/git/buildout.cfg
component/git/buildout.cfg
+2
-2
component/noVNC/buildout.cfg
component/noVNC/buildout.cfg
+2
-2
component/python-setuptools/buildout.cfg
component/python-setuptools/buildout.cfg
+1
-1
component/rpm2cpio/buildout.cfg
component/rpm2cpio/buildout.cfg
+1
-1
component/slapos/buildout.cfg
component/slapos/buildout.cfg
+20
-9
component/stunnel/buildout.cfg
component/stunnel/buildout.cfg
+2
-2
setup.py
setup.py
+0
-2
slapos/recipe/README.testnode.txt
slapos/recipe/README.testnode.txt
+0
-4
slapos/recipe/librecipe/__init__.py
slapos/recipe/librecipe/__init__.py
+16
-7
slapos/recipe/notifier.py
slapos/recipe/notifier.py
+5
-2
slapos/recipe/template.py
slapos/recipe/template.py
+0
-46
slapos/recipe/testnode/__init__.py
slapos/recipe/testnode/__init__.py
+0
-199
slapos/recipe/testnode/erp5testreporthandler.py
slapos/recipe/testnode/erp5testreporthandler.py
+0
-138
slapos/recipe/testnode/profile_testnode.py
slapos/recipe/testnode/profile_testnode.py
+0
-184
slapos/recipe/testnode/template/slapos.cfg.in
slapos/recipe/testnode/template/slapos.cfg.in
+0
-10
slapos/recipe/testnode/testnode.py
slapos/recipe/testnode/testnode.py
+0
-153
software/kvm/instance-kvm.cfg
software/kvm/instance-kvm.cfg
+32
-32
software/kvm/software.cfg
software/kvm/software.cfg
+47
-61
software/slapos-testing/instance.cfg
software/slapos-testing/instance.cfg
+14
-0
software/slapos-testing/software.cfg
software/slapos-testing/software.cfg
+4
-10
software/slaprunner/software.cfg
software/slaprunner/software.cfg
+8
-8
software/testnode/instance.cfg
software/testnode/instance.cfg
+0
-18
software/testnode/software.cfg
software/testnode/software.cfg
+0
-82
stack/lamp/buildout.cfg
stack/lamp/buildout.cfg
+1
-1
No files found.
component/git/buildout.cfg
View file @
3cde8905
...
...
@@ -12,8 +12,8 @@ parts =
[git]
recipe = hexagonit.recipe.cmmi
url = http://git-core.googlecode.com/files/git-1.7.1
0.4
.tar.gz
md5sum =
68319d593d051ef76c26e945bbd2d7a
c
url = http://git-core.googlecode.com/files/git-1.7.1
2
.tar.gz
md5sum =
ceb1a6b17a3e33bbc70eadf8fce5876
c
configure-options =
--with-curl=${curl:location}
--with-openssl=${openssl:location}
...
...
component/noVNC/buildout.cfg
View file @
3cde8905
...
...
@@ -4,6 +4,6 @@ parts =
[noVNC]
recipe = slapos.recipe.build:download-unpacked
url = http://cloud.github.com/downloads/kanaka/noVNC/novnc-0.
3
.tar.gz
md5sum =
95d3c58921fa188c179491e8ef2acc12
url = http://cloud.github.com/downloads/kanaka/noVNC/novnc-0.
4
.tar.gz
md5sum =
5703d5d46022d8723796dcbbf821ee7f
strip-top-level-dir = true
component/python-setuptools/buildout.cfg
View file @
3cde8905
...
...
@@ -2,7 +2,7 @@
parts = python-setuptools
[setuptools-download]
recipe = slapos.recipe.download
recipe = slapos.recipe.
build:
download
filename = setuptools-0.6c11-py2.7.egg
url = http://pypi.python.org/packages/2.7/s/setuptools/${:filename}
md5sum = fe1f997bc722265116870bc7919059ea
...
...
component/rpm2cpio/buildout.cfg
View file @
3cde8905
...
...
@@ -4,5 +4,5 @@ parts =
[rpm2cpio]
recipe = slapos.recipe.build:download
url = http
://ruda.googlecode.com/hg-history/2989f0531de63872cc7327590798d1898ac91246/rpm
/rpm2cpio.py
url = http
s://raw.github.com/ruda/rpm2cpio/e196173f1f6b746463b7398e381b94a42edfa345
/rpm2cpio.py
md5sum = c5bb6227d99e1ff5df880f997cbed2e3
component/slapos/buildout.cfg
View file @
3cde8905
...
...
@@ -27,6 +27,7 @@ parts =
slapos
cfg-environment
sh-environment
py
find-links =
http://www.nexedi.org/static/packages/source/slapos.buildout/
...
...
@@ -116,25 +117,35 @@ scripts =
slapos = slapos.entry:main
slapos-watchdog = slapos.grid.watchdog:main
[py]
recipe = zc.recipe.egg
eggs =
${slapos:eggs}
interpreter = py
scripts = py
[versions]
zc.buildout = 1.6.0-dev-SlapOS-007
# Use our own buildout version
zc.buildout = 1.6.0-dev-SlapOS-010
# Prevent lxml to be in alpha
lxml = 2.3.6
Jinja2 = 2.6
Werkzeug = 0.8.3
buildout-versions = 1.7
collective.recipe.template = 1.9
hexagonit.recipe.cmmi = 1.6
lxml = 2.3.6
meld3 = 0.6.9
netaddr = 0.7.10
slapos.core = 0.3
1.1
slapos.core = 0.3
2.2
slapos.libnetworkcache = 0.13.2
xml-marshaller = 0.9.7
z3c.recipe.scripts = 1.0.1
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.3
1.1
# slapos.core==0.3
2.2
Flask = 0.9
# Required by:
...
...
@@ -142,21 +153,21 @@ Flask = 0.9
hexagonit.recipe.download = 1.5.1
# Required by:
# slapos.core==0.3
1.1
# slapos.core==0.3
2.2
netifaces = 0.8
# Required by:
# slapos.core==0.3
1.1
# slapos.core==0.3
2.2
# slapos.libnetworkcache==0.13.2
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-0
07
# zc.buildout==1.6.0-dev-SlapOS-0
10
# zope.interface==4.0.1
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.core==0.3
1.1
# slapos.core==0.3
2.2
supervisor = 3.0b1
# Required by:
# slapos.core==0.3
1.1
# slapos.core==0.3
2.2
zope.interface = 4.0.1
component/stunnel/buildout.cfg
View file @
3cde8905
...
...
@@ -17,8 +17,8 @@ filename = stunnel-4-hooks.py
[stunnel-4]
recipe = hexagonit.recipe.cmmi
url = http://mirror.bit.nl/stunnel/
stunnel-4.53
.tar.gz
md5sum =
ab3bfc915357d67da18c73f73610d593
url = http://mirror.bit.nl/stunnel/
archive/4.x/stunnel-4.54
.tar.gz
md5sum =
c2b1db99e3ed547214568959a8ed18ac
pre-configure-hook = ${stunnel-4-hook-download:location}/${stunnel-4-hook-download:filename}:pre_configure_hook
configure-options =
--enable-ipv6
...
...
setup.py
View file @
3cde8905
...
...
@@ -26,7 +26,6 @@ setup(name=name,
packages
=
find_packages
(),
include_package_data
=
True
,
install_requires
=
[
'PyXML'
,
# for full blown python interpreter
'lxml'
,
# for full blown python interpreter
'netaddr'
,
# to manipulate on IP addresses
'setuptools'
,
# namespaces
...
...
@@ -139,7 +138,6 @@ setup(name=name,
'sshkeys_authority = slapos.recipe.sshkeys_authority:Recipe'
,
'stunnel = slapos.recipe.stunnel:Recipe'
,
'symbolic.link = slapos.recipe.symbolic_link:Recipe'
,
'testnode = slapos.recipe.testnode:Recipe'
,
'tidstorage = slapos.recipe.tidstorage:Recipe'
,
'urlparse = slapos.recipe._urlparse:Recipe'
,
'uuid = slapos.recipe._uuid:Recipe'
,
...
...
slapos/recipe/README.testnode.txt
deleted
100644 → 0
View file @
eaffed7d
testnode
========
Generic testnode.
slapos/recipe/librecipe/__init__.py
View file @
3cde8905
...
...
@@ -90,13 +90,22 @@ class BaseSlapRecipe:
]
# SLAP related information
slap_connection
=
buildout
[
'slap_connection'
]
self
.
computer_id
=
slap_connection
[
'computer_id'
]
self
.
computer_partition_id
=
slap_connection
[
'partition_id'
]
self
.
server_url
=
slap_connection
[
'server_url'
]
self
.
software_release_url
=
slap_connection
[
'software_release_url'
]
self
.
key_file
=
slap_connection
.
get
(
'key_file'
)
self
.
cert_file
=
slap_connection
.
get
(
'cert_file'
)
try
:
slap_connection
=
buildout
[
'slap_connection'
]
self
.
computer_id
=
slap_connection
[
'computer_id'
]
self
.
computer_partition_id
=
slap_connection
[
'partition_id'
]
self
.
server_url
=
slap_connection
[
'server_url'
]
self
.
software_release_url
=
slap_connection
[
'software_release_url'
]
self
.
key_file
=
slap_connection
.
get
(
'key_file'
)
self
.
cert_file
=
slap_connection
.
get
(
'cert_file'
)
except
zc
.
buildout
.
buildout
.
MissingSection
:
slap_connection
=
buildout
[
'slap-connection'
]
self
.
computer_id
=
slap_connection
[
'computer-id'
]
self
.
computer_partition_id
=
slap_connection
[
'partition-id'
]
self
.
server_url
=
slap_connection
[
'server-url'
]
self
.
software_release_url
=
slap_connection
[
'software-release-url'
]
self
.
key_file
=
slap_connection
.
get
(
'key-file'
)
self
.
cert_file
=
slap_connection
.
get
(
'cert-file'
)
# setup egg to give possibility to generate scripts
self
.
egg
=
zc
.
recipe
.
egg
.
Egg
(
buildout
,
options
[
'recipe'
],
options
)
...
...
slapos/recipe/notifier.py
View file @
3cde8905
...
...
@@ -66,8 +66,11 @@ class Notify(GenericBaseRecipe):
'-l'
,
kwargs
[
'log'
],
'--title'
,
kwargs
[
'title'
],
'--feed'
,
kwargs
[
'feed_url'
],
'--notification-url'
,
kwargs
[
'notification_url'
],
executable
]
'--notification-url'
]
commandline
.
extend
(
kwargs
[
'notification_url'
].
split
(
' '
))
commandline
.
extend
([
'--executable'
,
executable
])
return
self
.
createPythonScript
(
wrapper
,
'slapos.recipe.librecipe.execute.execute'
,
[
str
(
i
)
for
i
in
commandline
])
...
...
slapos/recipe/template.py
deleted
100644 → 0
View file @
eaffed7d
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
import
os
from
slapos.recipe.librecipe
import
GenericBaseRecipe
class
Recipe
(
GenericBaseRecipe
):
def
install
(
self
):
mapping
=
self
.
options
.
copy
()
for
key
in
(
'output'
,
'template'
,
'recipe'
,
'mode'
):
if
key
in
mapping
:
del
mapping
[
key
]
with
open
(
self
.
options
[
'output'
],
'w'
)
as
output
,
\
open
(
self
.
options
[
'template'
],
'r'
)
as
template
:
output
.
write
(
template
.
read
()
%
mapping
)
if
'mode'
in
self
.
options
:
os
.
chmod
(
self
.
options
[
'output'
],
int
(
self
.
options
[
'mode'
],
8
))
return
[
self
.
options
[
'output'
],
]
slapos/recipe/testnode/__init__.py
deleted
100644 → 0
View file @
eaffed7d
##############################################################################
#
# Copyright (c) 2010 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from
slapos.recipe.librecipe
import
BaseSlapRecipe
import
os
import
pkg_resources
import
zc.buildout
import
zc.recipe.egg
import
sys
CONFIG
=
dict
(
proxy_port
=
'5000'
,
computer_id
=
'COMPUTER'
,
partition_reference
=
'test0'
,
)
class
Recipe
(
BaseSlapRecipe
):
def
__init__
(
self
,
buildout
,
name
,
options
):
self
.
egg
=
zc
.
recipe
.
egg
.
Egg
(
buildout
,
options
[
'recipe'
],
options
)
BaseSlapRecipe
.
__init__
(
self
,
buildout
,
name
,
options
)
def
installSlapOs
(
self
):
CONFIG
[
'slapos_directory'
]
=
self
.
createDataDirectory
(
'slapos'
)
CONFIG
[
'working_directory'
]
=
self
.
createDataDirectory
(
'testnode'
)
CONFIG
[
'software_root'
]
=
os
.
path
.
join
(
CONFIG
[
'slapos_directory'
],
'software'
)
CONFIG
[
'instance_root'
]
=
os
.
path
.
join
(
CONFIG
[
'slapos_directory'
],
'instance'
)
CONFIG
[
'proxy_database'
]
=
os
.
path
.
join
(
CONFIG
[
'slapos_directory'
],
'proxy.db'
)
CONFIG
[
'proxy_host'
]
=
self
.
getLocalIPv4Address
()
CONFIG
[
'master_url'
]
=
'http://%s:%s'
%
(
CONFIG
[
'proxy_host'
],
CONFIG
[
'proxy_port'
])
self
.
_createDirectory
(
CONFIG
[
'software_root'
])
self
.
_createDirectory
(
CONFIG
[
'instance_root'
])
CONFIG
[
'slapos_config'
]
=
self
.
createConfigurationFile
(
'slapos.cfg'
,
self
.
substituteTemplate
(
pkg_resources
.
resource_filename
(
__name__
,
'template/slapos.cfg.in'
),
CONFIG
))
self
.
path_list
.
append
(
CONFIG
[
'slapos_config'
])
def
setupRunningWrapper
(
self
):
self
.
path_list
.
extend
(
zc
.
buildout
.
easy_install
.
scripts
([(
'testnode'
,
__name__
+
'.testnode'
,
'run'
)],
self
.
ws
,
sys
.
executable
,
self
.
wrapper_directory
,
arguments
=
[
dict
(
environment
=
self
.
getRuntimeEnvironment
(),
computer_id
=
CONFIG
[
'computer_id'
],
instance_dict
=
eval
(
self
.
parameter_dict
.
get
(
'instance_dict'
,
'{}'
)),
instance_root
=
CONFIG
[
'instance_root'
],
ipv4_address
=
self
.
getLocalIPv4Address
(),
ipv6_address
=
self
.
getGlobalIPv6Address
(),
master_url
=
CONFIG
[
'master_url'
],
profile_url
=
self
.
parameter_dict
[
'profile_url'
],
proxy_database
=
CONFIG
[
'proxy_database'
],
slapgrid_partition_binary
=
self
.
options
[
'slapgrid_partition_binary'
],
slapgrid_software_binary
=
self
.
options
[
'slapgrid_software_binary'
],
slapos_config
=
CONFIG
[
'slapos_config'
],
slapproxy_binary
=
self
.
options
[
'slapproxy_binary'
],
software_root
=
CONFIG
[
'software_root'
],
buildbot_binary
=
self
.
options
[
'buildbot_binary'
],
working_directory
=
CONFIG
[
'working_directory'
],
buildbot_host
=
self
.
parameter_dict
[
'buildbot_host'
],
slave_name
=
self
.
parameter_dict
[
'slave_name'
],
slave_password
=
self
.
parameter_dict
[
'slave_password'
],
bin_directory
=
self
.
bin_directory
,
# botenvironemnt is splittable string of key=value to substitute
# environment of running bot
bot_environment
=
self
.
parameter_dict
.
get
(
'bot_environment'
,
''
),
partition_reference
=
CONFIG
[
'partition_reference'
],
)
]))
def
installLocalSvn
(
self
):
svn_dict
=
dict
(
svn_binary
=
self
.
options
[
'svn_binary'
])
svn_dict
.
update
(
self
.
parameter_dict
)
svn_path
=
os
.
path
.
join
(
self
.
bin_directory
,
'svn'
)
self
.
_writeExecutable
(
svn_path
,
"""
\
#!/bin/sh
%(svn_binary)s --username %(svn_username)s --password %(svn_password)s
\
--non-interactive --trust-server-cert --no-auth-cache "$@" """
%
svn_dict
)
self
.
path_list
.
append
(
svn_path
)
svnversion
=
os
.
path
.
join
(
self
.
bin_directory
,
'svnversion'
)
if
os
.
path
.
lexists
(
svnversion
):
os
.
unlink
(
svnversion
)
os
.
symlink
(
self
.
options
[
'svnversion_binary'
],
svnversion
)
self
.
path_list
.
append
(
svnversion
)
def
installLocalGit
(
self
):
git
=
os
.
path
.
join
(
self
.
bin_directory
,
'git'
)
if
os
.
path
.
lexists
(
git
):
os
.
unlink
(
git
)
os
.
symlink
(
self
.
options
[
'git_binary'
],
git
)
self
.
path_list
.
append
(
git
)
def
installLocalZip
(
self
):
zip
=
os
.
path
.
join
(
self
.
bin_directory
,
'zip'
)
if
os
.
path
.
lexists
(
zip
):
os
.
unlink
(
zip
)
os
.
symlink
(
self
.
options
[
'zip_binary'
],
zip
)
self
.
path_list
.
append
(
zip
)
def
installLocalPython
(
self
):
"""Installs local python fully featured with eggs"""
self
.
path_list
.
extend
(
zc
.
buildout
.
easy_install
.
scripts
([],
self
.
ws
,
sys
.
executable
,
self
.
bin_directory
,
scripts
=
None
,
interpreter
=
'python'
))
def
installLocalRunUnitTest
(
self
):
link
=
os
.
path
.
join
(
self
.
bin_directory
,
'runUnitTest'
)
destination
=
os
.
path
.
join
(
CONFIG
[
'instance_root'
],
CONFIG
[
'partition_reference'
],
'bin'
,
'runUnitTest'
)
if
os
.
path
.
lexists
(
link
):
if
not
os
.
readlink
(
link
)
!=
destination
:
os
.
unlink
(
link
)
if
not
os
.
path
.
lexists
(
link
):
os
.
symlink
(
destination
,
link
)
self
.
path_list
.
append
(
link
)
def
_installBuildbot
(
self
):
self
.
setupRunningWrapper
()
self
.
installLocalPython
()
self
.
installLocalGit
()
self
.
installLocalSvn
()
self
.
installLocalRunUnitTest
()
return
self
.
path_list
def
getRuntimeEnvironment
(
self
):
env
=
{}
env
[
'PATH'
]
=
':'
.
join
([
self
.
bin_directory
]
+
os
.
environ
[
'PATH'
].
split
(
':'
))
return
env
def
_installProfileTesting
(
self
):
self
.
path_list
.
extend
(
zc
.
buildout
.
easy_install
.
scripts
([(
'testnode'
,
__name__
+
'.profile_testnode'
,
'run'
)],
self
.
ws
,
sys
.
executable
,
self
.
wrapper_directory
,
arguments
=
[
dict
(
environment
=
self
.
getRuntimeEnvironment
(),
slapgrid_environment
=
eval
(
self
.
parameter_dict
.
get
(
'slapgrid_environment'
,
'{}'
)),
profile_path
=
self
.
parameter_dict
.
get
(
'profile_path'
,
'slapos/software.cfg'
),
repository
=
self
.
parameter_dict
[
'repository'
],
# Optional URL of test aggreagation system
test_suite_master_url
=
self
.
parameter_dict
[
'test_suite_master_url'
],
suite_name
=
self
.
parameter_dict
[
'suite_name'
],
branch
=
self
.
parameter_dict
.
get
(
'branch'
,
'master'
),
# internal parameters
software_root
=
CONFIG
[
'software_root'
],
computer_id
=
CONFIG
[
'computer_id'
],
git_binary
=
self
.
options
[
'git_binary'
],
master_url
=
CONFIG
[
'master_url'
],
proxy_database
=
CONFIG
[
'proxy_database'
],
slapgrid_software_binary
=
self
.
options
[
'slapgrid_software_binary'
],
slapos_config
=
CONFIG
[
'slapos_config'
],
slapproxy_binary
=
self
.
options
[
'slapproxy_binary'
],
working_directory
=
CONFIG
[
'working_directory'
],
bin_directory
=
self
.
bin_directory
,
partition_reference
=
CONFIG
[
'partition_reference'
],
)
]))
return
self
.
path_list
def
_install
(
self
):
self
.
requirements
,
self
.
ws
=
self
.
egg
.
working_set
()
self
.
path_list
=
[]
self
.
installSlapOs
()
self
.
installLocalZip
()
flavour
=
self
.
parameter_dict
.
get
(
'flavour'
,
'buildbot'
)
if
flavour
==
'buildbot'
:
return
self
.
_installBuildbot
()
elif
flavour
==
'profile-testing'
:
return
self
.
_installProfileTesting
()
raise
NotImplementedError
(
'Falvour %r is unknown'
%
flavour
)
slapos/recipe/testnode/erp5testreporthandler.py
deleted
100644 → 0
View file @
eaffed7d
import
urlparse
import
urllib
import
httplib
import
mimetools
from
random
import
randint
import
tempfile
import
os
import
stat
import
zipfile
import
mimetypes
import
datetime
TB_SEP
=
"============================================================="
\
"========="
def
get_content_type
(
f
):
return
mimetypes
.
guess_type
(
f
.
name
)[
0
]
or
'application/octet-stream'
class
ConnectionHelper
:
def
__init__
(
self
,
url
):
self
.
conn
=
urlparse
.
urlparse
(
url
)
if
self
.
conn
.
scheme
==
'http'
:
connection_type
=
httplib
.
HTTPConnection
if
self
.
conn
.
port
is
None
:
self
.
port
=
80
else
:
connection_type
=
httplib
.
HTTPSConnection
if
self
.
conn
.
port
is
None
:
self
.
port
=
443
self
.
connection_type
=
connection_type
def
_connect
(
self
):
self
.
connection
=
self
.
connection_type
(
self
.
conn
.
hostname
+
':'
+
str
(
self
.
conn
.
port
or
self
.
port
))
def
POST
(
self
,
path
,
parameter_dict
,
file_list
=
None
):
self
.
_connect
()
parameter_dict
.
update
(
__ac_name
=
self
.
conn
.
username
,
__ac_password
=
self
.
conn
.
password
)
header_dict
=
{
'Content-type'
:
"application/x-www-form-urlencoded"
}
if
file_list
is
None
:
body
=
urllib
.
urlencode
(
parameter_dict
)
else
:
boundary
=
mimetools
.
choose_boundary
()
header_dict
[
'Content-type'
]
=
'multipart/form-data; boundary=%s'
%
(
boundary
,)
body
=
''
for
k
,
v
in
parameter_dict
.
iteritems
():
body
+=
'--%s
\
r
\
n
'
%
boundary
body
+=
'Content-Disposition: form-data; name="%s"
\
r
\
n
'
%
k
body
+=
'
\
r
\
n
'
body
+=
'%s
\
r
\
n
'
%
v
for
name
,
filename
in
file_list
:
f
=
open
(
filename
,
'r'
)
body
+=
'--%s
\
r
\
n
'
%
boundary
body
+=
'Content-Disposition: form-data; name="%s"; filename="%s"
\
r
\
n
'
\
%
(
name
,
name
)
body
+=
'Content-Type: %s
\
r
\
n
'
%
get_content_type
(
f
)
body
+=
'Content-Length: %d
\
r
\
n
'
%
os
.
fstat
(
f
.
fileno
())[
stat
.
ST_SIZE
]
body
+=
'
\
r
\
n
'
body
+=
f
.
read
()
f
.
close
()
body
+=
'
\
r
\
n
'
self
.
connection
.
request
(
"POST"
,
self
.
conn
.
path
+
'/'
+
path
,
body
,
header_dict
)
self
.
response
=
self
.
connection
.
getresponse
()
class
ERP5TestReportHandler
:
def
__init__
(
self
,
url
,
suite_name
):
# random test id
self
.
test_id
=
"%s-%X"
%
(
(
"%s"
%
datetime
.
date
.
today
()).
replace
(
"-"
,
""
),
randint
(
1
,
10000000000000000
),
)
self
.
connection_helper
=
ConnectionHelper
(
url
)
self
.
suite_name
=
suite_name
def
reportStart
(
self
):
# report that test is running
print
'Starting test with id %s'
%
self
.
test_id
self
.
connection_helper
.
POST
(
'TestResultModule_reportRunning'
,
dict
(
test_suite
=
self
.
suite_name
,
test_report_id
=
self
.
test_id
,
))
def
reportFinished
(
self
,
out_file
,
revision
,
success
,
duration
,
text
):
# make file parsable by erp5_test_results
tempcmd
=
tempfile
.
mkstemp
()[
1
]
tempcmd2
=
tempfile
.
mkstemp
()[
1
]
tempout
=
tempfile
.
mkstemp
()[
1
]
templog
=
tempfile
.
mkstemp
()[
1
]
log_lines
=
open
(
out_file
,
'r'
).
readlines
()
tl
=
open
(
templog
,
'w'
)
tl
.
write
(
TB_SEP
+
'
\
n
'
)
if
len
(
log_lines
)
>
900
:
tl
.
write
(
'...[truncated]...
\
n
\
n
'
)
for
log_line
in
log_lines
[
-
900
:]:
starts
=
log_line
.
startswith
if
starts
(
'Ran'
)
or
starts
(
'FAILED'
)
or
starts
(
'OK'
)
or
starts
(
TB_SEP
):
continue
if
starts
(
'ERROR: '
)
or
starts
(
'FAIL: '
):
tl
.
write
(
'internal-test: '
+
log_line
)
continue
tl
.
write
(
log_line
)
tl
.
write
(
"----------------------------------------------------------------------
\
n
"
)
tl
.
write
(
'Ran 1 test in %.2fs
\
n
'
%
duration
)
if
success
:
tl
.
write
(
'OK
\
n
'
)
else
:
tl
.
write
(
'FAILED (failures=1)
\
n
'
)
tl
.
write
(
TB_SEP
+
'
\
n
'
)
tl
.
close
()
open
(
tempcmd
,
'w'
).
write
(
"""svn info dummy"""
)
open
(
tempcmd2
,
'w'
).
write
(
self
.
suite_name
)
open
(
tempout
,
'w'
).
write
(
"Revision: %s
\
n
%s"
%
(
revision
,
text
))
# create nice zip archive
tempzip
=
tempfile
.
mkstemp
()[
1
]
zip
=
zipfile
.
ZipFile
(
tempzip
,
'w'
)
zip
.
write
(
tempcmd
,
'dummy/001/cmdline'
)
zip
.
write
(
tempout
,
'dummy/001/stdout'
)
zip
.
write
(
templog
,
'dummy/001/stderr'
)
zip
.
write
(
tempout
,
'%s/002/stdout'
%
self
.
suite_name
)
zip
.
write
(
templog
,
'%s/002/stderr'
%
self
.
suite_name
)
zip
.
write
(
tempcmd2
,
'%s/002/cmdline'
%
self
.
suite_name
)
zip
.
close
()
os
.
unlink
(
templog
)
os
.
unlink
(
tempcmd
)
os
.
unlink
(
tempout
)
os
.
unlink
(
tempcmd2
)
# post it to ERP5
self
.
connection_helper
.
POST
(
'TestResultModule_reportCompleted'
,
dict
(
test_report_id
=
self
.
test_id
),
file_list
=
[(
'filepath'
,
tempzip
)]
)
os
.
unlink
(
tempzip
)
slapos/recipe/testnode/profile_testnode.py
deleted
100644 → 0
View file @
eaffed7d
import
os
import
socket
import
signal
import
shutil
import
slapos.slap
import
subprocess
import
time
import
atexit
from
erp5testreporthandler
import
ERP5TestReportHandler
process_group_pid_list
=
[]
def
clean
():
for
pgpid
in
process_group_pid_list
:
try
:
os
.
killpg
(
pgpid
,
signal
.
SIGTERM
)
except
:
pass
def
sigterm_handler
(
signal
,
frame
):
clean
()
def
sigint_handler
(
signal
,
frame
):
clean
()
raise
KeyboardInterrupt
signal
.
signal
(
signal
.
SIGINT
,
sigint_handler
)
signal
.
signal
(
signal
.
SIGTERM
,
sigterm_handler
)
atexit
.
register
(
clean
)
def
getCurrentBranchName
(
config
,
p
):
r
=
subprocess
.
Popen
([
config
[
'git_binary'
],
'branch'
],
stdout
=
subprocess
.
PIPE
,
cwd
=
p
).
communicate
()[
0
]
for
f
in
r
.
splitlines
():
if
f
.
startswith
(
'*'
):
return
f
.
split
()[
1
]
return
''
def
getRevision
(
config
,
p
):
return
subprocess
.
Popen
([
config
[
'git_binary'
],
'rev-parse'
,
'HEAD'
],
stdout
=
subprocess
.
PIPE
,
cwd
=
p
).
communicate
()[
0
].
strip
()
def
getCurrentFetchRemote
(
config
,
p
):
r
=
subprocess
.
Popen
([
config
[
'git_binary'
],
'remote'
,
'-v'
],
stdout
=
subprocess
.
PIPE
,
cwd
=
p
).
communicate
()[
0
]
remote
=
''
for
f
in
r
.
splitlines
():
if
f
.
startswith
(
'origin'
)
and
f
.
endswith
(
'(fetch)'
):
if
remote
!=
''
:
raise
ValueError
(
'Too many remotes: %s'
%
r
)
remote
=
r
.
split
()[
1
]
return
remote
def
getMachineIdString
():
"""Returns machine identification string"""
kw
=
dict
(
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
STDOUT
)
idstr
=
subprocess
.
Popen
([
"uname"
,
"-m"
],
**
kw
).
communicate
()[
0
].
strip
()
# try to detect gcc version
try
:
gcc_list
=
subprocess
.
Popen
([
"gcc"
,
"-v"
],
**
kw
).
communicate
()[
0
].
split
(
'
\
n
'
)
for
gcc
in
gcc_list
:
if
gcc
.
startswith
(
'gcc version'
):
idstr
+=
' gcc:'
+
gcc
.
split
()[
2
]
break
except
IndexError
:
pass
# try to detect libc version
try
:
libdir
=
os
.
path
.
sep
+
'lib'
for
libso
in
os
.
listdir
(
libdir
):
if
libso
.
startswith
(
'libc.'
)
and
os
.
path
.
islink
(
os
.
path
.
join
(
libdir
,
libso
)):
libc
=
os
.
readlink
(
os
.
path
.
join
(
libdir
,
libso
))
if
libc
.
endswith
(
'.so'
):
idstr
+=
' libc:'
+
libc
.
split
(
'-'
)[
1
][:
-
3
]
else
:
idstr
+=
' '
+
libc
break
except
IndexError
:
pass
return
idstr
def
run
(
args
):
config
=
args
[
0
]
for
k
,
v
in
config
[
'environment'
].
iteritems
():
os
.
environ
[
k
]
=
v
proxy
=
None
slapgrid
=
None
last_revision_file
=
os
.
path
.
join
(
config
[
'working_directory'
],
'revision.txt'
)
if
os
.
path
.
exists
(
last_revision_file
):
os
.
unlink
(
last_revision_file
)
# fetch repository from git
repository_clone
=
os
.
path
.
join
(
config
[
'working_directory'
],
'repository'
)
profile_path
=
os
.
path
.
join
(
repository_clone
,
config
[
'profile_path'
])
if
os
.
path
.
exists
(
config
[
'proxy_database'
]):
os
.
unlink
(
config
[
'proxy_database'
])
proxy
=
subprocess
.
Popen
([
config
[
'slapproxy_binary'
],
config
[
'slapos_config'
]],
close_fds
=
True
,
preexec_fn
=
os
.
setsid
)
process_group_pid_list
.
append
(
proxy
.
pid
)
slap
=
slapos
.
slap
.
slap
()
slap
.
initializeConnection
(
config
[
'master_url'
])
while
True
:
try
:
slap
.
registerSupply
().
supply
(
profile_path
,
computer_guid
=
config
[
'computer_id'
])
except
socket
.
error
:
time
.
sleep
(
1
)
pass
else
:
break
while
True
:
info_list
=
[]
a
=
info_list
.
append
while
True
:
try
:
if
os
.
path
.
exists
(
repository_clone
):
if
getCurrentFetchRemote
(
config
,
repository_clone
)
!=
config
[
'repository'
]:
shutil
.
rmtree
(
repository_clone
)
if
not
os
.
path
.
exists
(
repository_clone
):
subprocess
.
check_call
([
config
[
'git_binary'
],
'clone'
,
config
[
'repository'
],
repository_clone
])
# switch to branch
branch
=
getCurrentBranchName
(
config
,
repository_clone
)
if
branch
!=
config
[
'branch'
]:
subprocess
.
check_call
([
config
[
'git_binary'
],
'checkout'
,
'--force'
,
'--track'
,
'-b'
,
config
[
'branch'
],
'origin/'
+
config
[
'branch'
]],
cwd
=
repository_clone
)
subprocess
.
check_call
([
config
[
'git_binary'
],
'reset'
,
'--hard'
,
'@{upstream}'
],
cwd
=
repository_clone
)
except
Exception
:
print
'Retrying git in 60s'
time
.
sleep
(
60
)
else
:
break
a
(
'Tested repository: %s'
%
config
[
'repository'
])
a
(
'Machine identification: %s'
%
getMachineIdString
())
erp5_report
=
ERP5TestReportHandler
(
config
[
'test_suite_master_url'
],
'@'
.
join
([
config
[
'suite_name'
],
branch
]))
last_revision
=
''
if
os
.
path
.
exists
(
last_revision_file
):
last_revision
=
open
(
last_revision_file
).
read
().
strip
()
revision
=
getRevision
(
config
,
repository_clone
)
open
(
last_revision_file
,
'w'
).
write
(
revision
)
if
revision
!=
last_revision
:
print
'Running for revision %r'
%
revision
while
True
:
try
:
erp5_report
.
reportStart
()
except
Exception
:
print
'Retrying in 5s'
time
.
sleep
(
5
)
else
:
break
if
os
.
path
.
exists
(
config
[
'software_root'
]):
shutil
.
rmtree
(
config
[
'software_root'
])
os
.
mkdir
(
config
[
'software_root'
])
out_file
=
os
.
path
.
join
(
config
[
'working_directory'
],
'slapgrid.out'
)
if
os
.
path
.
exists
(
out_file
):
os
.
unlink
(
out_file
)
out
=
open
(
out_file
,
'w'
)
begin
=
time
.
time
()
slapgrid_environment
=
os
.
environ
.
copy
()
for
k
,
v
in
config
[
'slapgrid_environment'
].
iteritems
():
slapgrid_environment
[
k
]
=
v
a
(
'Slapgrid environment: %r'
%
config
[
'slapgrid_environment'
])
slapgrid
=
subprocess
.
Popen
([
config
[
'slapgrid_software_binary'
],
'-vc'
,
config
[
'slapos_config'
]],
close_fds
=
True
,
preexec_fn
=
os
.
setsid
,
stdout
=
out
,
stderr
=
subprocess
.
STDOUT
,
env
=
slapgrid_environment
)
process_group_pid_list
.
append
(
slapgrid
.
pid
)
slapgrid
.
communicate
()
out
.
close
()
while
True
:
try
:
erp5_report
.
reportFinished
(
out_file
,
revision
,
slapgrid
.
returncode
==
0
,
time
.
time
()
-
begin
,
'
\
n
'
.
join
(
info_list
))
except
Exception
:
print
'Retrying in 5s'
time
.
sleep
(
5
)
else
:
break
print
'Sleeping for 600s'
time
.
sleep
(
600
)
slapos/recipe/testnode/template/slapos.cfg.in
deleted
100644 → 0
View file @
eaffed7d
[slapos]
software_root = %(software_root)s
instance_root = %(instance_root)s
master_url = %(master_url)s
computer_id = %(computer_id)s
[slapproxy]
host = %(proxy_host)s
port = %(proxy_port)s
database_uri = %(proxy_database)s
slapos/recipe/testnode/testnode.py
deleted
100644 → 0
View file @
eaffed7d
from
xml_marshaller
import
xml_marshaller
import
os
import
signal
import
slapos.slap
import
socket
import
subprocess
import
sys
import
time
process_group_pid_list
=
[]
process_pid_file_list
=
[]
process_command_list
=
[]
def
sigterm_handler
(
signal
,
frame
):
for
pgpid
in
process_group_pid_list
:
try
:
os
.
killpg
(
pgpid
,
signal
.
SIGTERM
)
except
:
pass
for
pid_file
in
process_pid_file_list
:
try
:
os
.
kill
(
int
(
open
(
pid_file
).
read
().
strip
()),
signal
.
SIGTERM
)
except
:
pass
for
p
in
process_command_list
:
try
:
subprocess
.
call
(
p
)
except
:
pass
sys
.
exit
(
1
)
signal
.
signal
(
signal
.
SIGTERM
,
sigterm_handler
)
def
run
(
args
):
config
=
args
[
0
]
for
k
,
v
in
config
[
'environment'
].
iteritems
():
os
.
environ
[
k
]
=
v
proxy
=
None
slapgrid
=
None
supervisord_pid_file
=
os
.
path
.
join
(
config
[
'instance_root'
],
'var'
,
'run'
,
'supervisord.pid'
)
if
os
.
path
.
exists
(
config
[
'proxy_database'
]):
os
.
unlink
(
config
[
'proxy_database'
])
try
:
proxy
=
subprocess
.
Popen
([
config
[
'slapproxy_binary'
],
config
[
'slapos_config'
]],
close_fds
=
True
,
preexec_fn
=
os
.
setsid
)
process_group_pid_list
.
append
(
proxy
.
pid
)
slap
=
slapos
.
slap
.
slap
()
slap
.
initializeConnection
(
config
[
'master_url'
])
while
True
:
try
:
slap
.
registerSupply
().
supply
(
config
[
'profile_url'
],
computer_guid
=
config
[
'computer_id'
])
except
socket
.
error
:
time
.
sleep
(
1
)
pass
else
:
break
while
True
:
slapgrid
=
subprocess
.
Popen
([
config
[
'slapgrid_software_binary'
],
'-vc'
,
config
[
'slapos_config'
]],
close_fds
=
True
,
preexec_fn
=
os
.
setsid
)
process_group_pid_list
.
append
(
slapgrid
.
pid
)
slapgrid
.
wait
()
if
slapgrid
.
returncode
==
0
:
print
'Software installed properly'
break
print
'Problem with software installation, trying again'
time
.
sleep
(
600
)
computer
=
slap
.
registerComputer
(
config
[
'computer_id'
])
partition_reference
=
config
[
'partition_reference'
]
partition_path
=
os
.
path
.
join
(
config
[
'instance_root'
],
partition_reference
)
if
not
os
.
path
.
exists
(
partition_path
):
os
.
mkdir
(
partition_path
)
os
.
chmod
(
partition_path
,
0750
)
computer
.
updateConfiguration
(
xml_marshaller
.
dumps
({
'address'
:
config
[
'ipv4_address'
],
'instance_root'
:
config
[
'instance_root'
],
'netmask'
:
'255.255.255.255'
,
'partition_list'
:
[{
'address_list'
:
[{
'addr'
:
config
[
'ipv4_address'
],
'netmask'
:
'255.255.255.255'
},
{
'addr'
:
config
[
'ipv6_address'
],
'netmask'
:
'ffff:ffff:ffff::'
},
],
'path'
:
partition_path
,
'reference'
:
partition_reference
,
'tap'
:
{
'name'
:
partition_reference
},
}
],
'reference'
:
config
[
'computer_id'
],
'software_root'
:
config
[
'software_root'
]}))
slap
.
registerOpenOrder
().
request
(
config
[
'profile_url'
],
partition_reference
=
'testing partition'
,
partition_parameter_kw
=
config
[
'instance_dict'
])
slapgrid
=
subprocess
.
Popen
([
config
[
'slapgrid_partition_binary'
],
'-vc'
,
config
[
'slapos_config'
]],
close_fds
=
True
,
preexec_fn
=
os
.
setsid
)
slapgrid
.
wait
()
if
slapgrid
.
returncode
!=
0
:
raise
ValueError
(
'Slapgrid instance failed'
)
runUnitTest
=
os
.
path
.
join
(
partition_path
,
'bin'
,
'runUnitTest'
)
if
not
os
.
path
.
exists
(
runUnitTest
):
raise
ValueError
(
'No %r provided'
%
runUnitTest
)
except
:
try
:
if
os
.
path
.
exists
(
supervisord_pid_file
):
os
.
kill
(
int
(
open
(
supervisord_pid_file
).
read
().
strip
()),
signal
.
SIGTERM
)
except
:
pass
raise
finally
:
# Nice way to kill *everything* generated by run process -- process
# groups working only in POSIX compilant systems
# Exceptions are swallowed during cleanup phase
if
proxy
is
not
None
:
os
.
killpg
(
proxy
.
pid
,
signal
.
SIGTERM
)
if
os
.
path
.
exists
(
config
[
'proxy_database'
]):
os
.
unlink
(
config
[
'proxy_database'
])
if
slapgrid
is
not
None
and
slapgrid
.
returncode
is
None
:
os
.
killpg
(
slapgrid
.
pid
,
signal
.
SIGTERM
)
try
:
bot_env
=
os
.
environ
.
copy
()
bot_env
[
'PATH'
]
=
':'
.
join
([
config
[
'bin_directory'
]]
+
bot_env
[
'PATH'
].
split
(
':'
))
for
l
in
config
[
'bot_environment'
].
split
():
k
,
v
=
l
.
split
(
'='
)
bot_env
[
k
]
=
v
if
subprocess
.
call
([
config
[
'buildbot_binary'
],
'create-slave'
,
'-f'
,
config
[
'working_directory'
],
config
[
'buildbot_host'
],
config
[
'slave_name'
],
config
[
'slave_password'
]])
!=
0
:
raise
ValueError
(
'Buildbot call failed'
)
process_command_list
.
append
([
config
[
'buildbot_binary'
],
'stop'
,
config
[
'working_directory'
]])
if
os
.
path
.
exists
(
os
.
path
.
join
(
config
[
'working_directory'
],
'buildbot.tac.new'
)):
tac
=
os
.
path
.
join
(
config
[
'working_directory'
],
'buildbot.tac'
)
if
os
.
path
.
exists
(
tac
):
os
.
unlink
(
tac
)
os
.
rename
(
os
.
path
.
join
(
config
[
'working_directory'
],
'buildbot.tac.new'
),
tac
)
if
subprocess
.
call
([
config
[
'buildbot_binary'
],
'start'
,
config
[
'working_directory'
]],
env
=
bot_env
)
!=
0
:
raise
ValueError
(
'Issue during starting buildbot'
)
while
True
:
time
.
sleep
(
3600
)
finally
:
try
:
subprocess
.
call
([
config
[
'buildbot_binary'
],
'stop'
,
config
[
'working_directory'
]])
except
:
pass
try
:
if
os
.
path
.
exists
(
supervisord_pid_file
):
os
.
kill
(
int
(
open
(
supervisord_pid_file
).
read
().
strip
()),
signal
.
SIGTERM
)
except
:
pass
software/kvm/instance-kvm.cfg
View file @
3cde8905
...
...
@@ -17,46 +17,46 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[
root
directory]
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
bin = $${buildout:directory}/bin
srv = $${buildout:directory}/srv
var = $${buildout:directory}/var
[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = $${rootdirectory:etc}/run
promises = $${rootdirectory:etc}/promise
novnc-conf = $${rootdirectory:etc}/novnc
run = $${rootdirectory:var}/run
ca-dir = $${rootdirectory:srv}/ssl
scripts = $${:etc}/run
services = $${:etc}/service
promises = $${:etc}/promise
novnc-conf = $${:etc}/novnc
run = $${:var}/run
ca-dir = $${:srv}/ssl
[create-mac]
recipe = slapos.cookbook:generate.mac
storage-path = $${
root
directory:srv}/mac
storage-path = $${directory:srv}/mac
[gen-passwd]
recipe = slapos.cookbook:generate.password
storage-path = $${
root
directory:srv}/passwd
storage-path = $${directory:srv}/passwd
bytes = 4
[kvm-instance]
# XXX-Cedric: change "KVM" recipe to simple "create wrappers". No need for this
# Specific code
recipe = slapos.cookbook:kvm
vnc-ip = $${slap-network-information:local-ipv4}
vnc-port = 5901
nbd-ip = $${slap-parameter:nbd_ip}
nbd-port = $${slap-parameter:nbd_port}
tap = $${slap-network-information:network-interface}
disk-path = $${
root
directory:srv}/virtual.qcow2
disk-path = $${directory:srv}/virtual.qcow2
disk-size = 10
socket-path = $${
root
directory:var}/qmp_socket
pid-path = $${
base
directory:run}/pid_file
socket-path = $${directory:var}/qmp_socket
pid-path = $${directory:run}/pid_file
smp-count = 1
ram-size = 1024
mac-address = $${create-mac:mac-address}
runner-path = $${
base
directory:services}/kvm
controller-path = $${
basedirectory:service
s}/kvm_controller
runner-path = $${directory:services}/kvm
controller-path = $${
directory:script
s}/kvm_controller
shell-path = ${dash:location}/bin/dash
qemu-path = ${kvm:location}/bin/qemu-system-x86_64
qemu-img-path = ${kvm:location}/bin/qemu-img
...
...
@@ -64,7 +64,7 @@ passwd = $${gen-passwd:passwd}
[kvm-promise]
recipe = slapos.cookbook:check_port_listening
path = $${
base
directory:promises}/vnc_promise
path = $${directory:promises}/vnc_promise
hostname = $${kvm-instance:vnc-ip}
port = $${kvm-instance:vnc-port}
...
...
@@ -83,15 +83,15 @@ ssl-cert-path = $${ca-novnc:cert-file}
[websockify-sighandler]
recipe = slapos.cookbook:signalwrapper
wrapper-path = $${
base
directory:services}/websockify
wrapper-path = $${directory:services}/websockify
wrapped-path = $${novnc-instance:path}
[certificate-authority]
recipe = slapos.cookbook:certificate_authority
openssl-binary = ${openssl:location}/bin/openssl
ca-dir = $${
base
directory:ca-dir}
ca-dir = $${directory:ca-dir}
requests-directory = $${cadirectory:requests}
wrapper = $${
base
directory:services}/certificate_authority
wrapper = $${directory:services}/certificate_authority
ca-private = $${cadirectory:private}
ca-certs = $${cadirectory:certs}
ca-newcerts = $${cadirectory:newcerts}
...
...
@@ -99,30 +99,30 @@ ca-crl = $${cadirectory:crl}
[cadirectory]
recipe = slapos.cookbook:mkdirectory
requests = $${
base
directory:ca-dir}/requests/
private = $${
base
directory:ca-dir}/private/
certs = $${
base
directory:ca-dir}/certs/
newcerts = $${
base
directory:ca-dir}/newcerts/
crl = $${
base
directory:ca-dir}/crl/
requests = $${directory:ca-dir}/requests/
private = $${directory:ca-dir}/private/
certs = $${directory:ca-dir}/certs/
newcerts = $${directory:ca-dir}/newcerts/
crl = $${directory:ca-dir}/crl/
[ca-novnc]
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
key-file = $${
base
directory:novnc-conf}/novnc.key
cert-file = $${
base
directory:novnc-conf}/novnc.crt
executable = $${
root
directory:bin}/novnc
wrapper = $${
root
directory:bin}/websockify
key-file = $${directory:novnc-conf}/novnc.key
cert-file = $${directory:novnc-conf}/novnc.crt
executable = $${directory:bin}/novnc
wrapper = $${directory:bin}/websockify
[novnc-promise]
recipe = slapos.cookbook:check_port_listening
path = $${
base
directory:promises}/novnc_promise
path = $${directory:promises}/novnc_promise
hostname = $${novnc-instance:ip}
port = $${novnc-instance:port}
[kvm-monitor]
recipe = slapos.cookbook:generic.slapmonitor
db-path = $${
root
directory:srv}/slapmonitor_database
db-path = $${directory:srv}/slapmonitor_database
[request-slave-frontend]
...
...
@@ -154,7 +154,7 @@ url = $${request-slave-frontend:connection-url}/vnc_auto.html?host=$${request-sl
[frontend-promise]
recipe = slapos.cookbook:check_url_available
path = $${
base
directory:promises}/frontend_promise
path = $${directory:promises}/frontend_promise
url = $${publish-kvm-frontend-connection-information:url}
dash_path = ${dash:location}/bin/dash
curl_path = ${curl:location}/bin/curl
...
...
software/kvm/software.cfg
View file @
3cde8905
[buildout]
extensions =
buildout-versions
extends =
../../component/gzip/buildout.cfg
../../component/curl/buildout.cfg
../../component/dash/buildout.cfg
../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/git/buildout.cfg
../../component/gnutls/buildout.cfg
../../component/gzip/buildout.cfg
../../component/libpng/buildout.cfg
../../component/libuuid/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/noVNC/buildout.cfg
../../component/openssl/buildout.cfg
../../component/dash/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/curl/buildout.cfg
../../stack/nodejs.cfg
../../stack/slapos.cfg
develop =
${:parts-directory}/websockify
parts =
template
dash
kvm
eggs
check-local-eggs
nodejs
http-proxy
proxy-by-url
npm-modules
dcron
logrotate
versions = versions
#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
# 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
# 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.
...
...
@@ -130,7 +119,7 @@ command =
[template-kvm]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kvm.cfg
md5sum = 6
aaa9b6ef059a2ed2f022834151086ab
md5sum = 6
8478e759138a42f09518d01da548b8a
output = ${buildout:directory}/template-kvm.cfg
mode = 0644
...
...
@@ -210,50 +199,43 @@ signature-certificate-list =
[versions]
lxml = 2.3.6
Jinja2 = 2.6
Pygments = 1.5
Werkzeug = 0.8.3
apache-libcloud = 0.11.
1
apache-libcloud = 0.11.
3
async = 0.6.1
buildout-versions = 1.7
docutils = 0.9.1
gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.6
ipython = 0.13
lxml = 2.3.5
meld3 = 0.6.8
meld3 = 0.6.9
plone.recipe.command = 1.1
pycrypto = 2.6
slapos.cookbook = 0.6
0
slapos.recipe.build = 0.1
0.2
slapos.recipe.template = 2.4.
1
slapos.toolbox = 0.
28
slapos.cookbook = 0.6
8.1
slapos.recipe.build = 0.1
1.5
slapos.recipe.template = 2.4.
2
slapos.toolbox = 0.
31.1
smmap = 0.8.2
z3c.recipe.scripts = 1.0.1
# Required by:
# slapos.core==0.
27
# slapos.toolbox==0.
28
# slapos.core==0.
32.2
# slapos.toolbox==0.
31.1
Flask = 0.9
# Required by:
# slapos.toolbox==0.
28
# slapos.toolbox==0.
31.1
GitPython = 0.3.2.RC1
# Required by:
# slapos.cookbook==0.6
0
# slapos.cookbook==0.6
8.1
PyXML = 0.8.4
# Required by:
# netaddr==0.7.7
Sphinx = 1.1.3
# Required by:
# slapos.toolbox==0.28
# slapos.toolbox==0.31.1
atomize = 0.1.1
# Required by:
# slapos.toolbox==0.
28
# slapos.toolbox==0.
31.1
feedparser = 5.1.2
# Required by:
...
...
@@ -261,15 +243,15 @@ feedparser = 5.1.2
hexagonit.recipe.download = 1.5.1
# Required by:
# slapos.cookbook==0.6
0
# slapos.cookbook==0.6
8.1
inotifyx = 0.2.0
# Required by:
# slapos.cookbook==0.6
0
netaddr = 0.7.
7
# slapos.cookbook==0.6
8.1
netaddr = 0.7.
10
# Required by:
# slapos.core==0.
27
# slapos.core==0.
32.2
netifaces = 0.8
# Required by:
...
...
@@ -277,37 +259,41 @@ netifaces = 0.8
numpy = 1.6.2
# Required by:
# slapos.toolbox==0.28
paramiko = 1.7.7.2
# slapos.toolbox==0.31.1
paramiko = 1.8.0
# Required by:
# slapos.toolbox==0.31.1
psutil = 0.6.1
# Required by:
# slapos.
toolbox==0.28
p
sutil = 0.6.0
# slapos.
cookbook==0.68.1
p
ytz = 2012f
# Required by:
# slapos.cookbook==0.6
0
# slapos.core==0.
27
# slapos.toolbox==0.
28
# slapos.cookbook==0.6
8.1
# slapos.core==0.
32.2
# slapos.toolbox==0.
31.1
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.6
0
# slapos.toolbox==0.
28
slapos.core = 0.
27
# slapos.cookbook==0.6
8.1
# slapos.toolbox==0.
31.1
slapos.core = 0.
32.2
# Required by:
# slapos.core==0.
27
supervisor = 3.0
a12
# slapos.core==0.
32.2
supervisor = 3.0
b1
# Required by:
# slapos.cookbook==0.6
0
# slapos.toolbox==0.
28
# slapos.cookbook==0.6
8.1
# slapos.toolbox==0.
31.1
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.6
0
# slapos.cookbook==0.6
8.1
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.
27
# slapos.core==0.
32.2
zope.interface = 4.0.1
software/slapos-testing/instance.cfg
View file @
3cde8905
[buildout]
parts =
slapos-test-runner
sh-environment
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
...
...
@@ -49,3 +50,16 @@ environment = environment
CPPFLAGS = -I${python2.7:location}/include/python2.7 -I${libxml2:location}/include -I${libxslt:location}/include
LDFLAGS = -L${python2.7:location}/lib -L${libxml2:location}/lib -L${libxslt:location}/lib -L${zlib:location}/lib
PYTHONPATH = ${python-setuptools:location}
[sh-environment]
# Section exposes testing default environment as sh file. It is thus easy
# to directly develop and test the egg inside of this instance.
recipe = collective.recipe.template
input = inline:
export PATH="$${slapos-test-runner:prepend-path}:$PATH"
export CPPFLAGS="$${environment:CPPFLAGS}"
export LDFLAGS="$${environment:LDFLAGS}"
export PYTHONPATH="$${environment:PYTHONPATH}"
export PS1="[slapos-testing env Active] $PS1"
output = $${create-directory:bin}/environment.sh
mode = 755
software/slapos-testing/software.cfg
View file @
3cde8905
...
...
@@ -24,24 +24,18 @@ eggs =
${lxml-python:egg}
erp5.util
slapos.cookbook
collective.recipe.template
entry-points =
runTestSuite=erp5.util.testsuite:runTestSuite
scripts =
runTestSuite
[erp5.util-repository]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
forbid-download-cache = true
repository = http://git.erp5.org/repos/erp5.git
branch = master
[slapos.cookbook-repository]
recipe = slapos.recipe.build:gitclone
git-executable = ${git:location}/bin/git
forbid-download-cache = true
repository = http://git.erp5.org/repos/slapos.git
branch =
slapos-testing
branch =
master
[slapos.core-repository]
recipe = slapos.recipe.build:gitclone
...
...
@@ -67,7 +61,7 @@ branch = master
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum =
d7dbd5da07c1170d0b80199d99f932eb
md5sum =
75588537faf3d42c14867229c68a3978
output = ${buildout:directory}/template.cfg
mode = 640
...
...
@@ -77,7 +71,7 @@ Werkzeug = 0.8.3
buildout-versions = 1.7
erp5.util = 0.4.7
hexagonit.recipe.cmmi = 1.6
lxml =
3.0alpha2
lxml =
2.3.6
meld3 = 0.6.8
plone.recipe.command = 1.1
slapos.cookbook = 0.65
...
...
software/slaprunner/software.cfg
View file @
3cde8905
...
...
@@ -73,17 +73,17 @@ slapos.cookbook = 0.68.1
slapos.libnetworkcache = 0.13.2
slapos.recipe.build = 0.11.5
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.31
slapos.toolbox = 0.31
.1
smmap = 0.8.2
z3c.recipe.scripts = 1.0.1
# Required by:
# slapos.core==0.31.2
# slapos.toolbox==0.31
# slapos.toolbox==0.31
.1
Flask = 0.9
# Required by:
# slapos.toolbox==0.31
# slapos.toolbox==0.31
.1
GitPython = 0.3.2.RC1
# Required by:
...
...
@@ -91,11 +91,11 @@ GitPython = 0.3.2.RC1
PyXML = 0.8.4
# Required by:
# slapos.toolbox==0.31
# slapos.toolbox==0.31
.1
atomize = 0.1.1
# Required by:
# slapos.toolbox==0.31
# slapos.toolbox==0.31
.1
feedparser = 5.1.2
# Required by:
...
...
@@ -115,11 +115,11 @@ netaddr = 0.7.10
netifaces = 0.8
# Required by:
# slapos.toolbox==0.31
# slapos.toolbox==0.31
.1
paramiko = 1.7.7.2
# Required by:
# slapos.toolbox==0.31
# slapos.toolbox==0.31
.1
psutil = 0.6.1
# Required by:
...
...
@@ -130,7 +130,7 @@ pytz = 2012f
# slapos.cookbook==0.68
# slapos.core==0.31.2
# slapos.libnetworkcache==0.13.2
# slapos.toolbox==0.31
# slapos.toolbox==0.31
.1
# supervisor==3.0b1
# zc.buildout==1.6.0-dev-SlapOS-007
# zc.recipe.egg==1.3.2
...
...
software/testnode/instance.cfg
deleted
100644 → 0
View file @
eaffed7d
[buildout]
parts =
testnode
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
[testnode]
recipe = slapos.cookbook:testnode
buildbot_binary = ${buildout:bin-directory}/buildbot
git_binary = ${git:location}/bin/git
slapgrid_partition_binary = ${buildout:bin-directory}/slapgrid-cp
slapgrid_software_binary = ${buildout:bin-directory}/slapgrid-sr
slapproxy_binary = ${buildout:bin-directory}/slapproxy
svn_binary = ${subversion:location}/bin/svn
svnversion_binary = ${subversion:location}/bin/svnversion
zip_binary = ${zip:location}/bin/zip
software/testnode/software.cfg
deleted
100644 → 0
View file @
eaffed7d
[buildout]
recipe_location = ${:parts-directory}/slapos.cookbook
develop = ${:recipe_location}
versions = versions
extensions = slapos.rebootstrap
rebootstrap-section = python2.6
extends =
../../component/python-2.6/buildout.cfg
../../component/subversion/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/git/buildout.cfg
../../component/zip/buildout.cfg
parts =
template
bootstrap
eggs
subversion
git
zip
checkrecipe
find-links +=
http://www.nexedi.org/static/packages/source/slapos.buildout/
http://www.nexedi.org/static/packages/source/
[checkrecipe]
recipe = plone.recipe.command
stop-on-error = true
update-command = ${:command}
command = grep parts ${buildout:develop-eggs-directory}/slapos.cookbook.egg-link
[slapos.cookbook]
recipe = plone.recipe.command
stop-on-error = true
location = ${buildout:parts-directory}/${:_buildout_section_name_}
command = "${git:location}/bin/git" clone -b testnode --quiet http://git.erp5.org/repos/slapos.git "${:location}"
update-command = cd "${:location}" && "${git:location}/bin/git" fetch --quiet && "${git:location}/bin/git" reset --hard @{upstream}
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
md5sum = 03451596826e487dc97d81e27a1e7a73
output = ${buildout:directory}/template.cfg
mode = 0644
[bootstrap]
recipe = zc.recipe.egg
eggs = zc.buildout
suffix =
scripts =
buildout=bootstrap2.6
arguments = sys.argv[1:] + ["bootstrap"]
[rebootstrap]
section = python2.6
version = 1
[eggs]
dummy = ${slapos.cookbook:location}
recipe = zc.recipe.egg
eggs =
${lxml-python:egg}
Zope2
collective.recipe.template
netaddr
slapos.slap
xml_marshaller
PyXML
slapos.core
slapos.cookbook
buildbot
Twisted
entry-points = buildbot=buildbot.scripts.runner:run
[versions]
zc.buildout = 1.5.3-dev-SlapOS-001
# only those buildout with Twisted are known to work
buildbot = 0.7.12
Twisted = 8.2.0
# locally fixed PyXML which supports python 2.6
PyXML = 0.8.4nxd001
stack/lamp/buildout.cfg
View file @
3cde8905
...
...
@@ -320,7 +320,7 @@ inotifyx = 0.2.0
# slapos.cookbook==0.68
# slapos.core==0.31.2
# xml-marshaller==0.9.7
lxml = 3.0
alpha2
lxml = 3.0
.1
# Required by:
# slapos.cookbook==0.68
...
...
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