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
zhifan huang
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 =
[template-mariadb]
< = download-base
filename = instance-mariadb.cfg.in
md5sum =
4b8c93c851869cc23f211d87007a3b4d
md5sum =
e83edd4375d4cc22387ad30e5012cbb4
link-binary =
${coreutils:location}/bin/basename
${coreutils:location}/bin/cat
...
...
@@ -234,7 +234,7 @@ md5sum = a88881e00d56286e16fcaf36d94c025e
# XXX: "template.cfg" is hardcoded in instanciation recipe
filename = template.cfg
template = ${:_profile_base_location_}/instance.cfg.in
md5sum =
86c86ef2b275ec8699723bd361a37bc0
md5sum =
6b7c9a4e64e488270d1d3b62e6d81f3b
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 @
ae79ce9b
...
...
@@ -68,8 +68,8 @@ about laxist file mode. -#}
{% if full_backup_retention_days > -1 -%}
[{{ section('cron-entry-mariadb-backup') }}]
<= cron
recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries}
name = mariadb-backup
frequency = 0 22 * * *
{# When binlogs are enabled:
...
...
@@ -85,8 +85,8 @@ file-glob = ??????????????.sql.gz
{% if full_backup_retention_days > 0 -%}
[{{ section("cron-entry-mariadb-backup-expire") }}]
<= cron
recipe = slapos.cookbook:cron.d
cron-entries = ${cron:cron-entries}
name = mariadb-backup-expire
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
...
...
@@ -150,47 +150,14 @@ data-directory = ${my-cnf-parameters:data-directory}
mysql-install-binary = {{ parameter_dict['mariadb-location'] }}/scripts/mysql_install_db
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
recipe = slapos.cookbook:logrotate.d
logrotate-entries = ${logrotate:logrotate-entries}
backup = ${logrotate:backup}
name = mariadb
log = ${my-cnf-parameters:error-log} ${my-cnf-parameters:slow-query-log}
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]
recipe = slapos.cookbook:symbolic.link
target-directory = ${directory:bin}
...
...
@@ -227,15 +194,10 @@ bin = ${buildout:directory}/bin
etc = ${buildout:directory}/etc
services = ${:etc}/run
promise = ${:etc}/promise
cron-entries = ${:etc}/cron.d
crontabs = ${:etc}/crontabs
cronstamps = ${:etc}/cronstamps
logrotate-entries = ${:etc}/logrotate.d
srv = ${buildout:directory}/srv
backup = ${:srv}/backup
mariadb-backup-full = ${:backup}/mariadb-full
mariadb-backup-incremental = ${:backup}/mariadb-incremental
logrotate-backup = ${:backup}/logrotate
mariadb-data = ${:srv}/mariadb
mariadb-ssl = ${:etc}/mariadb-ssl
var = ${buildout:directory}/var
...
...
@@ -249,12 +211,11 @@ hostname = ${my-cnf-parameters:ip}
port = ${my-cnf-parameters:port}
[buildout]
parts =
extends =
{{ parameter_dict['instance-logrotate-cfg'] }}
parts +=
publish-mariadb-url
logrotate
logrotate-entry-mariadb
cron
cron-entry-logrotate
binary-link
update-mysql
mysqld
...
...
stack/erp5/instance.cfg.in
View file @
ae79ce9b
...
...
@@ -187,6 +187,7 @@ mariadb-location = {{ mariadb_location }}
template-my-cnf = {{ template_my_cnf }}
template-mariadb-initial-setup = {{ template_mariadb_initial_setup }}
link-binary = {{ dumps(mariadb_link_binary) }}
instance-logrotate-cfg = {{ template_logrotate_base }}
[dynamic-template-mariadb]
< = 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