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
Thomas Gambier
slapos
Commits
1e02eed1
Commit
1e02eed1
authored
Oct 08, 2013
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resilient stack: add promise for ssh key presence of PBS in root instanec.
parent
d302334c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
13 deletions
+27
-13
stack/resilient/buildout.cfg
stack/resilient/buildout.cfg
+2
-2
stack/resilient/template-parts.cfg.in
stack/resilient/template-parts.cfg.in
+10
-9
stack/resilient/template-replicated.cfg.in
stack/resilient/template-replicated.cfg.in
+15
-2
No files found.
stack/resilient/buildout.cfg
View file @
1e02eed1
...
@@ -67,14 +67,14 @@ mode = 0644
...
@@ -67,14 +67,14 @@ mode = 0644
[template-replicated]
[template-replicated]
recipe = slapos.recipe.download
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template-replicated.cfg.in
url = ${:_profile_base_location_}/template-replicated.cfg.in
md5sum =
e8cf325c87c9b4416a47c14bc68e1bdf
md5sum =
9e236726678d89a5359e1571a91e59e8
mode = 0644
mode = 0644
destination = ${buildout:directory}/template-replicated.cfg.in
destination = ${buildout:directory}/template-replicated.cfg.in
[template-parts]
[template-parts]
recipe = slapos.recipe.download
recipe = slapos.recipe.download
url = ${:_profile_base_location_}/template-parts.cfg.in
url = ${:_profile_base_location_}/template-parts.cfg.in
md5sum =
dcce0e74292eddffde7f9e366d356080
md5sum =
a3f55a20881c3f1ec4416662146c06f7
mode = 0644
mode = 0644
destination = ${buildout:directory}/template-parts.cfg.in
destination = ${buildout:directory}/template-parts.cfg.in
...
...
stack/resilient/template-parts.cfg.in
View file @
1e02eed1
...
@@ -6,18 +6,19 @@
...
@@ -6,18 +6,19 @@
request-{{namebase}}-2
request-{{namebase}}-2
resilient-request-{{namebase}}-public-key-promise
resilient-request-{{namebase}}-public-key-promise
{% for i in range(1,nbbackup|int) %}
{% for i
d
in range(1,nbbackup|int) %}
request-{{namebase}}-pseudo-replicating-{{i}}
request-{{namebase}}-pseudo-replicating-{{i
d
}}
request-{{namebase}}-pseudo-replicating-{{i}}-2
request-{{namebase}}-pseudo-replicating-{{i
d
}}-2
resilient-request-{{namebase}}-pseudo-replicating-{{i}}-public-key-promise
resilient-request-{{namebase}}-pseudo-replicating-{{i
d
}}-public-key-promise
{% endfor %}
{% endfor %}
{% for i in range(1,nbbackup|int) %}
{% for id in range(1,nbbackup|int) %}
request-pbs-{{namebase}}-{{i}}
request-pbs-{{namebase}}-{{id}}
request-pull-backup-server-{{namebase}}-{{i}}
resilient-request-pbs-{{namebase}}-{{id}}-public-key-promise
request-pull-backup-server-{{namebase}}-backup-{{i}}
request-pull-backup-server-{{namebase}}-{{id}}
request-pull-backup-server-{{namebase}}-backup-{{id}}
{% endfor %}
{% endfor %}
{% endmacro %}
{% endmacro %}
stack/resilient/template-replicated.cfg.in
View file @
1e02eed1
...
@@ -131,7 +131,7 @@ recipe = collective.recipe.template
...
@@ -131,7 +131,7 @@ recipe = collective.recipe.template
# XXX: don't use system executable
# XXX: don't use system executable
input = inline:#!/bin/sh
input = inline:#!/bin/sh
PUBLIC_KEY_CONTENT="${request-{{namebase}}-2:connection-ssh-public-key})"
PUBLIC_KEY_CONTENT="${request-{{namebase}}-2:connection-ssh-public-key})"
if [
! -n "$PUBLIC_KEY_CONTENT"
]; then
if [
[ ! -n "$PUBLIC_KEY_CONTENT" -o "$PUBLIC_KEY_CONTENT" == None ]
]; then
exit 1
exit 1
fi
fi
output = ${resilient-directory:promise}/resilient-request-{{namebase}}-public-key
output = ${resilient-directory:promise}/resilient-request-{{namebase}}-public-key
...
@@ -149,7 +149,7 @@ recipe = collective.recipe.template
...
@@ -149,7 +149,7 @@ recipe = collective.recipe.template
# XXX: don't use system executable
# XXX: don't use system executable
input = inline:#!/bin/sh
input = inline:#!/bin/sh
PUBLIC_KEY_CONTENT="${request-{{namebase}}-pseudo-replicating-{{id}}-2:connection-ssh-public-key})"
PUBLIC_KEY_CONTENT="${request-{{namebase}}-pseudo-replicating-{{id}}-2:connection-ssh-public-key})"
if [ ! -n "$PUBLIC_KEY_CONTENT" ]; then
if [ ! -n "$PUBLIC_KEY_CONTENT"
-a "$PUBLIC_KEY_CONTENT" == None
]; then
exit 1
exit 1
fi
fi
output = ${resilient-directory:promise}/resilient-request-{{namebase}}-pseudo-replicating-{{id}}-public-key
output = ${resilient-directory:promise}/resilient-request-{{namebase}}-pseudo-replicating-{{id}}-public-key
...
@@ -200,6 +200,19 @@ sla-{{ key }} = {{ value }}
...
@@ -200,6 +200,19 @@ sla-{{ key }} = {{ value }}
{% endif %}
{% endif %}
{% endif %}
{% endif %}
[resilient-request-pbs-{{namebase}}-{{id}}-public-key-promise]
# Check that public-key-value parameter exists and is not empty
# XXX: maybe we should consider empty values to be non-nexistent.
recipe = collective.recipe.template
# XXX: don't use system executable
input = inline:#!/bin/sh
PUBLIC_KEY_CONTENT="${request-pbs-{{namebase}}-{{id}}:connection-ssh-key}:connection-ssh-key})"
if [ ! -n "$PUBLIC_KEY_CONTENT" -a "$PUBLIC_KEY_CONTENT" == None ]; then
exit 1
fi
output = ${resilient-directory:promise}/resilient-request-{{namebase}}-pseudo-replicating-{{id}}-public-key
mode = 700
[request-pull-backup-server-{{namebase}}-{{id}}]
[request-pull-backup-server-{{namebase}}-{{id}}]
<= request-pbs-common
<= request-pbs-common
...
...
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