Remove trailing whitespaces.
[slapos.git] / software / erp5 / instance-mariadb.cfg.in
1 [buildout]
2 parts =
3   publish-mariadb-url
4   mariadb-instance
5   logrotate
6   logrotate-entry-mariadb
7   cron
8   cron-entry-logrotate
9   cron-entry-mariadb-backup
10   binary-link
11
12 eggs-directory = {{ eggs_directory }}
13 develop-eggs-directory = {{ develop_eggs_directory }}
14 offline = true
15
16 [publish-mariadb-url]
17 recipe = slapos.cookbook:publishurl
18 url = mysql://${mariadb-instance:user}:${mariadb-instance:password}@${mariadb-instance:ip}:${mariadb-instance:port}/${mariadb-instance:database}
19
20 [cron-entry-mariadb-backup]
21 <= cron
22 recipe = slapos.cookbook:cron.d
23 name = mariadb-backup
24 frequency = 0 0 * * *
25 command = ${mariadb-instance:backup-script}
26
27 [mariadb-instance]
28 recipe = slapos.cookbook:generic.mysql
29
30 # Options
31 user = user
32 parallel-test-database-amount = 100
33 port = 45678
34 ip = ${slap-network-information:local-ipv4}
35 database = erp5
36 test-user = erp5_test
37 test-database = erp5_test
38 mysql-test-database-base = testdb
39 mysql-test-user-base = testuser
40
41 # Paths
42 wrapper = ${basedirectory:services}/mariadb
43 update-wrapper = ${basedirectory:services}/mariadb_update
44 backup-script = ${rootdirectory:bin}/innobackupex-controller
45 full-backup-directory = ${directory:mariadb-backup-full}
46 incremental-backup-directory = ${directory:mariadb-backup-incremental}
47 data-directory = ${directory:mariadb-data}
48 pid-file = ${basedirectory:run}/mariadb.pid
49 socket = ${basedirectory:run}/mariadb.sock
50 error-log = ${basedirectory:log}/mariadb_error.log
51 slow-query-log = ${basedirectory:log}/mariadb_slowquery.log
52 conf-file = ${rootdirectory:etc}/mariadb.cnf
53 bin-directory = ${rootdirectory:bin}
54 innobackupex-incremental = ${rootdirectory:bin}/innobackupex-incremental
55 innobackupex-full = ${rootdirectory:bin}/innobackupex-full
56
57 # Binary information
58 innobackupex-binary = {{ xtrabackup_location }}/bin/innobackupex
59 mysql-binary = {{ mariadb_location }}/bin/mysql
60 mysql-install-binary = {{ mariadb_location }}/bin/mysql_install_db
61 mysql-upgrade-binary = {{ mariadb_location }}/bin/mysql_upgrade
62 mysqld-binary = {{ mariadb_location }}/libexec/mysqld
63 pt-archiver-binary = {{ perl_siteprefix }}/bin/pt-archiver
64 pt-config-diff-binary = {{ perl_siteprefix }}/bin/pt-config-diff
65 pt-deadlock-logger-binary = {{ perl_siteprefix }}/bin/pt-deadlock-logger
66 pt-duplicate-key-checker-binary = {{ perl_siteprefix }}/bin/pt-duplicate-key-checker
67 pt-fifo-split-binary = {{ perl_siteprefix }}/bin/pt-fifo-split
68 pt-find-binary = {{ perl_siteprefix }}/bin/pt-find
69 pt-fk-error-logger-binary = {{ perl_siteprefix }}/bin/pt-fk-error-logger
70 pt-heartbeat-binary = {{ perl_siteprefix }}/bin/pt-heartbeat
71 pt-index-usage-binary = {{ perl_siteprefix }}/bin/pt-index-usage
72 pt-kill-binary = {{ perl_siteprefix }}/bin/pt-kill
73 pt-log-player-binary = {{ perl_siteprefix }}/bin/pt-log-player
74 pt-online-schema-change-binary = {{ perl_siteprefix }}/bin/pt-online-schema-change
75 pt-query-advisor-binary = {{ perl_siteprefix }}/bin/pt-query-advisor
76 pt-query-digest-binary = {{ perl_siteprefix }}/bin/pt-query-digest
77 pt-show-grants-binary = {{ perl_siteprefix }}/bin/pt-show-grants
78 pt-slave-delay-binary = {{ perl_siteprefix }}/bin/pt-slave-delay
79 pt-slave-find-binary = {{ perl_siteprefix }}/bin/pt-slave-find
80 pt-slave-restart-binary = {{ perl_siteprefix }}/bin/pt-slave-restart
81 pt-table-checksum-binary = {{ perl_siteprefix }}/bin/pt-table-checksum
82 pt-table-sync-binary = {{ perl_siteprefix }}/bin/pt-table-sync
83 pt-tcp-model-binary = {{ perl_siteprefix }}/bin/pt-tcp-model
84 pt-trend-binary = {{ perl_siteprefix }}/bin/pt-trend
85 pt-upgrade-binary = {{ perl_siteprefix }}/bin/pt-upgrade
86 pt-variable-advisor-binary = {{ perl_siteprefix }}/bin/pt-variable-advisor
87 pt-visual-explain-binary = {{ perl_siteprefix }}/bin/pt-visual-explain
88 xtrabackup-binary = {{ xtrabackup_location }}/bin/xtrabackup_51
89 perl-binary = {{ perl_location }}/bin/perl
90
91 [logrotate]
92 recipe = slapos.cookbook:logrotate
93 # Binaries
94 logrotate-binary = {{ logrotate_location }}/usr/sbin/logrotate
95 gzip-binary = {{ gzip_location }}/bin/gzip
96 gunzip-binary = {{ gzip_location }}/bin/gunzip
97 # Directories
98 wrapper = ${rootdirectory:bin}/logrotate
99 conf = ${rootdirectory:etc}/logrotate.conf
100 logrotate-entries = ${directory:logrotate-entries}
101 backup = ${directory:logrotate-backup}
102 state-file = ${rootdirectory:srv}/logrotate.status
103
104 [logrotate-entry-mariadb]
105 <= logrotate
106 recipe = slapos.cookbook:logrotate.d
107 name = mariadb
108 log = ${mariadb-instance:error-log} ${mariadb-instance:slow-query-log}
109 post = ${mariadb-instance:mysql-binary} --no-defaults -B --socket=${mariadb-instance:socket} -e "FLUSH LOGS"
110
111 [cron]
112 recipe = slapos.cookbook:cron
113 dcrond-binary = {{ dcron_location }}/sbin/crond
114 cron-entries = ${directory:cron-entries}
115 crontabs = ${directory:crontabs}
116 cronstamps = ${directory:cronstamps}
117 catcher = ${cron-simplelogger:wrapper}
118 binary = ${basedirectory:services}/crond
119
120 [cron-simplelogger]
121 recipe = slapos.cookbook:simplelogger
122 wrapper = ${rootdirectory:bin}/cron_simplelogger
123 log = ${basedirectory:log}/cron.log
124
125 [cron-entry-logrotate]
126 <= cron
127 recipe = slapos.cookbook:cron.d
128 name = logrotate
129 frequency = 0 0 * * *
130 command = ${logrotate:wrapper}
131
132 [binary-link]
133 recipe = slapos.cookbook:symbolic.link
134 target-directory = ${rootdirectory:bin}
135 link-binary =
136   {{ coreutils_location }}/bin/basename
137   {{ coreutils_location }}/bin/cat
138   {{ coreutils_location }}/bin/cp
139   {{ coreutils_location }}/bin/ls
140   {{ coreutils_location }}/bin/tr
141   {{ coreutils_location }}/bin/uname
142   {{ gettext_location }}/lib/gettext/hostname
143   {{ grep_location }}/bin/grep
144   {{ sed_location }}/bin/sed
145   {{ mariadb_location }}/bin/mysql
146
147 [rootdirectory]
148 recipe = slapos.cookbook:mkdirectory
149 etc = ${buildout:directory}/etc
150 var = ${buildout:directory}/var
151 srv = ${buildout:directory}/srv
152 bin = ${buildout:directory}/bin
153
154 [basedirectory]
155 recipe = slapos.cookbook:mkdirectory
156 log = ${rootdirectory:var}/log
157 services = ${rootdirectory:etc}/run
158 run = ${rootdirectory:var}/run
159 backup = ${rootdirectory:srv}/backup
160
161 [directory]
162 recipe = slapos.cookbook:mkdirectory
163 cron-entries = ${rootdirectory:etc}/cron.d
164 crontabs = ${rootdirectory:etc}/crontabs
165 cronstamps = ${rootdirectory:etc}/cronstamps
166 ca-dir = ${rootdirectory:srv}/ssl
167 mariadb-backup-full = ${basedirectory:backup}/mariadb-full
168 mariadb-backup-incremental = ${basedirectory:backup}/mariadb-incremental
169 mariadb-data = ${rootdirectory:srv}/mariadb
170 logrotate-backup = ${basedirectory:backup}/logrotate
171 logrotate-entries = ${rootdirectory:etc}/logrotate.d
172