Commit 1cec44c1 authored by Xavier Thompson's avatar Xavier Thompson

stack/erp5: Add mariadb bootstrap server promise

parent 06ed999a
......@@ -26,7 +26,7 @@ md5sum = d10b8e35b02b5391cf46bf0c7dbb1196
[template-mariadb]
filename = instance-mariadb.cfg.in
md5sum = 07a1688916b7f3fac55a71fce0ee80e5
md5sum = 023c9d7bb40ed55e2d760d4381760819
[template-kumofs]
filename = instance-kumofs.cfg.in
......
......@@ -204,10 +204,18 @@ environ =
{%- endfor %}
[{{ section('mariadb-backup-static-server-promise') }}]
<= monitor-promise-base
promise = check_socket_listening
name = mariadb_replication_bootstrap_static_server.py
config-host = ${mariadb-backup-static-http-server:ip}
config-port = ${mariadb-backup-static-http-server:port}
[{{ section('mariadb-backup-static-http-server') }}]
recipe = slapos.recipe.template
output = ${directory:services}/${:_buildout_section_name_}
port = {{ port - 1 }}
ip = {{ ip }}
bootstrap-url = http://{{ ip_as_host }}:${:port}/${mariadb-backup-script:most-recent}
inline =
#!${buildout:executable}
......@@ -220,7 +228,7 @@ inline =
{%- endif %}
daemon_threads = True
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
ip = {{ repr(ip) }}
ip = '${:ip}'
port = ${:port}
os.chdir("${directory:mariadb-backup-full}")
Server((ip, port), Handler).serve_forever()
......
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