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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jean-Paul Smets
slapos
Commits
35d04da6
Commit
35d04da6
authored
May 16, 2017
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stack.erp5: Randomly generate server-id if not provided.
Makes it easier to deploy a functional replication setup.
parent
ba2427fe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
2 deletions
+17
-2
stack/erp5/buildout.hash.cfg
stack/erp5/buildout.hash.cfg
+1
-1
stack/erp5/instance-mariadb.cfg.in
stack/erp5/instance-mariadb.cfg.in
+16
-1
No files found.
stack/erp5/buildout.hash.cfg
View file @
35d04da6
...
...
@@ -19,7 +19,7 @@ md5sum = 1e89de954d816b93f76d9b75820d192c
[template-mariadb]
filename = instance-mariadb.cfg.in
md5sum =
11e7faca5233868c1643854e4c898588
md5sum =
6cc8f361b3ca22aab2611231fcad8b2d
[template-kumofs]
filename = instance-kumofs.cfg.in
...
...
stack/erp5/instance-mariadb.cfg.in
View file @
35d04da6
...
...
@@ -19,6 +19,7 @@
[publish]
recipe = slapos.cookbook:publish.serialised
-extends = publish-early
{% macro render_database_list(database_list) -%}
{% set publish_database_list = [] -%}
{% for database in database_list -%}
...
...
@@ -33,6 +34,20 @@ recipe = slapos.cookbook:publish.serialised
database-list = {{ render_database_list(database_list) }}
test-database-list = {{ render_database_list(test_database_list) }}
[publish-early]
recipe = slapos.cookbook:publish-early
-init =
server-id gen-server-id:value
{%- set server_id = slapparameter_dict.get('server-id') %}
{%- if server_id %}
server-id = {{ dumps(server_id) }}
{%- endif %}
[gen-server-id]
recipe = slapos.cookbook:random.integer
minimum = {{ dumps(1) }}
maximum = {{ dumps(2**32 - 1) }}
[jinja2-template-base]
recipe = slapos.recipe.template:jinja2
mode = 644
...
...
@@ -124,7 +139,7 @@ relaxed-writes = {{ dumps(slapparameter_dict.get('relaxed-writes', False)) }}
binlog-path = ${directory:mariadb-backup-incremental}/binlog
# XXX: binlog rotation happens along with other log's rotation
binlog-expire-days = {{ dumps(incremental_backup_retention_days) }}
server-id =
{{ dumps(slapparameter_dict.get('server-id', 1)) }
}
server-id =
${publish-early:server-id
}
{% else %}
binlog-path =
{%- endif %}
...
...
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