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
Klaus Wölfel
slapos
Commits
ae79ce9b
Commit
ae79ce9b
authored
Apr 04, 2014
by
Vincent Pelletier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5.mariadb: Reuse instance-logrotate-base.
parent
fa69efbb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
48 deletions
+10
-48
stack/erp5/buildout.cfg
stack/erp5/buildout.cfg
+2
-2
stack/erp5/instance-mariadb.cfg.in
stack/erp5/instance-mariadb.cfg.in
+7
-46
stack/erp5/instance.cfg.in
stack/erp5/instance.cfg.in
+1
-0
No files found.
stack/erp5/buildout.cfg
View file @
ae79ce9b
...
@@ -181,7 +181,7 @@ context =
...
@@ -181,7 +181,7 @@ context =
[template-mariadb]
[template-mariadb]
< = download-base
< = download-base
filename = instance-mariadb.cfg.in
filename = instance-mariadb.cfg.in
md5sum =
4b8c93c851869cc23f211d87007a3b4d
md5sum =
e83edd4375d4cc22387ad30e5012cbb4
link-binary =
link-binary =
${coreutils:location}/bin/basename
${coreutils:location}/bin/basename
${coreutils:location}/bin/cat
${coreutils:location}/bin/cat
...
@@ -234,7 +234,7 @@ md5sum = a88881e00d56286e16fcaf36d94c025e
...
@@ -234,7 +234,7 @@ md5sum = a88881e00d56286e16fcaf36d94c025e
# XXX: "template.cfg" is hardcoded in instanciation recipe
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
template = ${:_profile_base_location_}/instance.cfg.in
md5sum =
86c86ef2b275ec8699723bd361a37bc0
md5sum =
6b7c9a4e64e488270d1d3b62e6d81f3b
extra-context =
extra-context =
key mariadb_link_binary template-mariadb:link-binary
key mariadb_link_binary template-mariadb:link-binary
key zope_link_binary template-zope:link-binary
key zope_link_binary template-zope:link-binary
...
...
stack/erp5/instance-mariadb.cfg.in
View file @
ae79ce9b
...
@@ -68,8 +68,8 @@ about laxist file mode. -#}
...
@@ -68,8 +68,8 @@ about laxist file mode. -#}
{% if full_backup_retention_days > -1 -%}
{% if full_backup_retention_days > -1 -%}
[{{ section('cron-entry-mariadb-backup') }}]
[{{ section('cron-entry-mariadb-backup') }}]
<= cron
recipe = slapos.cookbook:cron.d
recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries}
name = mariadb-backup
name = mariadb-backup
frequency = 0 22 * * *
frequency = 0 22 * * *
{# When binlogs are enabled:
{# When binlogs are enabled:
...
@@ -85,8 +85,8 @@ file-glob = ??????????????.sql.gz
...
@@ -85,8 +85,8 @@ file-glob = ??????????????.sql.gz
{% if full_backup_retention_days > 0 -%}
{% if full_backup_retention_days > 0 -%}
[{{ section("cron-entry-mariadb-backup-expire") }}]
[{{ section("cron-entry-mariadb-backup-expire") }}]
<= cron
recipe = slapos.cookbook:cron.d
recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries}
name = mariadb-backup-expire
name = mariadb-backup-expire
frequency = 0 22 * * *
frequency = 0 22 * * *
command = {{ parameter_dict['findutils-location'] }}/bin/find "${directory:mariadb-backup-full}" -maxdepth 1 -name "${cron-entry-mariadb-backup:file-glob}" -daystart -mtime +{{ full_backup_retention_days }} -delete
command = {{ parameter_dict['findutils-location'] }}/bin/find "${directory:mariadb-backup-full}" -maxdepth 1 -name "${cron-entry-mariadb-backup:file-glob}" -daystart -mtime +{{ full_backup_retention_days }} -delete
...
@@ -150,47 +150,14 @@ data-directory = ${my-cnf-parameters:data-directory}
...
@@ -150,47 +150,14 @@ data-directory = ${my-cnf-parameters:data-directory}
mysql-install-binary = {{ parameter_dict['mariadb-location'] }}/scripts/mysql_install_db
mysql-install-binary = {{ parameter_dict['mariadb-location'] }}/scripts/mysql_install_db
mysql-base-directory = {{ parameter_dict['mariadb-location'] }}
mysql-base-directory = {{ parameter_dict['mariadb-location'] }}
[logrotate]
recipe = slapos.cookbook:logrotate
# Binaries
logrotate-binary = {{ parameter_dict['logrotate-location'] }}/usr/sbin/logrotate
gzip-binary = {{ parameter_dict['gzip-location'] }}/bin/gzip
gunzip-binary = {{ parameter_dict['gzip-location'] }}/bin/gunzip
# Directories
wrapper = ${directory:bin}/logrotate
conf = ${directory:etc}/logrotate.conf
logrotate-entries = ${directory:logrotate-entries}
backup = ${directory:logrotate-backup}
state-file = ${directory:srv}/logrotate.status
[logrotate-entry-mariadb]
[logrotate-entry-mariadb]
<= logrotate
recipe = slapos.cookbook:logrotate.d
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
name = mariadb
name = mariadb
log = ${my-cnf-parameters:error-log} ${my-cnf-parameters:slow-query-log}
log = ${my-cnf-parameters:error-log} ${my-cnf-parameters:slow-query-log}
post = "${binary-wrap-mysql:wrapper-path}" -B -u root -e "FLUSH LOGS"
post = "${binary-wrap-mysql:wrapper-path}" -B -u root -e "FLUSH LOGS"
[cron]
recipe = slapos.cookbook:cron
dcrond-binary = {{ parameter_dict['dcron-location'] }}/sbin/crond
cron-entries = ${directory:cron-entries}
crontabs = ${directory:crontabs}
cronstamps = ${directory:cronstamps}
catcher = ${cron-simplelogger:wrapper}
binary = ${directory:services}/crond
[cron-simplelogger]
recipe = slapos.cookbook:simplelogger
wrapper = ${directory:bin}/cron_simplelogger
log = ${directory:log}/cron.log
[cron-entry-logrotate]
<= cron
recipe = slapos.cookbook:cron.d
name = logrotate
frequency = 0 0 * * *
command = ${logrotate:wrapper}
[binary-link]
[binary-link]
recipe = slapos.cookbook:symbolic.link
recipe = slapos.cookbook:symbolic.link
target-directory = ${directory:bin}
target-directory = ${directory:bin}
...
@@ -227,15 +194,10 @@ bin = ${buildout:directory}/bin
...
@@ -227,15 +194,10 @@ bin = ${buildout:directory}/bin
etc = ${buildout:directory}/etc
etc = ${buildout:directory}/etc
services = ${:etc}/run
services = ${:etc}/run
promise = ${:etc}/promise
promise = ${:etc}/promise
cron-entries = ${:etc}/cron.d
crontabs = ${:etc}/crontabs
cronstamps = ${:etc}/cronstamps
logrotate-entries = ${:etc}/logrotate.d
srv = ${buildout:directory}/srv
srv = ${buildout:directory}/srv
backup = ${:srv}/backup
backup = ${:srv}/backup
mariadb-backup-full = ${:backup}/mariadb-full
mariadb-backup-full = ${:backup}/mariadb-full
mariadb-backup-incremental = ${:backup}/mariadb-incremental
mariadb-backup-incremental = ${:backup}/mariadb-incremental
logrotate-backup = ${:backup}/logrotate
mariadb-data = ${:srv}/mariadb
mariadb-data = ${:srv}/mariadb
mariadb-ssl = ${:etc}/mariadb-ssl
mariadb-ssl = ${:etc}/mariadb-ssl
var = ${buildout:directory}/var
var = ${buildout:directory}/var
...
@@ -249,12 +211,11 @@ hostname = ${my-cnf-parameters:ip}
...
@@ -249,12 +211,11 @@ hostname = ${my-cnf-parameters:ip}
port = ${my-cnf-parameters:port}
port = ${my-cnf-parameters:port}
[buildout]
[buildout]
parts =
extends =
{{ parameter_dict['instance-logrotate-cfg'] }}
parts +=
publish-mariadb-url
publish-mariadb-url
logrotate
logrotate-entry-mariadb
logrotate-entry-mariadb
cron
cron-entry-logrotate
binary-link
binary-link
update-mysql
update-mysql
mysqld
mysqld
...
...
stack/erp5/instance.cfg.in
View file @
ae79ce9b
...
@@ -187,6 +187,7 @@ mariadb-location = {{ mariadb_location }}
...
@@ -187,6 +187,7 @@ mariadb-location = {{ mariadb_location }}
template-my-cnf = {{ template_my_cnf }}
template-my-cnf = {{ template_my_cnf }}
template-mariadb-initial-setup = {{ template_mariadb_initial_setup }}
template-mariadb-initial-setup = {{ template_mariadb_initial_setup }}
link-binary = {{ dumps(mariadb_link_binary) }}
link-binary = {{ dumps(mariadb_link_binary) }}
instance-logrotate-cfg = {{ template_logrotate_base }}
[dynamic-template-mariadb]
[dynamic-template-mariadb]
< = jinja2-template-base
< = jinja2-template-base
...
...
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