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
Roque
slapos
Commits
cebedc6d
Commit
cebedc6d
authored
Feb 17, 2015
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5: add webrunner resilient import script to mariadb instance.
parent
e6d8839c
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
6 deletions
+17
-6
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+3
-3
stack/erp5/instance-mariadb.cfg.in
stack/erp5/instance-mariadb.cfg.in
+9
-0
stack/erp5/instance.cfg.in
stack/erp5/instance.cfg.in
+2
-0
stack/erp5/template/instance-mariadb-resiliency-after-import-script.sh.in
...ate/instance-mariadb-resiliency-after-import-script.sh.in
+3
-3
No files found.
stack/erp5/buildout.cfg
View file @
cebedc6d
...
...
@@ -160,13 +160,13 @@ context =
[mariadb-resiliency-after-import-script]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/template/instance-mariadb-resiliency-after-import-script.sh.in
md5sum =
8db483ef7c3da79a1cb5ea07ba79a0ed
md5sum =
b32d9ee1cb85f85d8d2f2b58f58459f1
mode = 755
[template-mariadb]
< = download-base
filename = instance-mariadb.cfg.in
md5sum =
d490407cca70099e8b99021cc9a74c02
md5sum =
4d46ab5aa651a39c4021de6f647e8be9
link-binary =
${coreutils:location}/bin/basename
${coreutils:location}/bin/cat
...
...
@@ -224,7 +224,7 @@ md5sum = e40e2e39f4941c6372f4357e8589a5cf
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum =
2738587138c9bd10af60c6552ecac360
md5sum =
c57404cdbbce6b37554719a894f9a88d
extra-context =
key mariadb_link_binary template-mariadb:link-binary
key zope_link_binary template-zope:link-binary
...
...
stack/erp5/instance-mariadb.cfg.in
View file @
cebedc6d
...
...
@@ -218,6 +218,14 @@ recipe = collective.recipe.template
input = inline: srv/mariadb/**
output = ${directory:srv}/exporter.exclude
[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
dash = {{ parameter_dict['dash-location'] }}/bin/dash
[promise]
recipe = slapos.cookbook:wrapper
command-line = "{{ parameter_dict['bin-directory'] }}/is-local-tcp-port-opened" "${my-cnf-parameters:ip}" "${my-cnf-parameters:port}"
...
...
@@ -233,5 +241,6 @@ parts +=
update-mysql
mysqld
resiliency-exclude-file
resiliency-after-import-script
promise
{{ part_list | join('\n ') }}
stack/erp5/instance.cfg.in
View file @
cebedc6d
...
...
@@ -141,6 +141,7 @@ extra-context =
[dynamic-template-mariadb-parameters]
coreutils-location = {{ coreutils_location }}
dash-location = {{ dash_location }}
findutils-location = {{ findutils_location }}
gzip-location = {{ gzip_location }}
mariadb-location = {{ mariadb_location }}
...
...
@@ -148,6 +149,7 @@ template-my-cnf = {{ template_my_cnf }}
template-mariadb-initial-setup = {{ template_mariadb_initial_setup }}
link-binary = {{ dumps(mariadb_link_binary) }}
bin-directory = {{ bin_directory }}
mariadb-resiliency-after-import-script = {{ mariadb_resiliency_after_import_script }}
[dynamic-template-mariadb]
< = jinja2-template-base
...
...
stack/erp5/template/instance-mariadb-resiliency-after-import-script.sh.in
View file @
cebedc6d
...
...
@@ -12,13 +12,13 @@
set -e
mysql_executable="${
mariadb-instance:mysql-binary
}"
mysql_executable="${
binary-wrap-mysql:wrapper-path
}"
mysqldump_executable="${binary-wrap-mysqldump:wrapper-path}"
mariadb_data_directory="${directory:mariadb-data}"
mariadb_backup_directory="${directory:mariadb-backup-full}"
instance_directory="${buildout:directory}"
pid_file="${m
ariadb-instance
:pid-file}"
binlog_path="${m
ariadb-instance
:binlog-path}"
pid_file="${m
y-cnf-parameters
:pid-file}"
binlog_path="${m
y-cnf-parameters
:binlog-path}"
# Make sure mariadb is not already running
if [ -e "$pid_file" ]; then
...
...
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