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