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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Roque
slapos
Commits
63d74677
Commit
63d74677
authored
Jan 18, 2012
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update Slaprunner recipe to use Git and Dropbear
parent
79c55a10
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
11 deletions
+81
-11
slapos/recipe/slaprunner/__init__.py
slapos/recipe/slaprunner/__init__.py
+12
-5
slapos/recipe/slaprunner/template/slapos.cfg.in
slapos/recipe/slaprunner/template/slapos.cfg.in
+8
-0
software/slaprunner/instance.cfg
software/slaprunner/instance.cfg
+50
-0
software/slaprunner/software.cfg
software/slaprunner/software.cfg
+11
-6
No files found.
slapos/recipe/slaprunner/__init__.py
View file @
63d74677
...
...
@@ -62,17 +62,24 @@ class Recipe(BaseSlapRecipe):
ipv6_address
=
ipv6
,
proxy_host
=
ipv4
,
proxy_port
=
proxy_port
,
proxy_database
=
os
.
path
.
join
(
workdir
,
'proxy.db'
)
proxy_database
=
os
.
path
.
join
(
workdir
,
'proxy.db'
),
git
=
self
.
options
[
'git'
],
ssh_client
=
self
.
options
[
'ssh_client'
],
public_key
=
self
.
options
[
'public_key'
],
private_key
=
self
.
options
[
'private_key'
]
)
config_file
=
self
.
createConfigurationFile
(
'slapos.cfg'
,
self
.
substituteTemplate
(
pkg_resources
.
resource_filename
(
__name__
,
'template/slapos.cfg.in'
),
configuration
))
self
.
path_list
.
append
(
config_file
)
execute_arguments
=
dict
(
path
=
os
.
environ
[
'PATH'
],
launch_args
=
[
self
.
options
[
'slaprunner'
].
strip
(),
config_file
])
environment
=
dict
(
PATH
=
os
.
path
.
dirname
(
self
.
options
[
'git'
])
+
':'
+
os
.
environ
[
'PATH'
],
GIT_SSH
=
self
.
options
[
'ssh_client'
]
)
launch_args
=
[
self
.
options
[
'slaprunner'
].
strip
(),
config_file
,
'--debug'
]
self
.
path_list
.
extend
(
zc
.
buildout
.
easy_install
.
scripts
([(
'slaprunner'
,
'slapos.recipe.
slaprunner.execute'
,
'execut
e'
)],
self
.
ws
,
sys
.
executable
,
self
.
wrapper_directory
,
arguments
=
execute_arguments
))
'slapos.recipe.
librecipe.execute'
,
'execute
e'
)],
self
.
ws
,
sys
.
executable
,
self
.
wrapper_directory
,
arguments
=
[
launch_args
,
environment
]
))
self
.
setConnectionDict
(
dict
(
url
=
'http://[%s]:%s'
%
(
ipv6
,
runner_port
)))
return
self
.
path_list
slapos/recipe/slaprunner/template/slapos.cfg.in
View file @
63d74677
...
...
@@ -23,3 +23,11 @@ ipv6_address = %(ipv6_address)s
host = %(proxy_host)s
port = %(proxy_port)s
database_uri = %(proxy_database)s
[sshkeys_authority]
ssh_client = %(ssh_client)s
public_key = %(public_key)s
private_key = %(private_key)s
[gitclient]
git = %(git)s
software/slaprunner/instance.cfg
View file @
63d74677
[buildout]
parts =
instance
sshkeys-authority
sshkeys-dropbear
dropbear-client
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
...
...
@@ -12,4 +15,51 @@ slapgrid_sr = ${buildout:directory}/bin/slapgrid-sr
slapgrid_cp = ${buildout:directory}/bin/slapgrid-cp
slapproxy = ${buildout:directory}/bin/slapproxy
supervisor = ${buildout:directory}/bin/slapgrid-supervisorctl
git = ${git:location}/bin/git
ssh_client = $${sshkeys-dropbear:wrapper}
public_key = $${sshkeys-dropbear:public-key}
private_key = $${sshkeys-dropbear:private-key}
[sshkeys-directory]
recipe = slapos.cookbook:mkdirectory
requests = $${directory:sshkeys}/requests/
keys = $${directory:sshkeys}/keys/
[sshkeys-authority]
recipe = slapos.cookbook:sshkeys_authority
request-directory = $${sshkeys-directory:requests}
keys-directory = $${sshkeys-directory:keys}
wrapper = $${directory:services}/sshkeys_authority
keygen-binary = ${dropbear:location}/bin/dropbearkey
[sshkeys-dropbear]
<= sshkeys-authority
recipe = slapos.cookbook:sshkeys_authority.request
name = dropbear
type = rsa
executable = $${dropbear-client:wrapper}
public-key = $${dropbear-client:identity-file}.pub
private-key = $${dropbear-client:identity-file}
wrapper = $${rootdirectory:bin}/dbclient
[dropbear-client]
recipe = slapos.cookbook:dropbear.client
dbclient-binary = ${dropbear:location}/bin/dbclient
identity-file = $${directory:ssh}/id_rsa
wrapper = $${rootdirectory:bin}/dbclient_raw
home = $${rootdirectory:etc}/ssh/
force-host-key = True
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/
var = $${buildout:directory}/var/
srv = $${buildout:directory}/srv/
bin = $${buildout:directory}/bin/
[directory]
recipe = slapos.cookbook:mkdirectory
sshkeys = $${rootdirectory:srv}/sshkeys
services = $${rootdirectory:etc}/run/
ssh = $${rootdirectory:etc}/ssh/
software/slaprunner/software.cfg
View file @
63d74677
...
...
@@ -2,11 +2,18 @@
extends =
../../stack/flask.cfg
../../stack/shacache-client.cfg
../../component/dropbear/buildout.cfg
../../component/git/buildout.cfg
develop =
/home/alain/nexedi/slapos.toolbox
/opt/slapdev/
parts =
template
eggs
instance-recipe-egg
dropbear
find-links +=
http://www.nexedi.org/static/packages/source/slapos.buildout/
...
...
@@ -27,7 +34,7 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
mode = 0644
md5sum =
e2cbd8fe7b8e4c7e92a19cd775de0aa6
md5sum =
cd69efd5c3a7e9adca7387b9a401590a
[eggs]
eggs +=
...
...
@@ -37,7 +44,7 @@ eggs +=
[versions]
# Use SlapOS patched zc.buildout
zc.buildout = 1.
5.3-dev-SlapOS-010
zc.buildout = 1.
6.0-dev-SlapOS-003
# Pinned to old version (2.4 does not compile well everywhere)
pycrypto = 2.3
...
...
@@ -48,10 +55,8 @@ apache-libcloud = 0.5.2
buildout-versions = 1.7
hexagonit.recipe.cmmi = 1.5.0
meld3 = 0.6.7
slapos.cookbook = 0.31
slapos.libnetworkcache = 0.10
slapos.recipe.template = 2.2
slapos.toolbox = 0.8
# Required by:
# slapos.core==0.18
...
...
@@ -77,7 +82,7 @@ netaddr = 0.7.6
# Required by:
# slapos.core==0.18
netifaces = 0.
5
netifaces = 0.
6
# Required by:
# slapos.toolbox==0.8
...
...
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