Use fixed version of setuptools
[slapos.git] / software / ajaxplorer / instance-mariadb.cfg
1 [buildout]
2 parts =
3   urls
4   mariadb
5   stunnel
6   certificate-authority
7   ca-stunnel
8   logrotate
9   logrotate-entry-mariadb
10   logrotate-entry-stunnel
11   logrotate-entry-cron
12   cron
13   cron-entry-logrotate
14   slapmonitor
15   slapreport
16
17 gzip-binary = ${gzip:location}/bin/gzip
18
19 eggs-directory = ${buildout:eggs-directory}
20 develop-eggs-directory = ${buildout:develop-eggs-directory}
21 offline = true
22
23 [rootdirectory]
24 recipe = slapos.cookbook:mkdirectory
25 etc = $${buildout:directory}/etc/
26 var = $${buildout:directory}/var/
27 srv = $${buildout:directory}/srv/
28 bin = $${buildout:directory}/bin/
29
30 [basedirectory]
31 recipe = slapos.cookbook:mkdirectory
32 log = $${rootdirectory:var}/log/
33 scripts = $${rootdirectory:etc}/run/
34 services = $${rootdirectory:etc}/service/
35 run = $${rootdirectory:var}/run/
36 backup = $${rootdirectory:srv}/backup/
37 promises = $${rootdirectory:etc}/promise/
38
39 [directory]
40 recipe = slapos.cookbook:mkdirectory
41 cron-entries = $${rootdirectory:etc}/cron.d/
42 crontabs = $${rootdirectory:etc}/crontabs/
43 cronstamps = $${rootdirectory:etc}/cronstamps/
44 ca-dir = $${rootdirectory:srv}/ssl/
45 mariadb-data = $${rootdirectory:srv}/mariadb/
46 logrotate-backup = $${basedirectory:backup}/logrotate/
47 stunnel-conf = $${rootdirectory:etc}/stunnel/
48 logrotate-entries = $${rootdirectory:etc}/logrotate.d/
49
50 [urls]
51 recipe = slapos.cookbook:publish
52 url = mysqls://$${mariadb:user}:$${mariadb:password}@[$${stunnel:remote-host}]:$${stunnel:remote-port}/$${mariadb:database}
53
54 [mariadb]
55 recipe = slapos.cookbook:mysql
56
57 # Options
58 recovering = false
59 user = dbuser
60 port = 3306
61 password = $${mysql-password:passwd}
62 ip = $${slap-network-information:local-ipv4}
63 database = mydb
64
65 # Paths
66 wrapper = $${basedirectory:services}/mariadb
67 update-wrapper = $${basedirectory:scripts}/mariadb_update
68 logrotate-post = $${rootdirectory:bin}/mariadb_post_logrotate
69 data-directory = $${directory:mariadb-data}
70 pid-file = $${basedirectory:run}/mariadb.pid
71 socket = $${basedirectory:run}/mariadb.sock
72 error-log = $${basedirectory:log}/mariadb_error.log
73 conf-file = $${rootdirectory:etc}/mariadb.cnf
74 promise = $${basedirectory:promises}/mysql
75
76 # Binary information
77 mysql-base-directory = ${mariadb:location}
78 mysql-binary = ${mariadb:location}/bin/mysql
79 mysql-install-binary = ${mariadb:location}/scripts/mysql_install_db
80 mysql-upgrade-binary = ${mariadb:location}/bin/mysql_upgrade
81 mysqld-binary = ${mariadb:location}/bin/mysqld
82
83 [mysql-password]
84 recipe = slapos.cookbook:generate.password
85 storage-path = $${rootdirectory:etc}/.passwd
86 bytes = 4
87
88 [slapmonitor]
89 recipe = slapos.cookbook:slapmonitor
90 pid-file = $${basedirectory:run}/mariadb.pid
91 database-path = $${basedirectory:log}/slapmonitor.db
92 shell-path = ${dash:location}/bin/dash
93 slapmonitor-path = ${buildout:bin-directory}/slapmonitor
94 path = $${basedirectory:scripts}/slapmonitor
95
96 [slapreport]
97 recipe = slapos.cookbook:slapreport
98 pid-file = $${basedirectory:run}/mariadb.pid
99 consumption-log-path = $${basedirectory:log}/instance_consumption.log
100 database-path = $${basedirectory:log}/slapmonitor.db
101 logbox-ip = 87.98.152.12
102 logbox-port = 5122
103 logbox-user = admin
104 logbox-passwd = passer
105 shell-path = ${dash:location}/bin/dash
106 slapreport-path = ${buildout:bin-directory}/slapreport
107 path = $${basedirectory:scripts}/slapreport
108
109 [certificate-authority]
110 recipe = slapos.cookbook:certificate_authority
111 openssl-binary = ${openssl:location}/bin/openssl
112 ca-dir = $${directory:ca-dir}
113 requests-directory = $${cadirectory:requests}
114 wrapper = $${basedirectory:services}/ca
115 ca-private = $${cadirectory:private}
116 ca-certs = $${cadirectory:certs}
117 ca-newcerts = $${cadirectory:newcerts}
118 ca-crl = $${cadirectory:crl}
119
120 [cadirectory]
121 recipe = slapos.cookbook:mkdirectory
122 requests = $${directory:ca-dir}/requests/
123 private = $${directory:ca-dir}/private/
124 certs = $${directory:ca-dir}/certs/
125 newcerts = $${directory:ca-dir}/newcerts/
126 crl = $${directory:ca-dir}/crl/
127
128 [ca-stunnel]
129 <= certificate-authority
130 recipe = slapos.cookbook:certificate_authority.request
131 executable = $${stunnel:wrapper}
132 wrapper = $${basedirectory:services}/stunnel
133 key-file = $${stunnel:key-file}
134 cert-file = $${stunnel:cert-file}
135
136 [stunnel]
137 recipe = slapos.cookbook:stunnel
138 stunnel-binary = ${stunnel:location}/bin/stunnel
139 wrapper = $${rootdirectory:bin}/stunnel
140 log-file = $${basedirectory:log}/stunnel.log
141 config-file = $${directory:stunnel-conf}/stunnel.conf
142 key-file = $${directory:stunnel-conf}/stunnel.key
143 cert-file = $${directory:stunnel-conf}/stunnel.crt
144 pid-file = $${basedirectory:run}/stunnel.pid
145 local-host = $${mariadb:ip}
146 local-port = $${mariadb:port}
147 remote-host = $${slap-network-information:global-ipv6}
148 remote-port = 6446
149 client = false
150 post-rotate-script = $${rootdirectory:bin}/stunnel_post_rotate
151
152 [logrotate]
153 recipe = slapos.cookbook:logrotate
154 # Binaries
155 logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
156 gzip-binary = $${buildout:gzip-binary}
157 gunzip-binary = ${gzip:location}/bin/gunzip
158 # Directories
159 wrapper = $${rootdirectory:bin}/logrotate
160 conf = $${rootdirectory:etc}/logrotate.conf
161 logrotate-entries = $${directory:logrotate-entries}
162 backup = $${directory:logrotate-backup}
163 state-file = $${rootdirectory:srv}/logrotate.status
164
165 [logrotate-entry-mariadb]
166 <= logrotate
167 recipe = slapos.cookbook:logrotate.d
168 name = mariadb
169 log = $${mariadb:error-log}
170 frequency = daily
171 rotate-num = 30
172 post = $${mariadb:logrotate-post}
173 sharedscripts = true
174 notifempty = true
175 create = true
176
177 [logrotate-entry-stunnel]
178 <= logrotate
179 recipe = slapos.cookbook:logrotate.d
180 name = stunnel
181 log = $${stunnel:log-file}
182 frequency = daily
183 rotate-num = 30
184 notifempty = true
185 create = true
186 post = $${stunnel:post-rotate-script}
187
188 [logrotate-entry-cron]
189 <= logrotate
190 recipe =slapos.cookbook:logrotate.d
191 name = crond
192 log = $${cron-simplelogger:log}
193 frequency = daily
194 rotate-num = 30
195 notifempty = true
196 create = true
197
198 [cron]
199 recipe = slapos.cookbook:cron
200 dcrond-binary = ${dcron:location}/sbin/crond
201 cron-entries = $${directory:cron-entries}
202 crontabs = $${directory:crontabs}
203 cronstamps = $${directory:cronstamps}
204 catcher = $${cron-simplelogger:wrapper}
205 binary = $${basedirectory:services}/crond
206
207 [cron-simplelogger]
208 recipe = slapos.cookbook:simplelogger
209 wrapper = $${rootdirectory:bin}/cron_simplelogger
210 log = $${basedirectory:log}/crond.log
211
212 [cron-entry-logrotate]
213 <= cron
214 recipe = slapos.cookbook:cron.d
215 name = logrotate
216 frequency = 0 0 * * *
217 command = $${logrotate:wrapper}
218
219 [slap-parameter]
220 #Default  value if no ssh parameters specified
221 logbox-ip =
222 logbox-port =
223 logbox-user =
224 logbox-passwd =