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
033eb157
Commit
033eb157
authored
May 30, 2013
by
Cédric Le Ninivin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce basic resiliency for slaprunner
parent
93c590d6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
111 additions
and
5 deletions
+111
-5
software/slaprunner/common.cfg
software/slaprunner/common.cfg
+33
-2
software/slaprunner/instance-resilient.cfg.jinja2
software/slaprunner/instance-resilient.cfg.jinja2
+28
-0
software/slaprunner/instance-runner-export.cfg.in
software/slaprunner/instance-runner-export.cfg.in
+24
-0
software/slaprunner/instance-runner-import.cfg.in
software/slaprunner/instance-runner-import.cfg.in
+16
-0
software/slaprunner/instance.cfg
software/slaprunner/instance.cfg
+8
-1
software/slaprunner/software.cfg
software/slaprunner/software.cfg
+2
-2
No files found.
software/slaprunner/common.cfg
View file @
033eb157
...
...
@@ -5,8 +5,10 @@ extends =
../../component/dropbear/buildout.cfg
../../component/git/buildout.cfg
../../component/lxml-python/buildout.cfg
../../component/rsync/buildout.cfg
../../stack/flask.cfg
../../stack/shacache-client.cfg
../../stack/resilient/buildout.cfg
../../stack/slapos.cfg
parts =
...
...
@@ -14,18 +16,47 @@ parts =
slapos-cookbook
eggs
instance-runner-import
instance-runner-export
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
mode = 0644
md5sum = 5307e4200f044ae57b504ad68444491c
#
md5sum = 5307e4200f044ae57b504ad68444491c
[template-runner]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner.cfg
output = ${buildout:directory}/template-runner.cfg
md5sum = 91d6550c43b7a43a999724af4650ae40
#md5sum = 91d6550c43b7a43a999724af4650ae40
mode = 0644
[instance-resilient]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/instance-resilient.cfg.jinja2
rendered = ${buildout:directory}/instance-resilient.cfg
context = key buildout buildout:bin-directory
key develop_eggs_directory buildout:develop-eggs-directory
key eggs_directory buildout:eggs-directory
import-list = file parts template-parts:destination
file replicated template-replicated:destination
mode = 0644
[instance-runner-import]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner-import.cfg.in
output = ${buildout:directory}/instance-runner-import.cfg
mode = 0644
[instance-runner-export]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner-export.cfg.in
output = ${buildout:directory}/instance-runner-export.cfg
mode = 0644
[eggs]
...
...
software/slaprunner/instance-resilient.cfg.jinja2
0 → 100644
View file @
033eb157
# vim: set ft=cfg:
{% import 'parts' as parts %}
{% import 'replicated' as replicated %}
[buildout]
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
# += because we need to take up parts (like instance-custom, slapmonitor etc) from the profile we extended
parts +=
{{ parts.replicate("runner", "3") }}
publish-connection-informations
{{ replicated.replicate("runner", "3", "runner-export", "runner-import") }}
# Bubble up the parameters
[request-runner]
return = url ssh-public-key ssh-url notification-id ip backend_url url cloud9_url ssh_command password_recovery_code
[publish-connection-informations]
recipe = slapos.cookbook:publish
backend_url = ${request-runner:connection-backend_url}
url = ${request-runner:connection-url}
cloud9_url = ${request-runner:connection-cloud9_url}
ssh_command = ${request-runner:connection-ssh_command}
password_recovery_code = ${request-runner:connection-password_recovery_code}
software/slaprunner/instance-runner-export.cfg.in
0 → 100644
View file @
033eb157
[buildout]
extends = ${template-runner:output}
${pbsready-export:output}
parts +=
urls
slaprunner
cron-entry-backup
[exporter]
recipe = slapos.cookbook:slaprunner.export
wrapper = $${directory:bin}/$${slap-parameter:namebase}-exporter
srv-directory = $${directory:srv}
backup-directory = $${directory:backup}
shell-binary = ${dash:location}/bin/dash
# Extends publish section with resilient parameters
[urls]
<= resilient-publish-connection-parameter
backend_url = $${slaprunner:access-url}
url = $${request-frontend:connection-site_url}
cloud9_url = $${cloud9:access-url}
ssh_command = ssh $${dropbear-server:host} -p $${dropbear-server:port}
password_recovery_code = $${recovery-code:passwd}
software/slaprunner/instance-runner-import.cfg.in
0 → 100644
View file @
033eb157
[buildout]
extends = ${template-runner:output}
${pbsready-import:output}
parts +=
slaprunner
# have to repeat the next one, as it's not inherited from pbsready-import
import-on-notification
[importer]
recipe = slapos.cookbook:slaprunner.import
wrapper = $${directory:bin}/$${slap-parameter:namebase}-exporter
srv-directory = $${directory:srv}
backup-directory = $${directory:backup}
shell-binary = ${dash:location}/bin/dash
\ No newline at end of file
software/slaprunner/instance.cfg
View file @
033eb157
...
...
@@ -8,4 +8,11 @@ offline = true
[switch_softwaretype]
recipe = slapos.cookbook:softwaretype
default = ${template-runner:output}
\ No newline at end of file
default = ${template-runner:output}
resilient = ${instance-resilient:rendered}
runner = ${template-runner:output}
runner-import = ${instance-runner-import:output}
runner-export = ${instance-runner-export:output}
frozen = ${instance-frozen:output}
pull-backup = ${template-pull-backup:output}
software/slaprunner/software.cfg
View file @
033eb157
...
...
@@ -5,7 +5,7 @@
# 2/ Define list of trusted certificates for the cache.
[buildout]
extends =
common
.cfg
extends =
development
.cfg
[networkcache]
# signature certificates of the following uploaders.
...
...
@@ -57,7 +57,7 @@ plone.recipe.command = 1.1
pycrypto = 2.6
pytz = 2012j
slapos.cookbook = 0.71.1
slapos.core = 0.3
4
slapos.core = 0.3
5.1
slapos.libnetworkcache = 0.13.4
slapos.recipe.build = 0.11.5
slapos.recipe.template = 2.4.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