Commit 22b9b752 authored by Iliya Manolov's avatar Iliya Manolov

Added the new script to the software release.

parent 50d5e186
...@@ -19,7 +19,7 @@ md5sum = 78e4c796b15a9c5b9b41c79a3c995ee7 ...@@ -19,7 +19,7 @@ md5sum = 78e4c796b15a9c5b9b41c79a3c995ee7
[template-runner] [template-runner]
filename = instance-runner.cfg filename = instance-runner.cfg
md5sum = c76c66c331f1f0d9f416c56ead53e804 md5sum = 19b6b17d5fa73dd1a61bf19732b68f03
[template-runner-import-script] [template-runner-import-script]
filename = template/runner-import.sh.jinja2 filename = template/runner-import.sh.jinja2
...@@ -35,7 +35,7 @@ md5sum = 02023f89b622c49aee42130f839846a7 ...@@ -35,7 +35,7 @@ md5sum = 02023f89b622c49aee42130f839846a7
[instance-runner-export] [instance-runner-export]
filename = instance-runner-export.cfg.in filename = instance-runner-export.cfg.in
md5sum = 22a5dfe9bfc8533f8eab851e0996a6d7 md5sum = 17f73015e0447e92d15d6fbc198297e5
[template-resilient] [template-resilient]
filename = instance-resilient.cfg.jinja2 filename = instance-resilient.cfg.jinja2
...@@ -80,3 +80,7 @@ md5sum = acaac32cf1bd45714272468a89f4f119 ...@@ -80,3 +80,7 @@ md5sum = acaac32cf1bd45714272468a89f4f119
[template-resilient-software-release-information] [template-resilient-software-release-information]
filename = template/resilient_software_release_information.py.in filename = template/resilient_software_release_information.py.in
md5sum = 2451072826a9ad9425d62c9e9c7f6284 md5sum = 2451072826a9ad9425d62c9e9c7f6284
[template-slapuser-script]
filename = template/slapos-slapuser-script.in
md5sum = becafae59ab9973724e0edb238f4cb7a
...@@ -34,6 +34,7 @@ common-parts = ...@@ -34,6 +34,7 @@ common-parts =
instance-runner-import instance-runner-import
instance-runner-export instance-runner-export
template-slapos-cfg template-slapos-cfg
template-slapuser-script
# XXX: we have to manually add this for resilience # XXX: we have to manually add this for resilience
rdiff-backup rdiff-backup
pbs-recipe-egg pbs-recipe-egg
...@@ -137,6 +138,11 @@ filename = monitor-check-webrunner-internal-instances.py ...@@ -137,6 +138,11 @@ filename = monitor-check-webrunner-internal-instances.py
< = template-download-base < = template-download-base
filename = resilient_software_release_information.py.in filename = resilient_software_release_information.py.in
[template-slapuser-script]
< = template-download-base
destination = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = slapos-slapuser-script.in
[eggs] [eggs]
recipe = zc.recipe.egg recipe = zc.recipe.egg
eggs = eggs =
......
...@@ -36,6 +36,7 @@ parts += ...@@ -36,6 +36,7 @@ parts +=
monitor-base monitor-base
monitor-check-resilient-feed-file monitor-check-resilient-feed-file
monitor-check-webrunner-internal-instance monitor-check-webrunner-internal-instance
template-slapuser-script
[proxy-free-port] [proxy-free-port]
recipe = slapos.cookbook:free_port recipe = slapos.cookbook:free_port
...@@ -104,3 +105,13 @@ context = ...@@ -104,3 +105,13 @@ context =
key monitor_feed_directory monitor-directory:public key monitor_feed_directory monitor-directory:public
raw base_url http://[${notifier:host}]:${notifier:port}/get/ raw base_url http://[${notifier:host}]:${notifier:port}/get/
raw python_executable ${buildout:executable} raw python_executable ${buildout:executable}
## Slapuser slapos command script
[template-slapuser-script]
recipe = slapos.recipe.template:jinja2
template = ${buildout:parts-directory}/template-slapuser-script/slapos-slapuser-script.in
rendered = $${buildout:bin-directory}/slapos
mode = 0744
context =
raw config_location $${slapos-cfg:rendered}
raw slapos_python_file_location ${buildout:bin-directory}/slapos
...@@ -38,6 +38,8 @@ parts = ...@@ -38,6 +38,8 @@ parts =
## Monitoring part ## Monitoring part
monitor-base monitor-base
monitor-check-webrunner-internal-instance monitor-check-webrunner-internal-instance
## Usability part
template-slapuser-script
extends = ${monitor2-template:rendered} extends = ${monitor2-template:rendered}
...@@ -816,3 +818,12 @@ rendered = $${monitor-directory:reports}/$${:filename} ...@@ -816,3 +818,12 @@ rendered = $${monitor-directory:reports}/$${:filename}
filename = monitor-check-webrunner-internal-instance filename = monitor-check-webrunner-internal-instance
mode = 0744 mode = 0744
## Slapuser slapos command script
[template-slapuser-script]
recipe = slapos.recipe.template:jinja2
template = ${buildout:parts-directory}/template-slapuser-script/slapos-slapuser-script.in
rendered = $${buildout:bin-directory}/slapos
mode = 0744
context =
raw config_location $${slapos-cfg:rendered}
raw slapos_python_file_location ${buildout:bin-directory}/slapos
#!/bin/sh
# run slapos command inside slaprunner with appropriate config
SLAPOS_CONFIGURATION={{ config_location }} \
SLAPOS_CLIENT_CONFIGURATION=$SLAPOS_CONFIGURATION \
exec {{ slapos_python_file_location }} "$@"
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