slapos-in-partition SR: add slapos node format script simulating a node.

Will retry format until it works.
parent a936d259
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
parts = parts =
slapos-configuration-file slapos-configuration-file
cron-entry-slapos cron-entry-slapos
slapos-node-format-wrapper slapos-node-format-wrapper-script
httpd-wrapper httpd-wrapper
...@@ -45,7 +45,7 @@ bin = ${buildout:directory}/bin/ ...@@ -45,7 +45,7 @@ bin = ${buildout:directory}/bin/
sshkeys = ${:srv}/sshkeys sshkeys = ${:srv}/sshkeys
service = ${:etc}/service/ service = ${:etc}/service/
scripts = ${:etc}/run/ script = ${:etc}/run/
ssh = ${:etc}/ssh/ ssh = ${:etc}/ssh/
log = ${:var}/log/ log = ${:var}/log/
run = ${:var}/run/ run = ${:var}/run/
...@@ -114,30 +114,42 @@ computer-key-file = ${slapos-computer-key-file:output} ...@@ -114,30 +114,42 @@ computer-key-file = ${slapos-computer-key-file:output}
computer-certificate-file = ${slapos-computer-certificate-file:output} computer-certificate-file = ${slapos-computer-certificate-file:output}
certificate-repository-path = ${directory:slapos-partitions-certificate-repository} certificate-repository-path = ${directory:slapos-partitions-certificate-repository}
[slapos-node-format-wrapper]
recipe = slapos.cookbook:wrapper
command-line = {{ bin_directory }}/slapos node format --cfg ${slapos-configuration-file:output} --logfile=${directory:slapos-log}/slapos-node-format.log --now
wrapper-path = ${directory:scripts}/slapos-node-format
parameters-extra = true
[slapos-node-instance-wrapper] [slapos-node-instance-wrapper]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = {{ bin_directory }}/slapos node instance --cfg ${slapos-configuration-file:output} --pidfile ${directory:run}/slapos-instance.pid --logfile ${directory:slapos-log}/slapos-instance.cfg command-line = {{ bin_directory }}/slapos node instance --cfg ${slapos-configuration-file:output} --pidfile ${directory:run}/slapos-instance.pid --logfile ${directory:slapos-log}/slapos-instance.cfg
wrapper-path = ${buildout:bin-directory}/slapos-node-instance wrapper-path = ${directory:bin}/slapos-node-instance
parameters-extra = true parameters-extra = true
[slapos-node-software-wrapper] [slapos-node-software-wrapper]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = {{ bin_directory }}/slapos node software --cfg ${slapos-configuration-file:output} --pidfile ${directory:run}/slapos-software.pid --logfile ${directory:slapos-log}/slapos-software.cfg command-line = {{ bin_directory }}/slapos node software --cfg ${slapos-configuration-file:output} --pidfile ${directory:run}/slapos-software.pid --logfile ${directory:slapos-log}/slapos-software.cfg
wrapper-path = ${buildout:bin-directory}/slapos-node-software wrapper-path = ${directory:bin}/slapos-node-software
parameters-extra = true parameters-extra = true
[slapos-node-report-wrapper] [slapos-node-report-wrapper]
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
command-line = {{ bin_directory }}/slapos node report --cfg ${slapos-configuration-file:output} --pidfile ${directory:run}/slapos-report.pid --logfile ${directory:slapos-log}/slapos-report.cfg command-line = {{ bin_directory }}/slapos node report --cfg ${slapos-configuration-file:output} --pidfile ${directory:run}/slapos-report.pid --logfile ${directory:slapos-log}/slapos-report.cfg
wrapper-path = ${buildout:bin-directory}/slapos-node-report wrapper-path = ${directory:bin}/slapos-node-report
parameters-extra = true parameters-extra = true
[slapos-node-format-wrapper]
recipe = slapos.cookbook:wrapper
command-line = {{ bin_directory }}/slapos node format --cfg ${slapos-configuration-file:output} --logfile=${directory:slapos-log}/slapos-node-format.log --now
wrapper-path = ${directory:bin}/slapos-node-format
parameters-extra = true
[slapos-node-format-wrapper-script]
# Create a wrapper of the wrapper in etc/run
recipe = collective.recipe.template
input = inline:#!{{ bash_executable }}
false
while [ ! $? -eq 0 ]; do
${slapos-node-format-wrapper:wrapper-path}
done
output = ${directory:script}/slapos-node-format
mode = 700
######### #########
# Deploy some http server to see logs online # Deploy some http server to see logs online
######### #########
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment