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
Ophélie Gagnard
slapos
Commits
a669c51b
Commit
a669c51b
authored
Jun 19, 2020
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Plain Diff
Repman Fixup
See merge request
nexedi/slapos!776
parents
9bac569b
43c34306
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
408 additions
and
354 deletions
+408
-354
component/sysbench/buildout.cfg
component/sysbench/buildout.cfg
+0
-1
software/repman/buildout.hash.cfg
software/repman/buildout.hash.cfg
+3
-3
software/repman/instance-repman-input-schema.json
software/repman/instance-repman-input-schema.json
+394
-340
software/repman/instance-repman.cfg.jinja2.in
software/repman/instance-repman.cfg.jinja2.in
+9
-8
software/repman/templates/cluster-config.toml.in
software/repman/templates/cluster-config.toml.in
+1
-0
software/repman/templates/config.toml.in
software/repman/templates/config.toml.in
+1
-2
No files found.
component/sysbench/buildout.cfg
View file @
a669c51b
...
@@ -16,7 +16,6 @@ shared = true
...
@@ -16,7 +16,6 @@ shared = true
url = https://github.com/akopytov/sysbench/archive/1.0.19.tar.gz
url = https://github.com/akopytov/sysbench/archive/1.0.19.tar.gz
md5sum = 2912bfe7238cac7351459019a84e2557
md5sum = 2912bfe7238cac7351459019a84e2557
pre-configure =
pre-configure =
aclocal -I${pkgconfig:location}/share/aclocal -I${libtool:location}/share/aclocal -I${gettext:location}/share/aclocal
./autogen.sh
./autogen.sh
configure-options =
configure-options =
--disable-static
--disable-static
...
...
software/repman/buildout.hash.cfg
View file @
a669c51b
...
@@ -18,15 +18,15 @@ md5sum = b41f521b5f7980c64260ed0e5c494450
...
@@ -18,15 +18,15 @@ 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 =
7dbaace0d7db0e26d582ad17f36ac9cd
md5sum =
657ecdb1dfbbcf53e4e7932b3b5708c4
[config-toml.in]
[config-toml.in]
_update_hash_filename_ = templates/config.toml.in
_update_hash_filename_ = templates/config.toml.in
md5sum =
5cfa75ca5a0048a050c0041dfe541f3d
md5sum =
19fe38a342a5c9857e29f78eedb3c46e
[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 =
d2e79a9435082d9420281b4f59a5d464
md5sum =
079599a2841b5a0d5178bb12c4a30ae8
[nginx.conf.in]
[nginx.conf.in]
_update_hash_filename_ = templates/nginx.conf.in
_update_hash_filename_ = templates/nginx.conf.in
...
...
software/repman/instance-repman-input-schema.json
View file @
a669c51b
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
"computer-memory-percent-threshold"
:
{
"computer-memory-percent-threshold"
:
{
"title"
:
"Computer memory percent threshold."
,
"title"
:
"Computer memory percent threshold."
,
"description"
:
"Computer memory percent threshold."
,
"description"
:
"Computer memory percent threshold."
,
"type"
:
"int
"
,
"type"
:
"integer
"
,
"default"
:
80
"default"
:
80
},
},
"monitor-interface-url"
:
{
"monitor-interface-url"
:
{
...
@@ -61,9 +61,15 @@
...
@@ -61,9 +61,15 @@
},
},
"mail-smtp-addr"
:
{
"mail-smtp-addr"
:
{
"title"
:
"Mail SMTP address"
,
"title"
:
"Mail SMTP address"
,
"description"
:
"Mail SMTP address. Default: localhost:25
"
,
"description"
:
"Mail SMTP address. Default: localhost
"
,
"type"
:
"string"
,
"type"
:
"string"
,
"default"
:
"localhost:25"
"default"
:
"localhost"
},
"mail-smtp-port"
:
{
"title"
:
"Mail SMTP port"
,
"description"
:
"Mail SMTP port. Default: 25"
,
"type"
:
"integer"
,
"default"
:
"25"
},
},
"mail-smtp-password"
:
{
"mail-smtp-password"
:
{
"title"
:
"Mail SMTP password"
,
"title"
:
"Mail SMTP password"
,
...
@@ -84,10 +90,31 @@
...
@@ -84,10 +90,31 @@
"default"
:
""
"default"
:
""
},
},
"tags"
:
{
"tags"
:
{
"title"
:
"Provisioning db tags"
,
"title"
:
"Provisioning db tag list"
,
"description"
:
"Provisioning db tags"
,
"description"
:
"Provisioning db tags. Set one tag per line."
,
"type"
:
"string"
,
"type"
:
"array"
,
"default"
:
"gtidstrict,bind,pkg,innodb,noquerycache,slow,pfs,linux,readonly,diskmonitor,sqlerror,compressbinlog,bm4ci,mroonga,utctime,readcommitted,nohandshake"
"items"
:
{
"type"
:
"string"
},
"default"
:
[
"gtidstrict"
,
"bind"
,
"pkg"
,
"innodb"
,
"noquerycache"
,
"slow"
,
"pfs"
,
"linux"
,
"readonly"
,
"diskmonitor"
,
"sqlerror"
,
"compressbinlog"
,
"bm4ci"
,
"mroonga"
,
"utctime"
,
"readcommitted"
,
"nohandshake"
]
},
},
"http-session-lifetime"
:
{
"http-session-lifetime"
:
{
"title"
:
"Web Session life time in s"
,
"title"
:
"Web Session life time in s"
,
...
@@ -169,10 +196,18 @@
...
@@ -169,10 +196,18 @@
"default"
:
"external"
"default"
:
"external"
},
},
"proxy-tags"
:
{
"proxy-tags"
:
{
"title"
:
"Proxy tags"
,
"title"
:
"Proxy tag list"
,
"description"
:
"playbook configuration tags. Default: pkg,masterslave,linux,noreadwritesplit"
,
"description"
:
"playbook configuration tags. Default: [
\"
pkg
\"
,
\"
masterslave
\"
,
\"
linux
\"
,
\"
noreadwritesplit
\"
]"
,
"type"
:
"string"
,
"type"
:
"array"
,
"default"
:
"pkg,masterslave,linux,noreadwritesplit"
"items"
:
{
"type"
:
"string"
},
"default"
:
[
"pkg"
,
"masterslave"
,
"linux"
,
"noreadwritesplit"
]
},
},
"logical-backup-cron"
:
{
"logical-backup-cron"
:
{
"title"
:
"Mysqldump backup cron definition."
,
"title"
:
"Mysqldump backup cron definition."
,
...
@@ -222,16 +257,36 @@
...
@@ -222,16 +257,36 @@
"multipleOf"
:
256
"multipleOf"
:
256
},
},
"db-memory-shared-pct"
:
{
"db-memory-shared-pct"
:
{
"title"
:
"Percent memory shared per buffer"
,
"title"
:
"Percent memory list shared per buffer"
,
"description"
:
"Percent memory shared per buffer (default
\"
threads:16,innodb:60,myisam:10,aria:10,rocksdb:1,tokudb:1,s3:1,archive:1,querycache:0
\"
)"
,
"description"
:
"Percent memory shared per buffer. Default: [
\"
threads:16
\"
,
\"
innodb:60
\"
,
\"
myisam:10
\"
,
\"
aria:10
\"
,
\"
rocksdb:1
\"
,
\"
tokudb:1
\"
,
\"
s3:1
\"
,
\"
archive:1
\"
,
\"
querycache:0
\"
]"
,
"type"
:
"string"
,
"type"
:
"array"
,
"default"
:
"threads:16,innodb:60,myisam:10,aria:10,rocksdb:1,tokudb:1,s3:1,archive:1,querycache:0"
"items"
:
{
"type"
:
"string"
},
"default"
:
[
"threads:16"
,
"innodb:60"
,
"myisam:10"
,
"aria:10"
,
"rocksdb:1"
,
"tokudb:1"
,
"s3:1"
,
"archive:1"
,
"querycache:0"
]
},
},
"db-memory-threaded-pct"
:
{
"db-memory-threaded-pct"
:
{
"title"
:
"Percent memory allocted per threads"
,
"title"
:
"Percent memory allocted per threads"
,
"description"
:
"Percent memory allocted per threads. (default
\"
tmp:70,join:20,sort:10
\"
)"
,
"description"
:
"Percent memory allocted per threads. Default: [
\"
tmp:70
\"
,
\"
join:20
\"
,
\"
sort:10
\"
]"
,
"type"
:
"string"
,
"type"
:
"array"
,
"default"
:
"tmp:70,join:20,sort:10"
"items"
:
{
"type"
:
"string"
},
"default"
:
[
"tmp:70"
,
"join:20"
,
"sort:10"
]
},
},
"innodb-file-per-table"
:
{
"innodb-file-per-table"
:
{
"title"
:
"enable Innodb file per table"
,
"title"
:
"enable Innodb file per table"
,
...
@@ -256,7 +311,6 @@
...
@@ -256,7 +311,6 @@
"manual"
,
"manual"
,
"automatic"
"automatic"
]
]
},
},
"failover-limit"
:
{
"failover-limit"
:
{
"title"
:
"Failover amount limit"
,
"title"
:
"Failover amount limit"
,
...
...
software/repman/instance-repman.cfg.jinja2.in
View file @
a669c51b
...
@@ -8,7 +8,7 @@
...
@@ -8,7 +8,7 @@
{% set ip = (ipv6_set | list)[0] -%}
{% set ip = (ipv6_set | list)[0] -%}
{% set ipv4 = (ipv4_set | list)[0] -%}
{% set ipv4 = (ipv4_set | list)[0] -%}
{% set cluster_list = [] -%}
{% set cluster_list = [] -%}
{% set tag
s = "gtidstrict,bind,pkg,innodb,noquerycache,slow,pfs,linux,readonly,diskmonitor,sqlerror,compressbinlog,bm4ci,mroonga,utctime,readcommitted,nohandshake"
-%}
{% set tag
_list = ["gtidstrict", "bind", "pkg", "innodb", "noquerycache", "slow", "pfs", "linux", "readonly", "diskmonitor", "sqlerror", "compressbinlog", "bm4ci", "mroonga", "utctime", "readcommitted", "nohandshake"]
-%}
{% set frontend_parameter_dict = slapparameter_dict.get('slave-frontend', {}) -%}
{% set frontend_parameter_dict = slapparameter_dict.get('slave-frontend', {}) -%}
[directory]
[directory]
...
@@ -60,7 +60,7 @@ mode = 755
...
@@ -60,7 +60,7 @@ mode = 755
{% do mariadb_dict.__setitem__('computer-memory-percent-threshold', 80) -%}
{% do mariadb_dict.__setitem__('computer-memory-percent-threshold', 80) -%}
{% set default_parameter_dict = {"cluster1": {"name": "cluster1", "db-prefered-master": "",
{% set default_parameter_dict = {"cluster1": {"name": "cluster1", "db-prefered-master": "",
"database-amount": 2, "proxysql-user": "external",
"proxy-tags": "pkg,masterslave,linux,noreadwritesplit",
"database-amount": 2, "proxysql-user": "external",
"logical-backup-cron": "0 21 * * *", "physical-backup-cron": "0 1 * * *"}} -%}
"logical-backup-cron": "0 21 * * *", "physical-backup-cron": "0 1 * * *"}} -%}
{% for name, parameter_dict in slapparameter_dict.get('repman-cluster-dict', default_parameter_dict).items() -%}
{% for name, parameter_dict in slapparameter_dict.get('repman-cluster-dict', default_parameter_dict).items() -%}
...
@@ -150,7 +150,8 @@ proxysql-servers-ipv6 = [{{ ip }}]
...
@@ -150,7 +150,8 @@ 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(',') }}
proxy-tags = {{ parameter_dict.get("proxy-tags", "pkg,masterslave,linux,noreadwritesplit") }}
enabled-tags = {{ slapparameter_dict.get("tag-list", tag_list) | join(',') }}
proxy-tags = {{ parameter_dict.get("proxy-tags", ["pkg", "masterslave", "linux", "noreadwritesplit"]) | join(',') }}
logical-backup-cron = {{ parameter_dict.get("logical-backup-cron", "0 22 * * *") }}
logical-backup-cron = {{ parameter_dict.get("logical-backup-cron", "0 22 * * *") }}
physical-backup-cron = {{ parameter_dict.get("physical-backup-cron", "0 0 * * *") }}
physical-backup-cron = {{ parameter_dict.get("physical-backup-cron", "0 0 * * *") }}
proxy-cpu-cores = {{ parameter_dict.get("proxy-cpu-cores", 2) }}
proxy-cpu-cores = {{ parameter_dict.get("proxy-cpu-cores", 2) }}
...
@@ -158,8 +159,8 @@ proxy-memory = {{ parameter_dict.get("proxy-memory", 1) }}
...
@@ -158,8 +159,8 @@ proxy-memory = {{ parameter_dict.get("proxy-memory", 1) }}
db-cpu-cores = {{ parameter_dict.get("db-cpu-cores", 2) }}
db-cpu-cores = {{ parameter_dict.get("db-cpu-cores", 2) }}
db-disk-iops = {{ parameter_dict.get("db-disk-iops", 300) }}
db-disk-iops = {{ parameter_dict.get("db-disk-iops", 300) }}
db-memory = {{ parameter_dict.get("db-memory", 256) }}
db-memory = {{ parameter_dict.get("db-memory", 256) }}
db-memory-shared-pct = {{ parameter_dict.get("db-memory-shared-pct",
"threads:16,innodb:60,myisam:10,aria:10,rocksdb:1,tokudb:1,s3:1,archive:1,querycache:0"
) }}
db-memory-shared-pct = {{ parameter_dict.get("db-memory-shared-pct",
["threads:16", "innodb:60", "myisam:10", "aria:10", "rocksdb:1", "tokudb:1", "s3:1", "archive:1", "querycache:0"]) | join(','
) }}
db-memory-threaded-pct = {{ parameter_dict.get("db-memory-threaded-pct",
"tmp:70,join:20,sort:10"
) }}
db-memory-threaded-pct = {{ parameter_dict.get("db-memory-threaded-pct",
["tmp:70", "join:20", "sort:10"]) | join(','
) }}
# failover
# failover
failover-mode = {{ parameter_dict.get('failover-mode', 'manual') }}
failover-mode = {{ parameter_dict.get('failover-mode', 'manual') }}
failover-limit = {{ parameter_dict.get('failover-limit', 5) }}
failover-limit = {{ parameter_dict.get('failover-limit', 5) }}
...
@@ -336,11 +337,11 @@ sysbench-bin = {{ sysbench_location }}/bin/sysbench
...
@@ -336,11 +337,11 @@ sysbench-bin = {{ sysbench_location }}/bin/sysbench
restic-bin = {{ restic_bin_location }}
restic-bin = {{ restic_bin_location }}
mail-from = {{ slapparameter_dict.get("mail-from", "mrm@localhost") }}
mail-from = {{ slapparameter_dict.get("mail-from", "mrm@localhost") }}
mail-smtp-addr = {{ slapparameter_dict.get("mail-smtp-addr", "localhost:25") }}
mail-smtp-addr = {{ slapparameter_dict.get("mail-smtp-addr", "localhost") }}
mail-smtp-port = {{ slapparameter_dict.get("mail-smtp-port", "25") }}
mail-smtp-password = {{ slapparameter_dict.get("mail-smtp-password", "") }}
mail-smtp-password = {{ slapparameter_dict.get("mail-smtp-password", "") }}
mail-smtp-user = {{ slapparameter_dict.get("mail-smtp-user", "") }}
mail-smtp-user = {{ slapparameter_dict.get("mail-smtp-user", "") }}
mail-to = {{ slapparameter_dict.get("mail-to", "") }}
mail-to = {{ slapparameter_dict.get("mail-to", "") }}
enabled-tags = {{ slapparameter_dict.get("tags", tags) }}
http-session-lifetime = {{ slapparameter_dict.get("http-session-lifetime", 86400) }}
http-session-lifetime = {{ slapparameter_dict.get("http-session-lifetime", 86400) }}
http-refresh-interval = {{ slapparameter_dict.get("http-refresh-interval", 4) }}
http-refresh-interval = {{ slapparameter_dict.get("http-refresh-interval", 4) }}
...
...
software/repman/templates/cluster-config.toml.in
View file @
a669c51b
...
@@ -22,6 +22,7 @@ proxysql-bootstrap = true
...
@@ -22,6 +22,7 @@ proxysql-bootstrap = true
proxysql-admin-port = {{ parameter_dict['proxy-admin-port'] }}
proxysql-admin-port = {{ parameter_dict['proxy-admin-port'] }}
proxysql-password = "{{ parameter_dict['password'] }}"
proxysql-password = "{{ parameter_dict['password'] }}"
prov-db-tags = "{{ parameter_dict['enabled-tags'] }}"
prov-proxy-tags = "{{ parameter_dict['proxy-tags'] }}"
prov-proxy-tags = "{{ parameter_dict['proxy-tags'] }}"
monitoring-scheduler = true
monitoring-scheduler = true
...
...
software/repman/templates/config.toml.in
View file @
a669c51b
...
@@ -53,14 +53,13 @@ backup-mysqldump-path = "{{ parameter_dict['mysqldump-path'] }}"
...
@@ -53,14 +53,13 @@ backup-mysqldump-path = "{{ parameter_dict['mysqldump-path'] }}"
# Alert email sender (default "mrm@localhost")
# Alert email sender (default "mrm@localhost")
mail-from = "{{ parameter_dict['mail-from'] }}"
mail-from = "{{ parameter_dict['mail-from'] }}"
# Alert email SMTP server address, in host:[port] format (default "localhost:25")
# Alert email SMTP server address, in host:[port] format (default "localhost:25")
mail-smtp-addr = "{{ parameter_dict['mail-smtp-addr'] }}"
mail-smtp-addr = "{{ parameter_dict['mail-smtp-addr'] }}
:{{ parameter_dict['mail-smtp-port'] }}
"
mail-smtp-password = "{{ parameter_dict['mail-smtp-password'] }}"
mail-smtp-password = "{{ parameter_dict['mail-smtp-password'] }}"
mail-smtp-user = "{{ parameter_dict['mail-smtp-user'] }}"
mail-smtp-user = "{{ parameter_dict['mail-smtp-user'] }}"
# Alert email recipients, separated by commas
# Alert email recipients, separated by commas
mail-to = "{{ parameter_dict['mail-to'] }}"
mail-to = "{{ parameter_dict['mail-to'] }}"
prov-orchestrator = "slapos"
prov-orchestrator = "slapos"
prov-db-tags = "{{ parameter_dict['enabled-tags'] }}"
sysbench-binary-path = "{{ parameter_dict['sysbench-bin'] }}"
sysbench-binary-path = "{{ parameter_dict['sysbench-bin'] }}"
# Number of threads to run benchmark (default 4)
# Number of threads to run benchmark (default 4)
...
...
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