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
Lu Xu
slapos
Commits
a982699b
Commit
a982699b
authored
Sep 21, 2012
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add recipe and update SR for webrunner test
parent
6f92c092
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
104 deletions
+90
-104
setup.py
setup.py
+1
-0
slapos/recipe/slaprunner/__init__.py
slapos/recipe/slaprunner/__init__.py
+65
-0
software/slaprunner/instance-runner.cfg
software/slaprunner/instance-runner.cfg
+19
-1
software/slaprunner/software.cfg
software/slaprunner/software.cfg
+5
-103
No files found.
setup.py
View file @
a982699b
...
@@ -126,6 +126,7 @@ setup(name=name,
...
@@ -126,6 +126,7 @@ setup(name=name,
'slapmonitor = slapos.recipe.slapmonitor:Recipe'
,
'slapmonitor = slapos.recipe.slapmonitor:Recipe'
,
'slapreport = slapos.recipe.slapreport:Recipe'
,
'slapreport = slapos.recipe.slapreport:Recipe'
,
'slaprunner = slapos.recipe.slaprunner:Recipe'
,
'slaprunner = slapos.recipe.slaprunner:Recipe'
,
'slaprunner.test = slapos.recipe.slaprunner:Test'
,
'softwaretype = slapos.recipe.softwaretype:Recipe'
,
'softwaretype = slapos.recipe.softwaretype:Recipe'
,
'sphinx= slapos.recipe.sphinx:Recipe'
,
'sphinx= slapos.recipe.sphinx:Recipe'
,
'sshkeys_authority.request = slapos.recipe.sshkeys_authority:Request'
,
'sshkeys_authority.request = slapos.recipe.sshkeys_authority:Request'
,
...
...
slapos/recipe/slaprunner/__init__.py
View file @
a982699b
...
@@ -93,3 +93,68 @@ class Recipe(GenericBaseRecipe):
...
@@ -93,3 +93,68 @@ class Recipe(GenericBaseRecipe):
path_list
.
append
(
wrapper
)
path_list
.
append
(
wrapper
)
return
path_list
return
path_list
class
Test
(
GenericBaseRecipe
):
def
_options
(
self
,
options
):
self
.
ipv4
=
options
[
'ipv4'
].
strip
()
self
.
ipv6
=
options
[
'ipv6'
].
strip
()
self
.
proxy_port
=
options
[
'proxy_port'
].
strip
()
self
.
runner_port
=
options
[
'runner_port'
].
strip
()
self
.
workdir
=
options
[
'working-directory'
].
strip
()
self
.
software_directory
=
options
[
'software-directory'
].
strip
()
self
.
instance_directory
=
options
[
'instance-directory'
].
strip
()
self
.
partition_amount
=
options
[
'partition-amount'
].
strip
()
self
.
cloud9_url
=
options
[
'cloud9-url'
].
strip
()
# Set slaprunner access URL
options
[
'access-url'
]
=
'http://[%s]:%s'
%
(
self
.
ipv6
,
self
.
runner_port
)
def
install
(
self
):
path_list
=
[]
configuration
=
dict
(
software_root
=
self
.
software_directory
,
instance_root
=
self
.
instance_directory
,
master_url
=
'http://%s:%s/'
%
(
self
.
ipv4
,
self
.
proxy_port
),
computer_id
=
'slaprunner'
,
partition_amount
=
self
.
partition_amount
,
slapgrid_sr
=
self
.
options
[
'slapgrid_sr'
],
slapgrid_cp
=
self
.
options
[
'slapgrid_cp'
],
slapproxy
=
self
.
options
[
'slapproxy'
],
supervisor
=
self
.
options
[
'supervisor'
],
supervisord_config
=
os
.
path
.
join
(
self
.
instance_directory
,
'etc'
,
'supervisord.conf'
),
runner_workdir
=
self
.
workdir
,
etc_dir
=
self
.
options
[
'etc_dir'
],
runner_host
=
self
.
ipv6
,
runner_port
=
self
.
runner_port
,
ipv4_address
=
self
.
ipv4
,
ipv6_address
=
self
.
ipv6
,
proxy_host
=
self
.
ipv4
,
proxy_port
=
self
.
proxy_port
,
proxy_database
=
os
.
path
.
join
(
self
.
workdir
,
'proxy.db'
),
git
=
self
.
options
[
'git-binary'
],
ssh_client
=
self
.
options
[
'ssh_client'
],
public_key
=
self
.
options
[
'public_key'
],
private_key
=
self
.
options
[
'private_key'
],
cloud9_url
=
self
.
cloud9_url
)
config_file
=
self
.
createFile
(
self
.
options
[
'slapos.cfg'
],
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'slapos.cfg.in'
),
configuration
))
path_list
.
append
(
config_file
)
environment
=
dict
(
PATH
=
os
.
path
.
dirname
(
self
.
options
[
'git-binary'
])
+
':'
+
os
.
environ
[
'PATH'
],
GIT_SSH
=
self
.
options
[
'ssh_client'
],
CONFIG_FILE_PATH
=
config_file
)
launch_args
=
[
self
.
options
[
'slaprunnertest'
].
strip
()]
wrapper
=
self
.
createPythonScript
(
self
.
options
[
'wrapper'
],
'slapos.recipe.librecipe.execute.executee'
,
(
launch_args
,
environment
)
)
path_list
.
append
(
wrapper
)
return
path_list
software/slaprunner/instance-runner.cfg
View file @
a982699b
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
parts =
parts =
cloud9
cloud9
slaprunner
slaprunner
test-runner
sshkeys-dropbear
sshkeys-dropbear
dropbear-server-add-authorized-key
dropbear-server-add-authorized-key
sshkeys-authority
sshkeys-authority
...
@@ -38,13 +39,18 @@ services = $${rootdirectory:etc}/run/
...
@@ -38,13 +39,18 @@ services = $${rootdirectory:etc}/run/
run = $${rootdirectory:var}/run/
run = $${rootdirectory:var}/run/
backup = $${rootdirectory:srv}/backup/
backup = $${rootdirectory:srv}/backup/
promises = $${rootdirectory:etc}/promise/
promises = $${rootdirectory:etc}/promise/
test = $${rootdirectory:etc}/test/
[runnerdirectory]
[runnerdirectory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
home = $${rootdirectory:srv}/runner/
home = $${rootdirectory:srv}/runner/
test = $${rootdirectory:srv}/test/
project = $${:home}/project
project = $${:home}/project
software-root = $${:home}/software
software-root = $${:home}/software
instance-root = $${:home}/instance
instance-root = $${:home}/instance
project-test = $${:test}/project
software-test = $${:test}/software
instance-test = $${:test}/instance
#Create password recovery code for slaprunner
#Create password recovery code for slaprunner
[recovery-code]
[recovery-code]
...
@@ -95,6 +101,18 @@ recipe = slapos.cookbook:mkdirectory
...
@@ -95,6 +101,18 @@ recipe = slapos.cookbook:mkdirectory
requests = $${directory:sshkeys}/requests/
requests = $${directory:sshkeys}/requests/
keys = $${directory:sshkeys}/keys/
keys = $${directory:sshkeys}/keys/
[test-runner]
<= slaprunner
recipe = slapos.cookbook:slaprunner.test
slaprunnertest = ${buildout:directory}/bin/slaprunnertest
slapos.cfg = $${rootdirectory:etc}/slapos-test.cfg
working-directory = $${runnerdirectory:test}
project-directory = $${runnerdirectory:project-test}
software-directory = $${runnerdirectory:software-test}
instance-directory = $${runnerdirectory:instance-test}
wrapper = $${rootdirectory:bin}/slaprunner-test
etc_dir = $${basedirectory:test}
[sshkeys-authority]
[sshkeys-authority]
recipe = slapos.cookbook:sshkeys_authority
recipe = slapos.cookbook:sshkeys_authority
request-directory = $${sshkeys-directory:requests}
request-directory = $${sshkeys-directory:requests}
...
...
software/slaprunner/software.cfg
View file @
a982699b
[buildout]
[buildout]
develop =
/srv/slapgrid/slappart19/srv//runner/project/slapos
/srv/slapgrid/slappart19/srv//runner/project/slapos.toolbox
extends =
extends =
../../stack/slapos.cfg
../../stack/slapos.cfg
../../stack/flask.cfg
../../stack/flask.cfg
...
@@ -25,7 +29,7 @@ md5sum = 5307e4200f044ae57b504ad68444491c
...
@@ -25,7 +29,7 @@ md5sum = 5307e4200f044ae57b504ad68444491c
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner.cfg
url = ${:_profile_base_location_}/instance-runner.cfg
output = ${buildout:directory}/template-runner.cfg
output = ${buildout:directory}/template-runner.cfg
md5sum =
b57ebff565595fa92cd7d5adc6a22c7e
md5sum =
2f19b2e799ea8cf66c67ac25e283ed48
mode = 0644
mode = 0644
[eggs]
[eggs]
...
@@ -53,105 +57,3 @@ signature-certificate-list =
...
@@ -53,105 +57,3 @@ signature-certificate-list =
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
If1a2ZoqHRxoNo2yTmm7TSYRORWVS+vvfjY=
-----END CERTIFICATE-----
-----END CERTIFICATE-----
[versions]
Flask-Auth = 0.8
Jinja2 = 2.6
Werkzeug = 0.8.3
apache-libcloud = 0.11.1
async = 0.6.1
buildout-versions = 1.7
gitdb = 0.5.4
hexagonit.recipe.cmmi = 1.6
meld3 = 0.6.8
plone.recipe.command = 1.1
pycrypto = 2.6
slapos.cookbook = 0.64.2
slapos.libnetworkcache = 0.13.2
slapos.recipe.build = 0.11
slapos.recipe.template = 2.4.2
slapos.toolbox = 0.30
smmap = 0.8.2
z3c.recipe.scripts = 1.0.1
# Required by:
# slapos.core==0.30
# slapos.toolbox==0.30
Flask = 0.9
# Required by:
# slapos.toolbox==0.30
GitPython = 0.3.2.RC1
# Required by:
# slapos.cookbook==0.64.2
PyXML = 0.8.4
# Required by:
# slapos.toolbox==0.30
atomize = 0.1.1
# Required by:
# slapos.toolbox==0.30
feedparser = 5.1.2
# Required by:
# hexagonit.recipe.cmmi==1.6
hexagonit.recipe.download = 1.5.1
# Required by:
# slapos.cookbook==0.64.2
inotifyx = 0.2.0
# Required by:
# slapos.core==0.30
# slapos.toolbox==0.30
# xml-marshaller==0.9.7
lxml = 3.0alpha2
# Required by:
# slapos.cookbook==0.64.2
netaddr = 0.7.9
# Required by:
# slapos.core==0.30
netifaces = 0.8
# Required by:
# slapos.toolbox==0.30
paramiko = 1.7.7.2
# Required by:
# slapos.toolbox==0.30
psutil = 0.6.1
# Required by:
# slapos.cookbook==0.64.2
# slapos.core==0.30
# slapos.libnetworkcache==0.13.2
# slapos.toolbox==0.30
# supervisor==3.0a12
# zc.buildout==1.6.0-dev-SlapOS-007
# zc.recipe.egg==1.3.2
# zope.interface==4.0.1
setuptools = 0.6c12dev-r88846
# Required by:
# slapos.cookbook==0.64.2
slapos.core = 0.30
# Required by:
# slapos.core==0.30
supervisor = 3.0a12
# Required by:
# slapos.cookbook==0.64.2
xml-marshaller = 0.9.7
# Required by:
# slapos.cookbook==0.64.2
zc.recipe.egg = 1.3.2
# Required by:
# slapos.core==0.30
zope.interface = 4.0.1
pe.egg = 1.3.2
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