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
Boxiang Sun
slapos
Commits
36d8e662
Commit
36d8e662
authored
May 22, 2017
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
stack.erp5: Use consistent templating language in mariadb instance
parent
756c70eb
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
15 deletions
+24
-15
stack/erp5/buildout.hash.cfg
stack/erp5/buildout.hash.cfg
+2
-2
stack/erp5/instance-mariadb-resiliency-after-import-script.sh.in
...rp5/instance-mariadb-resiliency-after-import-script.sh.in
+9
-9
stack/erp5/instance-mariadb.cfg.in
stack/erp5/instance-mariadb.cfg.in
+13
-4
No files found.
stack/erp5/buildout.hash.cfg
View file @
36d8e662
...
...
@@ -15,11 +15,11 @@
# not need these here).
[mariadb-resiliency-after-import-script]
filename = instance-mariadb-resiliency-after-import-script.sh.in
md5sum =
af0ef3e5e3ca0a2671e5eb65eb3faea6
md5sum =
844d62cd6f9d6e3d1d78d52de2b72a49
[template-mariadb]
filename = instance-mariadb.cfg.in
md5sum =
9ada4abfc0177ea9e315636ac5621e49
md5sum =
1ce6e9008d3ed0701b85a2e3cd9d59b6
[template-kumofs]
filename = instance-kumofs.cfg.in
...
...
stack/erp5/instance-mariadb-resiliency-after-import-script.sh.in
View file @
36d8e662
#!
${dash:dash
}
#!
{{ dash }
}
# DO NOT RUN THIS SCRIPT ON PRODUCTION INSTANCE
# OR MYSQL DATA WILL BE ERASED.
...
...
@@ -12,14 +12,14 @@
set -e
mysql_executable='
${binary-wrap-mysql:wrapper-path
}'
mariadb_data_directory='
${directory:mariadb-data
}'
mariadb_backup_directory='
${directory:mariadb-backup-full
}'
instance_directory='
${buildout:directory
}'
pid_file='
${my-cnf-parameters:pid-file
}'
binlog_path='
${my-cnf-parameters:binlog-path
}'
server_executable='
${mysqld:rendered
}'
update_executable='
${update-mysql:output
}'
mysql_executable='
{{ mysql_executable }
}'
mariadb_data_directory='
{{ mariadb_data_directory }
}'
mariadb_backup_directory='
{{ mariadb_backup_directory }
}'
instance_directory='
{{ instance_directory }
}'
pid_file='
{{ pid_file }
}'
binlog_path='
{{ binlog_path }
}'
server_executable='
{{ server_executable }
}'
update_executable='
{{ update_executable }
}'
# Make sure mariadb is not already running
if [ -e "$pid_file" ]; then
...
...
stack/erp5/instance-mariadb.cfg.in
View file @
36d8e662
...
...
@@ -257,10 +257,19 @@ dash = {{ dumps(dash) }}
[resiliency-after-import-script]
# Generate after import script used by importer instance of webrunner
recipe = collective.recipe.template
input = {{ parameter_dict['mariadb-resiliency-after-import-script'] }}
output = ${directory:srv}/runner-import-restore
mode = 755
< = jinja2-template-executable
template = {{ parameter_dict['mariadb-resiliency-after-import-script'] }}
rendered = ${directory:srv}/runner-import-restore
context =
key dash dash:dash
key mysql_executable binary-wrap-mysql:wrapper-path
key mariadb_data_directory directory:mariadb-data
key mariadb_backup_directory directory:mariadb-backup-full
key instance_directory buildout:directory
key pid_file my-cnf-parameters:pid-file
key binlog_path my-cnf-parameters:binlog-path
key server_executable mysqld:rendered
key update_executable update-mysql:output
[promise]
recipe = slapos.cookbook:wrapper
...
...
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