Commit 2772191c authored by Kirill Smelkov's avatar Kirill Smelkov

gitlab: Add helper to set up promise to check something via url

Like with [promise-wrapper] a recipe could do

    [promise-<service>]
    <= promise-byurl
    url     = ...

and a script to check such ur will be generated and automatically put
into etc/promise/<service>.

/cc @kazuhiko, @jerome
parent 5dc6321c
...@@ -326,6 +326,13 @@ tune-command = ...@@ -326,6 +326,13 @@ tune-command =
recipe = slapos.cookbook:wrapper recipe = slapos.cookbook:wrapper
wrapper-path = !py! '${directory:promise}/' + '${:_buildout_section_name_}'[8:] wrapper-path = !py! '${directory:promise}/' + '${:_buildout_section_name_}'[8:]
# [promise-<something>] to check <something> by url
[promise-byurl]
recipe = slapos.cookbook:check_url_available
path = !py! '${directory:promise}/' + '${:_buildout_section_name_}'[8:]
dash_path = {{ bash_bin }}
curl_path = {{ curl_bin }}
http_code = 200
......
...@@ -30,7 +30,9 @@ context = ...@@ -30,7 +30,9 @@ context =
raw gitlab_shell_repository_location ${gitlab-shell-repository:location} raw gitlab_shell_repository_location ${gitlab-shell-repository:location}
# program binaries # program binaries
raw bash_bin ${bash:location}/bin/bash
raw bundler_4gitlab ${bundler-4gitlab:bundle} raw bundler_4gitlab ${bundler-4gitlab:bundle}
raw curl_bin ${curl:location}/bin/curl
raw dcron_bin ${dcron-output:crond} raw dcron_bin ${dcron-output:crond}
raw git ${git:location}/bin/git raw git ${git:location}/bin/git
raw gunzip_bin ${gzip:location}/bin/gunzip raw gunzip_bin ${gzip:location}/bin/gunzip
......
...@@ -14,6 +14,8 @@ extends = ...@@ -14,6 +14,8 @@ extends =
../../component/nginx/buildout.cfg ../../component/nginx/buildout.cfg
# for instance # for instance
../../component/bash/buildout.cfg
../../component/curl/buildout.cfg
../../component/gzip/buildout.cfg ../../component/gzip/buildout.cfg
../../component/dcron/buildout.cfg ../../component/dcron/buildout.cfg
../../component/logrotate/buildout.cfg ../../component/logrotate/buildout.cfg
...@@ -39,6 +41,8 @@ parts = ...@@ -39,6 +41,8 @@ parts =
slapos-cookbook slapos-cookbook
eggs eggs
bash
curl
gzip gzip
dcron-output dcron-output
logrotate logrotate
......
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