Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
slapos
Commits
83fabe53
Commit
83fabe53
authored
May 29, 2020
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repman: allow to connect to proxysql with IPv6 and publish v6 cluster_database_list parameters
parent
f9bd4d13
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
62 additions
and
23 deletions
+62
-23
software/repman/buildout.hash.cfg
software/repman/buildout.hash.cfg
+6
-6
software/repman/instance-mariadb.cfg.jinja2.in
software/repman/instance-mariadb.cfg.jinja2.in
+4
-1
software/repman/instance-repman.cfg.jinja2.in
software/repman/instance-repman.cfg.jinja2.in
+23
-4
software/repman/templates/cluster-config.toml.in
software/repman/templates/cluster-config.toml.in
+4
-2
software/repman/templates/init_root_wrapper.in
software/repman/templates/init_root_wrapper.in
+1
-1
software/repman/templates/mariadb_init_root.sql.in
software/repman/templates/mariadb_init_root.sql.in
+12
-6
software/repman/templates/repman-manager.sh.in
software/repman/templates/repman-manager.sh.in
+12
-3
No files found.
software/repman/buildout.hash.cfg
View file @
83fabe53
...
@@ -18,7 +18,7 @@ md5sum = b41f521b5f7980c64260ed0e5c494450
...
@@ -18,7 +18,7 @@ md5sum = b41f521b5f7980c64260ed0e5c494450
[instance-repman.cfg]
[instance-repman.cfg]
_update_hash_filename_ = instance-repman.cfg.jinja2.in
_update_hash_filename_ = instance-repman.cfg.jinja2.in
md5sum = 7
f486e429f8c2e95d28d79748a0122d1
md5sum = 7
dbaace0d7db0e26d582ad17f36ac9cd
[config-toml.in]
[config-toml.in]
_update_hash_filename_ = templates/config.toml.in
_update_hash_filename_ = templates/config.toml.in
...
@@ -26,7 +26,7 @@ md5sum = 5cfa75ca5a0048a050c0041dfe541f3d
...
@@ -26,7 +26,7 @@ md5sum = 5cfa75ca5a0048a050c0041dfe541f3d
[config-cluster-toml.in]
[config-cluster-toml.in]
_update_hash_filename_ = templates/cluster-config.toml.in
_update_hash_filename_ = templates/cluster-config.toml.in
md5sum =
9be37f86d0fad81cc13e64c5a0557c59
md5sum =
d2e79a9435082d9420281b4f59a5d464
[nginx.conf.in]
[nginx.conf.in]
_update_hash_filename_ = templates/nginx.conf.in
_update_hash_filename_ = templates/nginx.conf.in
...
@@ -34,7 +34,7 @@ md5sum = 0eeb24c6aa0760f0d33c4cc2828ddf30
...
@@ -34,7 +34,7 @@ md5sum = 0eeb24c6aa0760f0d33c4cc2828ddf30
[template-mariadb.cfg]
[template-mariadb.cfg]
_update_hash_filename_ = instance-mariadb.cfg.jinja2.in
_update_hash_filename_ = instance-mariadb.cfg.jinja2.in
md5sum =
b750f9ea573128a77ee6292048392844
md5sum =
189ccee60d0fb53e29431a45e0816bc1
[template-my-cnf]
[template-my-cnf]
_update_hash_filename_ = templates/my.cnf.in
_update_hash_filename_ = templates/my.cnf.in
...
@@ -46,15 +46,15 @@ md5sum = 9be53e2e92333b93e92556b8a01d9c42
...
@@ -46,15 +46,15 @@ md5sum = 9be53e2e92333b93e92556b8a01d9c42
[mariadb-init-root-sql]
[mariadb-init-root-sql]
_update_hash_filename_ = templates/mariadb_init_root.sql.in
_update_hash_filename_ = templates/mariadb_init_root.sql.in
md5sum =
864d419ea506c9ac543409ba7abb22b0
md5sum =
d927b5d36410bb02717d5ca125525785
[init-root-wrapper-in]
[init-root-wrapper-in]
_update_hash_filename_ = templates/init_root_wrapper.in
_update_hash_filename_ = templates/init_root_wrapper.in
md5sum =
49c328bd61eea74d9fb009f6f1561eaf
md5sum =
83ef59b5afaf4454d368823c33aef9cb
[repman-manager-sh.in]
[repman-manager-sh.in]
_update_hash_filename_ = templates/repman-manager.sh.in
_update_hash_filename_ = templates/repman-manager.sh.in
md5sum =
94b14f5f5cf87bd9fb3aaa8d12a199b
4
md5sum =
50503bec392e31126328f51eadc1163
4
[dbjobs-in]
[dbjobs-in]
_update_hash_filename_ = templates/dbjobs.in
_update_hash_filename_ = templates/dbjobs.in
...
...
software/repman/instance-mariadb.cfg.jinja2.in
View file @
83fabe53
...
@@ -88,6 +88,7 @@ password = {{ slapparameter_dict['root-password'] }}
...
@@ -88,6 +88,7 @@ password = {{ slapparameter_dict['root-password'] }}
database-list = {{ dumps(database_list) }}
database-list = {{ dumps(database_list) }}
mroonga-mariadb-install-sql = {{ dumps(parameter_dict['mroonga-mariadb-install-sql']) }}
mroonga-mariadb-install-sql = {{ dumps(parameter_dict['mroonga-mariadb-install-sql']) }}
root-user = repman
root-user = repman
heartbeat-user = {{ slapparameter_dict['heartbeat-user'] }}
[init-script]
[init-script]
< = jinja2-template-executable
< = jinja2-template-executable
...
@@ -147,7 +148,9 @@ wrapper = ${directory:controller}/mariadb
...
@@ -147,7 +148,9 @@ wrapper = ${directory:controller}/mariadb
{{ supervisord_lib.supervisord("mariadb-ctl", buildout_bin_directory, supervisord_conf, use_service_hash=False) }}
{{ supervisord_lib.supervisord("mariadb-ctl", buildout_bin_directory, supervisord_conf, use_service_hash=False) }}
{% do part_list.append("supervisord-mariadb-ctl") -%}
{% do part_list.append("supervisord-mariadb-ctl") -%}
{% set maradb_program_dict = {"name": "mariadb", "command": "${ca-mysqld:wrapper}",
{% set maradb_program_dict = {"name": "mariadb", "command": "${ca-mysqld:wrapper}",
"stopwaitsecs": 86400, "environment": []} %}
"stopwaitsecs": 86400, "environment": [],
"stdout_logfile": "${directory:log}/mariadb_stdout.log",
"stderr_logfile": "${directory:log}/mariadb_stdout.log" } %}
{{ supervisord_lib.supervisord_program("mariadb", maradb_program_dict) }}
{{ supervisord_lib.supervisord_program("mariadb", maradb_program_dict) }}
{% do part_list.append("supervisord-mariadb") %}
{% do part_list.append("supervisord-mariadb") %}
...
...
software/repman/instance-repman.cfg.jinja2.in
View file @
83fabe53
...
@@ -90,6 +90,7 @@ config-{{ key }} = {{ dumps(value) }}
...
@@ -90,6 +90,7 @@ config-{{ key }} = {{ dumps(value) }}
config-monitor-passwd = ${publish-early:monitor-password}
config-monitor-passwd = ${publish-early:monitor-password}
config-root-password = ${publish-early:db-root-password}
config-root-password = ${publish-early:db-root-password}
config-repman-user = ${repman-parameter:username}
config-repman-user = ${repman-parameter:username}
config-heartbeat-user = ${repman-parameter:heartbeat-user}
#config-repman-passwd = ${repman-parameter:password}
#config-repman-passwd = ${repman-parameter:password}
config-repman-url = ${nginx-parameter:backend-url}
config-repman-url = ${nginx-parameter:backend-url}
config-repman-secure-url = ${nginx-parameter:backend-ssl-url}
config-repman-secure-url = ${nginx-parameter:backend-ssl-url}
...
@@ -126,13 +127,17 @@ maximum = 7132
...
@@ -126,13 +127,17 @@ maximum = 7132
{% set prefered_master = parameter_dict.get("db-prefered-master") -%}
{% set prefered_master = parameter_dict.get("db-prefered-master") -%}
[{{ name ~ '-cluster-parameter' }}]
[{{ name ~ '-cluster-parameter' }}]
{% for key, value in parameter_dict.items() -%}
{% for key, value in parameter_dict.items() -%}
{{ key }} = {{
dumps(value)
}}
{{ key }} = {{
value
}}
{% endfor -%}
{% endfor -%}
proxysql-user = {{ parameter_dict.get("proxysql-user", "external") }}
proxysql-user = {{ parameter_dict.get("proxysql-user", "external") }}
proxy-port = {{ '${' ~ name ~ '-port:port}' }}
proxy-port = {{ '${' ~ name ~ '-port:port}' }}
proxy-admin-port = {{ '${' ~ name ~ '-admin-port:port}' }}
proxy-admin-port = {{ '${' ~ name ~ '-admin-port:port}' }}
db-credential = repman:${publish-early:db-root-password}
db-user = repman
db-password = ${publish-early:db-root-password}
db-list = {{ mariadb_server_list | join(',') }}
db-list = {{ mariadb_server_list | join(',') }}
heartbeat-user = ${repman-parameter:heartbeat-user}
heartbeat-password = ${publish-early:db-root-password}
partition-list = {{ mariadb_path_list | join(',') }}
partition-list = {{ mariadb_path_list | join(',') }}
{% if prefered_master -%}
{% if prefered_master -%}
db-prefered-master = {{ prefered_master }}
db-prefered-master = {{ prefered_master }}
...
@@ -141,6 +146,7 @@ db-prefered-master = {{ prefered_master }}
...
@@ -141,6 +146,7 @@ db-prefered-master = {{ prefered_master }}
db-prefered-master = {{ mariadb_server_list[0] }}
db-prefered-master = {{ mariadb_server_list[0] }}
{% endif -%}
{% endif -%}
proxysql-servers = {{ ipv4 }}
proxysql-servers = {{ ipv4 }}
proxysql-servers-ipv6 = [{{ ip }}]
password = ${repman-parameter:password}
password = ${repman-parameter:password}
proxysql-partition = ${buildout:directory}
proxysql-partition = ${buildout:directory}
receiver-port-list = {{ receiver_port_list | join(',') }}
receiver-port-list = {{ receiver_port_list | join(',') }}
...
@@ -205,21 +211,29 @@ wait-for-files =
...
@@ -205,21 +211,29 @@ wait-for-files =
depends =
depends =
{{ '${proxysql-' ~ name ~ '-admin-promise:recipe}' }}
{{ '${proxysql-' ~ name ~ '-admin-promise:recipe}' }}
{{ '${proxysql-' ~ name ~ '-promise:recipe}' }}
{{ '${proxysql-' ~ name ~ '-promise:recipe}' }}
{{ '${proxysql-' ~ name ~ '-ipv6-promise:recipe}' }}
[proxysql-{{ name }}-admin-promise]
[proxysql-{{ name }}-admin-promise]
<= monitor-promise-base
<= monitor-promise-base
module = check_port_listening
module = check_port_listening
name = proxysql-{{ name }}-admin-port-listening
name = proxysql-{{ name }}-admin-port-listening
.py
config-hostname= {{ ipv4 }}
config-hostname= {{ ipv4 }}
config-port = {{ '${' ~ name ~ '-cluster-parameter:proxy-admin-port}' }}
config-port = {{ '${' ~ name ~ '-cluster-parameter:proxy-admin-port}' }}
[proxysql-{{ name }}-promise]
[proxysql-{{ name }}-promise]
<= monitor-promise-base
<= monitor-promise-base
module = check_port_listening
module = check_port_listening
name = proxysql-{{ name }}-port-listening
name = proxysql-{{ name }}-port-listening
.py
config-hostname= {{ ipv4 }}
config-hostname= {{ ipv4 }}
config-port = {{ '${' ~ name ~ '-cluster-parameter:proxy-port}' }}
config-port = {{ '${' ~ name ~ '-cluster-parameter:proxy-port}' }}
[proxysql-{{ name }}-ipv6-promise]
<= monitor-promise-base
module = check_port_listening
name = proxysql-{{ name }}-ipv6-port-listening.py
config-hostname= {{ ip }}
config-port = {{ '${' ~ name ~ '-cluster-parameter:proxy-port}' }}
{% set service_name = "proxysql-" ~ name -%}
{% set service_name = "proxysql-" ~ name -%}
{% set proxysql_dict = {"name": service_name, "command": "${" ~ service_name ~ "-wrapper:wrapper-path}",
{% set proxysql_dict = {"name": service_name, "command": "${" ~ service_name ~ "-wrapper:wrapper-path}",
"stopwaitsecs": 60, "environment": [],
"stopwaitsecs": 60, "environment": [],
...
@@ -233,15 +247,19 @@ config-port = {{ '${' ~ name ~ '-cluster-parameter:proxy-port}' }}
...
@@ -233,15 +247,19 @@ config-port = {{ '${' ~ name ~ '-cluster-parameter:proxy-port}' }}
{% do cluster_list.append("{'name': '" ~ name ~ "', 'host': '" ~ ipv4 ~ "', 'port': '${" ~ name ~ "-cluster-parameter:proxy-admin-port}'}") -%}
{% do cluster_list.append("{'name': '" ~ name ~ "', 'host': '" ~ ipv4 ~ "', 'port': '${" ~ name ~ "-cluster-parameter:proxy-admin-port}'}") -%}
{% set publish_database_list = [] -%}
{% set publish_database_list = [] -%}
{% set publish_database_v6_list = [] -%}
{% for database in database_list -%}
{% for database in database_list -%}
{% if database.get('user') -%}
{% if database.get('user') -%}
{% do publish_database_list.append("mysql://" ~ database['user'] ~ ":" ~ database['password'] ~ "@" ~ ipv4 ~ ":${" ~ name ~ "-cluster-parameter:proxy-port}/" ~ database['name']) -%}
{% do publish_database_list.append("mysql://" ~ database['user'] ~ ":" ~ database['password'] ~ "@" ~ ipv4 ~ ":${" ~ name ~ "-cluster-parameter:proxy-port}/" ~ database['name']) -%}
{% do publish_database_v6_list.append("mysql://" ~ database['user'] ~ ":" ~ database['password'] ~ "@[" ~ ip ~ "]:${" ~ name ~ "-cluster-parameter:proxy-port}/" ~ database['name']) -%}
{% else -%}
{% else -%}
{% do publish_database_list.append("mysql://" ~ ipv4 ~ ":${" ~ name ~ "-cluster-parameter:proxy-port}/" ~ database['name']) -%}
{% do publish_database_list.append("mysql://" ~ ipv4 ~ ":${" ~ name ~ "-cluster-parameter:proxy-port}/" ~ database['name']) -%}
{% do publish_database_v6_list.append("mysql://[" ~ ip ~ "]:${" ~ name ~ "-cluster-parameter:proxy-port}/" ~ database['name']) -%}
{% endif -%}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% do publish_dict.__setitem__(name ~ '-database-list', "!py!['" ~ publish_database_list | join("', '") ~ "']") -%}
{% do publish_dict.__setitem__(name ~ '-database-list', "!py!['" ~ publish_database_list | join("', '") ~ "']") -%}
{% do publish_dict.__setitem__(name ~ '-database-list-v6', "!py!['" ~ publish_database_v6_list | join("', '") ~ "']") -%}
{% endfor -%}
{% endfor -%}
[slap-configuration]
[slap-configuration]
...
@@ -304,6 +322,7 @@ secure-port = ${instance-parameter:repman-secure-port}
...
@@ -304,6 +322,7 @@ secure-port = ${instance-parameter:repman-secure-port}
port = ${instance-parameter:repman-port}
port = ${instance-parameter:repman-port}
ipv4 = ${instance-parameter:ipv4-random}
ipv4 = ${instance-parameter:ipv4-random}
username = admin
username = admin
heartbeat-user = heartbeat
password = ${publish-early:repman-password}
password = ${publish-early:repman-password}
cluster-d = ${repman:clusters}
cluster-d = ${repman:clusters}
autorejoin = {{ slapparameter_dict.get("autorejoin", True) }}
autorejoin = {{ slapparameter_dict.get("autorejoin", True) }}
...
...
software/repman/templates/cluster-config.toml.in
View file @
83fabe53
...
@@ -6,8 +6,9 @@ title = "{{ parameter_dict['name'] }}"
...
@@ -6,8 +6,9 @@ title = "{{ parameter_dict['name'] }}"
monitoring-save-config = true
monitoring-save-config = true
db-servers-hosts = "{{ parameter_dict['db-list'] }}"
db-servers-hosts = "{{ parameter_dict['db-list'] }}"
db-servers-prefered-master = "{{ parameter_dict['db-prefered-master'] }}"
db-servers-prefered-master = "{{ parameter_dict['db-prefered-master'] }}"
db-servers-credential = "{{ parameter_dict['db-credential'] }}"
db-servers-credential = "{{ parameter_dict['db-user'] }}:{{ parameter_dict['db-password'] }}"
replication-credential = "{{ parameter_dict['db-credential'] }}"
replication-credential = "{{ parameter_dict['db-user'] }}:{{ parameter_dict['db-password'] }}"
monitoring-write-heartbeat-credential="{{ parameter_dict['heartbeat-user'] }}:{{ parameter_dict['heartbeat-password'] }}"
db-servers-connect-timeout = 1
db-servers-connect-timeout = 1
slapos-db-partitions = "{{ parameter_dict['partition-list'] }}"
slapos-db-partitions = "{{ parameter_dict['partition-list'] }}"
slapos-proxysql-partitions = "{{ parameter_dict['proxysql-partition'] }}"
slapos-proxysql-partitions = "{{ parameter_dict['proxysql-partition'] }}"
...
@@ -15,6 +16,7 @@ slapos-proxysql-partitions = "{{ parameter_dict['proxysql-partition'] }}"
...
@@ -15,6 +16,7 @@ slapos-proxysql-partitions = "{{ parameter_dict['proxysql-partition'] }}"
proxysql = true
proxysql = true
proxysql-port = {{ parameter_dict['proxy-port'] }}
proxysql-port = {{ parameter_dict['proxy-port'] }}
proxysql-servers = "{{ parameter_dict['proxysql-servers'] }}"
proxysql-servers = "{{ parameter_dict['proxysql-servers'] }}"
proxysql-servers-ipv6 = "{{ parameter_dict['proxysql-servers-ipv6'] }}"
proxysql-user = "{{ parameter_dict['proxysql-user'] }}"
proxysql-user = "{{ parameter_dict['proxysql-user'] }}"
proxysql-bootstrap = true
proxysql-bootstrap = true
proxysql-admin-port = {{ parameter_dict['proxy-admin-port'] }}
proxysql-admin-port = {{ parameter_dict['proxy-admin-port'] }}
...
...
software/repman/templates/init_root_wrapper.in
View file @
83fabe53
...
@@ -7,7 +7,7 @@ run_mysql () {
...
@@ -7,7 +7,7 @@ run_mysql () {
if
[
!
-f
"{{ init_password_done }}"
]
;
then
if
[
!
-f
"{{ init_password_done }}"
]
;
then
for
i
in
{
30..0
}
;
do
for
i
in
{
30..0
}
;
do
if
run_mysql
-e
'SELECT 1'
&> /dev/null
;
then
if
echo
'SELECT 1'
| run_mysql
&> /dev/null
;
then
break
break
fi
fi
echo
'MySQL init process in progress...'
echo
'MySQL init process in progress...'
...
...
software/repman/templates/mariadb_init_root.sql.in
View file @
83fabe53
...
@@ -2,11 +2,17 @@
...
@@ -2,11 +2,17 @@
-- or products like mysql-fabric won't work
-- or products like mysql-fabric won't work
SET @@SESSION.SQL_LOG_BIN=0;
SET @@SESSION.SQL_LOG_BIN=0;
CREATE USER 'repman'@'localhost' IDENTIFIED BY '{{ parameter_dict["password"] }}' ;
CREATE USER '{{ parameter_dict["root-user"] }}'@'localhost' IDENTIFIED BY '{{ parameter_dict["password"] }}' ;
GRANT ALL ON *.* TO 'repman'@'localhost' WITH GRANT OPTION ;
GRANT ALL ON *.* TO '{{ parameter_dict["root-user"] }}'@'localhost' WITH GRANT OPTION ;
CREATE USER 'repman'@'%' IDENTIFIED BY '{{ parameter_dict["password"] }}' ;
CREATE USER '{{ parameter_dict["root-user"] }}'@'%' IDENTIFIED BY '{{ parameter_dict["password"] }}' ;
GRANT ALL ON *.* TO 'repman'@'%' WITH GRANT OPTION ;
GRANT ALL ON *.* TO '{{ parameter_dict["root-user"] }}'@'%' WITH GRANT OPTION ;
CREATE USER 'repman'@'::' IDENTIFIED BY '{{ parameter_dict["password"] }}' ;
CREATE USER '{{ parameter_dict["root-user"] }}'@'::' IDENTIFIED BY '{{ parameter_dict["password"] }}' ;
GRANT ALL ON *.* TO 'repman'@'::' WITH GRANT OPTION ;
GRANT ALL ON *.* TO '{{ parameter_dict["root-user"] }}'@'::' WITH GRANT OPTION ;
CREATE USER '{{ parameter_dict["heartbeat-user"] }}'@'localhost' IDENTIFIED BY '{{ parameter_dict["password"] }}' ;
GRANT ALL ON *.* TO '{{ parameter_dict["heartbeat-user"] }}'@'localhost' WITH GRANT OPTION ;
CREATE USER '{{ parameter_dict["heartbeat-user"] }}'@'%' IDENTIFIED BY '{{ parameter_dict["password"] }}' ;
GRANT ALL ON *.* TO '{{ parameter_dict["heartbeat-user"] }}'@'%' WITH GRANT OPTION ;
DROP DATABASE IF EXISTS test ;
DROP DATABASE IF EXISTS test ;
FLUSH PRIVILEGES ;
FLUSH PRIVILEGES ;
\ No newline at end of file
software/repman/templates/repman-manager.sh.in
View file @
83fabe53
...
@@ -6,9 +6,13 @@ curl () {
...
@@ -6,9 +6,13 @@ curl () {
{{ curl_bin }} -k --silent -H "Accept: application/json" "$@"
{{ curl_bin }} -k --silent -H "Accept: application/json" "$@"
}
}
get_token () {
curl -s -X POST --data '{"username":"{{ username }}","password":"{{ password}}"}' {{ secure_url }}/api/login
}
wait_database () {
wait_database () {
NAME=$1
NAME=$1
for retry in {1..
1
0}; do
for retry in {1..
5
0}; do
echo ">> Wait until $NAME databases are ready...";
echo ">> Wait until $NAME databases are ready...";
CODE=$(curl -H "Authorization: Bearer ${TOKEN}" -o /dev/null -w "%{http_code}" {{ secure_url }}/api/clusters/$NAME/actions/waitdatabases);
CODE=$(curl -H "Authorization: Bearer ${TOKEN}" -o /dev/null -w "%{http_code}" {{ secure_url }}/api/clusters/$NAME/actions/waitdatabases);
if [ $CODE -eq 504 ]; then
if [ $CODE -eq 504 ]; then
...
@@ -17,6 +21,11 @@ wait_database () {
...
@@ -17,6 +21,11 @@ wait_database () {
else
else
if [ $CODE -eq 200 ]; then
if [ $CODE -eq 200 ]; then
break;
break;
else
if [ $CODE -eq 401 ]; then
# try again with new token
TOKEN=$(get_token | {{ jq_bin }} -r '.token')
fi
fi
fi
echo ">> [$retry] waitdatabases returned code $CODE...";
echo ">> [$retry] waitdatabases returned code $CODE...";
fi
fi
...
@@ -37,7 +46,7 @@ activate_proxy () {
...
@@ -37,7 +46,7 @@ activate_proxy () {
fi
fi
}
}
TOKEN=$(
curl -s -X POST --data '{"username":"{{ username }}","password":"{{ password}}"}' {{ secure_url }}/api/logi
n | {{ jq_bin }} -r '.token')
TOKEN=$(
get_toke
n | {{ jq_bin }} -r '.token')
# Always reload cluster configuration to apply recent changes
# Always reload cluster configuration to apply recent changes
{% for name in cluster_name_list -%}
{% for name in cluster_name_list -%}
...
@@ -52,7 +61,7 @@ if [ ! -f "{{ parameter_dict['bootstrap'] }}/{{ name }}_bootstrapped" ]; then
...
@@ -52,7 +61,7 @@ if [ ! -f "{{ parameter_dict['bootstrap'] }}/{{ name }}_bootstrapped" ]; then
wait_database {{ name }}
wait_database {{ name }}
echo "Bootstrap replication on {{ name }}..."
echo "Bootstrap replication on {{ name }}..."
TOKEN=$(
curl -s -X POST --data '{"username":"{{ username }}","password":"{{ password}}"}' {{ secure_url }}/api/logi
n | {{ jq_bin }} -r '.token')
TOKEN=$(
get_toke
n | {{ jq_bin }} -r '.token')
curl -H "Authorization: Bearer ${TOKEN}" \
curl -H "Authorization: Bearer ${TOKEN}" \
{{ secure_url }}/api/clusters/{{ name }}/actions/replication/cleanup
{{ secure_url }}/api/clusters/{{ name }}/actions/replication/cleanup
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment