Publish sphinx urls
[slapos.git] / software / erp5 / instance-mariadb.cfg
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 = ${buildout:eggs-directory}
13 develop-eggs-directory = ${buildout: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 dumpname = dump.sql.gz
54 bin-directory = $${rootdirectory:bin}
55 innobackupex-incremental = $${rootdirectory:bin}/innobackupex-incremental
56 innobackupex-full = $${rootdirectory:bin}/innobackupex-full
57
58 # Binary information
59 innobackupex-binary = ${xtrabackup:location}/bin/innobackupex
60 mysql-binary = ${mariadb:location}/bin/mysql
61 mysql-install-binary = ${mariadb:location}/bin/mysql_install_db
62 mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade
63 mysqld-binary = ${mariadb:location}/libexec/mysqld
64 mk-variable-advisor-binary = ${perl:siteprefix}/bin/mk-variable-advisor
65 mk-table-usage-binary = ${perl:siteprefix}/bin/mk-table-usage
66 mk-visual-explain-binary = ${perl:siteprefix}/bin/mk-visual-explain
67 mk-config-diff-binary = ${perl:siteprefix}/bin/mk-config-diff
68 mk-deadlock-logger-binary = ${perl:siteprefix}/bin/mk-deadlock-logger
69 mk-error-log-binary = ${perl:siteprefix}/bin/mk-error-log
70 mk-index-usage-binary = ${perl:siteprefix}/bin/mk-index-usage
71 mk-query-advisor-binary = ${perl:siteprefix}/bin/mk-query-advisor
72 xtrabackup-binary = ${xtrabackup:location}/bin/xtrabackup_51
73 perl-binary = ${perl:location}/bin/perl
74
75 [logrotate]
76 recipe = slapos.cookbook:logrotate
77 # Binaries
78 logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
79 gzip-binary = ${gzip:location}/bin/gzip
80 gunzip-binary = ${gzip:location}/bin/gunzip
81 # Directories
82 wrapper = $${rootdirectory:bin}/logrotate
83 conf = $${rootdirectory:etc}/logrotate.conf
84 logrotate-entries = $${directory:logrotate-entries}
85 backup = $${directory:logrotate-backup}
86 state-file = $${rootdirectory:srv}/logrotate.status
87
88 [logrotate-entry-mariadb]
89 <= logrotate
90 recipe = slapos.cookbook:logrotate.d
91 name = mariadb
92 log = $${mariadb-instance:error-log} $${mariadb-instance:slow-query-log}
93 post = $${mariadb-instance:mysql-binary} --no-defaults -B --socket=$${mariadb-instance:socket} -e "FLUSH LOGS"
94
95 [cron]
96 recipe = slapos.cookbook:cron
97 dcrond-binary = ${dcron:location}/sbin/crond
98 cron-entries = $${directory:cron-entries}
99 crontabs = $${directory:crontabs}
100 cronstamps = $${directory:cronstamps}
101 catcher = $${cron-simplelogger:binary}
102 binary = $${basedirectory:services}/crond
103
104 [cron-simplelogger]
105 recipe = slapos.cookbook:simplelogger
106 binary = $${rootdirectory:bin}/cron_simplelogger
107 output = $${directory:cronoutput}
108
109 [cron-entry-logrotate]
110 <= cron
111 recipe = slapos.cookbook:cron.d
112 name = logrotate
113 frequency = 0 0 * * *
114 command = $${logrotate:wrapper}
115
116 [binary-link]
117 recipe = slapos.cookbook:symbolic.link
118 target-directory = $${rootdirectory:bin}
119 link-binary = 
120   ${coreutils:location}/bin/basename
121   ${coreutils:location}/bin/cat
122   ${coreutils:location}/bin/cp
123   ${coreutils:location}/bin/ls
124   ${coreutils:location}/bin/tr
125   ${coreutils:location}/bin/uname
126   ${grep:location}/bin/grep
127   ${sed:location}/bin/sed
128   ${mariadb:location}/bin/mysql
129
130 [rootdirectory]
131 recipe = slapos.cookbook:mkdirectory
132 etc = $${buildout:directory}/etc
133 var = $${buildout:directory}/var
134 srv = $${buildout:directory}/srv
135 bin = $${buildout:directory}/bin
136
137 [basedirectory]
138 recipe = slapos.cookbook:mkdirectory
139 log = $${rootdirectory:var}/log
140 services = $${rootdirectory:etc}/run
141 run = $${rootdirectory:var}/run
142 backup = $${rootdirectory:srv}/backup
143
144 [directory]
145 recipe = slapos.cookbook:mkdirectory
146 cron-entries = $${rootdirectory:etc}/cron.d
147 crontabs = $${rootdirectory:etc}/crontabs
148 cronstamps = $${rootdirectory:etc}/cronstamps
149 cronoutput = $${basedirectory:log}/cron
150 ca-dir = $${rootdirectory:srv}/ssl
151 mariadb-backup-full = $${basedirectory:backup}/mariadb-full
152 mariadb-backup-incremental = $${basedirectory:backup}/mariadb-incremental
153 mariadb-data = $${rootdirectory:srv}/mariadb
154 logrotate-backup = $${basedirectory:backup}/logrotate
155 logrotate-entries = $${rootdirectory:etc}/logrotate.d
156