slapos-in-partition SR: Add slapos promise.

parent edb2302e
...@@ -16,7 +16,10 @@ parts = ...@@ -16,7 +16,10 @@ parts =
dropbear-server-add-authorized-key dropbear-server-add-authorized-key
sshkeys-authority sshkeys-authority
publish-connection-informations publish-connection-informations
dropbear-promise dropbear-promise
httpd-promise
slapos-promise
eggs-directory = {{ eggs_directory }} eggs-directory = {{ eggs_directory }}
...@@ -184,23 +187,6 @@ wrapper-path = ${directory:service}/httpd ...@@ -184,23 +187,6 @@ wrapper-path = ${directory:service}/httpd
# generated parameter containing url to use for other sections # generated parameter containing url to use for other sections
url = http://[${httpd-configuration-file:listening-ip}]/ url = http://[${httpd-configuration-file:listening-ip}]/
#[httpd-wrapper]
#recipe = collective.recipe.template
#input = inline:
# #!${buildout:executable}
# import SimpleHTTPServer
# import SocketServer
# PORT = ${:listening-port}
# LISTENING_IP = '${:listening-ip}'
# Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
# httpd = SocketServer.TCPServer((LISTENING_IP, PORT), Handler)
# print "serving at port", PORT
# httpd.serve_forever()
#output = ${directory:service}/httpd
#listening-ip = ${instance-parameter:ipv6-random}
#listening-port = 8080
#mode = 755
######### #########
# Deploy logrotate # Deploy logrotate
...@@ -341,3 +327,16 @@ path = ${directory:promises}/dropbear ...@@ -341,3 +327,16 @@ path = ${directory:promises}/dropbear
hostname = ${dropbear-server:host} hostname = ${dropbear-server:host}
port = ${dropbear-server:port} port = ${dropbear-server:port}
[httpd-promise]
recipe = slapos.cookbook:check_port_listening
path = ${directory:promises}/httpd
hostname = ${httpd-configuration-file:listening-ip}
port = ${httpd-configuration-file:listening-port}
[slapos-promise]
recipe = collective.recipe.template
input = inline:#!/{{ bash_executable }}
{{ bin_directory }}/slapgrid-supervisorctl ${slapos-configuration-file:output} status watchdog | grep RUNNING
output = ${directory:promises}/slapos
mode = 0700
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