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
Labels
Merge Requests
104
Merge Requests
104
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos
Commits
44684450
Commit
44684450
authored
Apr 17, 2020
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
repman fixup, include restic for backup
parent
4518eef2
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
29 additions
and
9 deletions
+29
-9
software/repman/buildout.hash.cfg
software/repman/buildout.hash.cfg
+3
-3
software/repman/instance-repman.cfg.jinja2.in
software/repman/instance-repman.cfg.jinja2.in
+14
-6
software/repman/instance.cfg.in
software/repman/instance.cfg.in
+1
-0
software/repman/software.cfg
software/repman/software.cfg
+4
-0
software/repman/templates/config.toml.in
software/repman/templates/config.toml.in
+7
-0
No files found.
software/repman/buildout.hash.cfg
View file @
44684450
...
...
@@ -14,15 +14,15 @@
# not need these here).
[instance.cfg]
filename = instance.cfg.in
md5sum =
158e4c884b04442aff9726704b3f4d60
md5sum =
b38fb4c5cdba2223c84d62ef60513e49
[instance-repman.cfg]
_update_hash_filename_ = instance-repman.cfg.jinja2.in
md5sum =
0a17bad0a5e7f472641c8a2984ae9400
md5sum =
17431810792121fa5c9dc1ccfeec9d13
[config-toml.in]
_update_hash_filename_ = templates/config.toml.in
md5sum =
5114d1bb43025cdc5357572634871da7
md5sum =
66108ddfda7169695d7b876a4e3b246c
[config-cluster-toml.in]
_update_hash_filename_ = templates/cluster-config.toml.in
...
...
software/repman/instance-repman.cfg.jinja2.in
View file @
44684450
...
...
@@ -66,8 +66,8 @@ return =
{% endfor -%}
# Manage Replication Manager clusters
{% set
cluster
_parameter_dict = {"cluster1": {"name": "cluster1", "db-prefered-master": "", "proxy-admin-port": 6032, "proxy-port": 6033, "proxysql-user": "external"}} -%}
{% for name, parameter_dict in
cluster_parameter_dict
.items() -%}
{% set
default
_parameter_dict = {"cluster1": {"name": "cluster1", "db-prefered-master": "", "proxy-admin-port": 6032, "proxy-port": 6033, "proxysql-user": "external"}} -%}
{% for name, parameter_dict in
slapparameter_dict.get('cluster-partition-dict', default_parameter_dict)
.items() -%}
{% set prefered_master = parameter_dict.pop("db-prefered-master") -%}
[{{ name ~ '-cluster-parameter' }}]
{% for key, value in parameter_dict.items() -%}
...
...
@@ -193,6 +193,7 @@ mysqlclient-path = {{ mariadb_location }}/bin/mysql
mysqldump-path = {{ mariadb_location }}/bin/mysqldump
haproxy-bin = {{ haproxy_location }}/sbin/haproxy
sysbench-bin = {{ sysbench_location }}/bin/sysbench
restic-bin = {{ restic_bin_location }}
mail-from = {{ slapparameter_dict.get("mail-from", "mrm@localhost") }}
mail-smtp-addr = {{ slapparameter_dict.get("mail-smtp-addr", "localhost:25") }}
...
...
@@ -203,18 +204,17 @@ mail-to = {{ slapparameter_dict.get("mail-to", "") }}
[repman-config-folder]
recipe = plone.recipe.command
repman-location = {{ repman_src_location }}
command =
command =
cd ${:repman-location}
{{ rsync_location }}/bin/rsync -av share ${repman:root-dir}/
{{ rsync_location }}/bin/rsync -av dashboard ${repman:root-dir}/
# XXX - this need to be checked/optimized in case of upgrade.
update-command = ${:command}
[replication-manager-reload]
recipe = slapos.recipe.template:jinja2
template = {{ template_repman_manager_sh }}
cluster-list = {{ dumps(
cluster_parameter_dict
.keys() ) }}
cluster-list = {{ dumps(
slapparameter_dict.get('cluster-partition-dict', default_parameter_dict)
.keys() ) }}
context =
section parameter_dict repman
key username repman-parameter:username
...
...
@@ -245,6 +245,8 @@ wrapper-path = ${directory:service}/replication-manager
depends =
${repman-config-folder:recipe}
${replication-manager-reload:recipe}
${repman-listen-promise:recipe}
${repman-listen-ssl-promise:recipe}
[repman-config.toml]
recipe = slapos.recipe.template:jinja2
...
...
@@ -261,6 +263,13 @@ name = repman_service_listen.py
config-hostname = ${repman-parameter:ipv4}
config-port = ${repman-parameter:port}
[repman-listen-ssl-promise]
<= monitor-promise-base
module = check_port_listening
name = repman_service_ssl_listen.py
config-hostname = ${repman-parameter:ipv4}
config-port = ${repman-parameter:secure-port}
[nginx-conf]
recipe = slapos.recipe.template:jinja2
template = {{ nginx_conf_in }}
...
...
@@ -373,7 +382,6 @@ extends =
{{ template_monitor }}
parts =
replication-manager
repman-listen-promise
monitor-base
logrotate-entry-nginx
ca-nginx-service
...
...
software/repman/instance.cfg.in
View file @
44684450
...
...
@@ -60,6 +60,7 @@ extra-context =
raw config_cluster_toml_in {{ config_cluster_toml_in }}
raw nginx_conf_in {{ nginx_conf_in }}
raw rsync_location {{ rsync_location }}
raw restic_bin_location {{ restic_bin_location }}
raw sysbench_location {{ sysbench_location }}
raw proxysql_location {{ proxysql_location }}
raw template_repman_manager_sh {{ template_repman_manager_sh }}
...
...
software/repman/software.cfg
View file @
44684450
...
...
@@ -4,6 +4,7 @@ extends =
buildout.hash.cfg
../neoppod/software-common.cfg
../../stack/monitor/buildout.cfg
../../component/restic/buildout.cfg
../../component/replication-manager/buildout.cfg
../../component/mariadb/buildout.cfg
../../component/nginx/buildout.cfg
...
...
@@ -27,6 +28,8 @@ parts =
instance.cfg
template-mariadb.cfg
template-mysqld-wrapper
gowork
restic
[mariadb]
# Compile dir is for plugins, there's no plugin yet
...
...
@@ -62,6 +65,7 @@ context =
key percona_toolkit_location percona-toolkit:location
key repman_src_location git.signal18.io_signal18_repman:location
key rsync_location rsync:location
key restic_bin_location restic:location
key socat_location socat:location
key template_repman_manager_sh repman-manager-sh.in:target
key template_mariadb template-mariadb.cfg:target
...
...
software/repman/templates/config.toml.in
View file @
44684450
...
...
@@ -12,6 +12,7 @@ db-servers-binary-path = "{{ parameter_dict['mysql-bin-dir'] }}"
# Database hosts list to monitor, IP and port (optional), specified in the host:[port] format and separated by commas
# XXX - check if mandatory (as present in cluster)
#db-servers-hosts =
monitoring-address = "{{ parameter_dict['ipv4'] }}"
#haproxy = true
haproxy-binary-path = "{{ parameter_dict['haproxy-bin'] }}"
...
...
@@ -28,6 +29,12 @@ haproxy-binary-path = "{{ parameter_dict['haproxy-bin'] }}"
#HaProxy read-write port to leader (default 3306)
#haproxy-write-port =
# Use restic to archive and restore backups
backup-restic = true
backup-restic-binary-path = "{{ parameter_dict['restic-bin'] }}"
backup-restic-aws = false
backup-restic-password = ""
# Mail configuration
# Alert email sender (default "mrm@localhost")
mail-from = "{{ parameter_dict['mail-from'] }}"
...
...
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