Davstorage+ajaxplorer software release v1
[slapos.git] / software / davstorage / instance-davstorage.cfg
1 [buildout]
2 parts =
3   davstorage
4   publish-connection-informations
5   certificate-authority
6   ca-davstorage
7   cron
8   cron-entry-logrotate
9   logrotate
10   logrotate-entry-davstorage
11   request-frontend
12   frontend-ajaxupload-promise
13
14 eggs-directory = ${buildout:eggs-directory}
15 develop-eggs-directory = ${buildout:develop-eggs-directory}
16 offline = true
17
18 [publish-connection-informations]
19 recipe = slapos.cookbook:publish
20 webdav_access = $${request-frontend:connection-site_url}
21 url = $${request-frontend-ajaxupload:connection-site_url}
22 webdav_user = $${davstorage:user}
23 webdav_password = $${davstorage:password}
24
25 [davstorage]
26 recipe = slapos.cookbook:davstorage
27 user = user
28 password = insecure
29 port_webdav = 8080
30 port_ajax = 8070
31 ip = $${slap-network-information:global-ipv6}
32
33 # Path
34 wrapper = $${rootdirectory:bin}/davstorage
35 error-log = $${directory:davstorage-log}/error.log
36 access-log = $${directory:davstorage-log}/access.log
37 pid-file = $${basedirectory:run}/davstorage.pid
38 lock-file = $${basedirectory:run}/davstorage.lock
39 davdb-lock = $${basedirectory:run}/davdb.lock
40 key-file = $${ca-davstorage:key-file}
41 cert-file = $${ca-davstorage:cert-file}
42 conf-file = $${directory:davstorage-conf}/davstorage.conf
43 htdocs = $${directory:htdocs}
44 root = $${buildout:directory}
45 email-address = admin+davstorage@vifib.net
46 htpasswd-file = $${directory:davstorage-conf}/davstorage.htpasswd
47 promise = $${basedirectory:promises}/davstorage
48 php-ini-dir = $${directory:php-ini-dir}
49 tmp-dir = $${directory:tmp-php}
50
51 # Binaries
52 apache-binary = ${apache:location}/bin/httpd
53 apache-modules-dir = ${apache:location}/modules/
54 apache-mime-file = ${apache:location}/conf/mime.types
55 apache-htpasswd = ${apache:location}/bin/htpasswd
56 source = ${application:location}
57
58 [certificate-authority]
59 recipe = slapos.cookbook:certificate_authority
60 openssl-binary = ${openssl:location}/bin/openssl
61 ca-dir = $${directory:ca-dir}
62 requests-directory = $${cadirectory:requests}
63 wrapper = $${basedirectory:services}/certificate_authority
64 ca-private = $${cadirectory:private}
65 ca-certs = $${cadirectory:certs}
66 ca-newcerts = $${cadirectory:newcerts}
67 ca-crl = $${cadirectory:crl}
68
69 [cron]
70 recipe = slapos.cookbook:cron
71 dcrond-binary = ${dcron:location}/sbin/crond
72 cron-entries = $${directory:cron-entries}
73 crontabs = $${directory:crontabs}
74 cronstamps = $${directory:cronstamps}
75 catcher = $${cron-simplelogger:wrapper}
76 binary = $${basedirectory:services}/crond
77
78 [logrotate]
79 recipe = slapos.cookbook:logrotate
80 # Binaries
81 logrotate-binary = ${logrotate:location}/usr/sbin/logrotate
82 gzip-binary = ${gzip:location}/bin/gzip
83 gunzip-binary = ${gzip:location}/bin/gunzip
84 # Directories
85 wrapper = $${rootdirectory:bin}/logrotate
86 conf = $${rootdirectory:etc}/logrotate.conf
87 logrotate-entries = $${directory:logrotate-entries}
88 backup = $${directory:logrotate-backup}
89 state-file = $${rootdirectory:srv}/logrotate.status
90
91 [cron-entry-logrotate]
92 <= cron
93 recipe = slapos.cookbook:cron.d
94 name = logrotate
95 frequency = 0 0 * * *
96 command = $${logrotate:wrapper}
97
98 [cron-simplelogger]
99 recipe = slapos.cookbook:simplelogger
100 wrapper = $${rootdirectory:bin}/cron_simplelogger
101 log = $${basedirectory:log}/crond.log
102
103
104 [logrotate-entry-davstorage]
105 <= logrotate
106 recipe = slapos.cookbook:logrotate.d
107 name = davstorage
108 log = $${davstorage:error-log} $${davstorage:access-log}
109 frequency = daily
110 rotate-num = 30
111 sharedscripts = true
112 notifempty = true
113 create = true
114
115 [cadirectory]
116 recipe = slapos.cookbook:mkdirectory
117 requests = $${directory:ca-dir}/requests/
118 private = $${directory:ca-dir}/private/
119 certs = $${directory:ca-dir}/certs/
120 newcerts = $${directory:ca-dir}/newcerts/
121 crl = $${directory:ca-dir}/crl/
122
123 [ca-davstorage]
124 <= certificate-authority
125 recipe = slapos.cookbook:certificate_authority.request
126 key-file = $${directory:davstorage-conf}/davstorage.key
127 cert-file = $${directory:davstorage-conf}/davstorage.crt
128 executable = $${davstorage:wrapper}
129 wrapper = $${basedirectory:services}/davstorage
130
131 [rootdirectory]
132 recipe = slapos.cookbook:mkdirectory
133 etc = $${buildout:directory}/etc/
134 var = $${buildout:directory}/var/
135 srv = $${buildout:directory}/srv/
136 bin = $${buildout:directory}/bin/
137 tmp = $${buildout:directory}/tmp/
138
139 [basedirectory]
140 recipe = slapos.cookbook:mkdirectory
141 log = $${rootdirectory:var}/log/
142 services = $${rootdirectory:etc}/run/
143 run = $${rootdirectory:var}/run/
144 backup = $${rootdirectory:srv}/backup/
145 promises = $${rootdirectory:etc}/promise/
146
147 [directory]
148 recipe = slapos.cookbook:mkdirectory
149 htdocs = $${rootdirectory:srv}/www/
150 davstorage-log = $${basedirectory:log}/davstorage/
151 logrotate-backup = $${basedirectory:backup}/logrotate/
152 logrotate-entries = $${rootdirectory:etc}/logrotate.d/
153 davstorage-conf = $${rootdirectory:etc}/davstorage/
154 ca-dir = $${rootdirectory:srv}/ssl/
155 cron-entries = $${rootdirectory:etc}/cron.d/
156 crontabs = $${rootdirectory:etc}/crontabs/
157 cronstamps = $${rootdirectory:etc}/cronstamps/
158 cronoutput = $${basedirectory:log}/cron/
159 php-ini-dir = $${rootdirectory:etc}/php
160 tmp-php = $${rootdirectory:tmp}/php
161
162 # Request frontend
163 [request-frontend-ajaxupload]
164 <= slap-connection
165 recipe = slapos.cookbook:requestoptional
166 name = Frontend Ajax
167 # XXX We have hardcoded SR URL here.
168 software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
169 slave = true
170 config = url https-only
171 config-https-only = true
172 config-url = https://[$${davstorage:ip}]:$${davstorage:port_ajax}/
173 return = site_url
174
175 [request-frontend]
176 <= slap-connection
177 recipe = slapos.cookbook:requestoptional
178 name = Frontend Webdav
179 # XXX We have hardcoded SR URL here.
180 software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
181 slave = true
182 config = url https-only
183 config-https-only = true
184 config-url = https://$${davstorage:user}:$${davstorage:password}@[$${davstorage:ip}]:$${davstorage:port_webdav}/
185 return = site_url
186
187 [frontend-ajaxupload-promise]
188 recipe = slapos.cookbook:check_url_available
189 path = $${basedirectory:promises}/frontend-ajaxupload
190 url = $${request-frontend-ajaxupload:connection-site_url}
191 dash_path = ${dash:location}/bin/dash
192 curl_path = ${curl:location}/bin/curl