· 9 years ago · Sep 15, 2016, 11:54 AM
1{%- macro password(size=32) -%}
2{% for index in range(size) %}{{ 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'|random }}{% endfor %}
3{%- endmacro %}
4{%- macro port(size=3) -%}
5{% for index in range(size) %}{{ '0123456789'|random }}{% endfor %}
6{%- endmacro %}
7# {{ description }}
8parameters:
9 _param:
10 nginx_leonardo_{{ name }}_host: leonardo-{{ name }}.${linux:network:fqdn}
11 leonardo_secret_key: secret
12 postgresql_leonardo_{{ name }}_password: {{ password(32) }}
13 leonardo_{{ name }}_logging_dsn: http://baa956c3ea324331b7e138f325ef4bf7:6d03a2a9328e411eac24ca4e2b427ee3@ci.tnsjachym.cz/6
14# change this defauts if need it
15 leonardo_{{ name }}_mail_host: ${_param:leonardo_robotice_mail_host}
16 leonardo_{{ name }}_mail_port: ${_param:leonardo_robotice_mail_port}
17 leonardo_{{ name }}_mail_user: ${_param:leonardo_robotice_mail_user}
18 leonardo_{{ name }}_mail_password: ${_param:leonardo_robotice_mail_password}
19 leonardo_{{ name }}_mail_encryption: ${_param:leonardo_robotice_mail_encryption}
20 leonardo_{{ name }}_mail_encryption: ${_param:leonardo_robotice_mail_encryption}
21 supervisor:
22 server:
23 service:
24 leonardo_{{ name }}:
25 name: {{ name }}
26 type: leonardo
27 leonardo:
28 server:
29 app:
30 {{ name }}:
31 enabled: true
32 backup: true
33 workers: 1
34 bind:
35 address: localhost
36 protocol: tcp
37 port: 8{{ port(3) }}
38 enabled: true
39 {%- if workers %}
40 worker: true
41 {%- endif %}
42 secret_key: ${_param:leonardo_secret_key}
43 source:
44 engine: git
45 address: git@repo1.robotice.cz:python-apps/django-leonardo.git
46 rev: stable/1.0
47 initial_data:
48 engine: backupninja
49 source: backup.robotice.org
50 host: leonardo-multi.mjk.vpc20.cloudlab.cz
51 name: {{ name }}
52 database:
53 engine: postgres
54 host: 127.0.0.1
55 name: leonardo_{{ name }}
56 password: ${_param:postgresql_leonardo_{{ name }}_password}
57 user: leonardo_{{ name }}
58 mail:
59 engine: smtp
60 host: ${_param:leonardo_{{ name }}_mail_host}
61 port: ${_param:leonardo_{{ name }}_mail_port}
62 user: ${_param:leonardo_{{ name }}_mail_user}
63 password: ${_param:leonardo_{{ name }}_mail_password}
64 encryption: ${_param:leonardo_{{ name }}_mail_encryption}
65 plugin:
66 static: {}
67 {%- if pagepermissions %}
68 pagepermissions: {}
69 {%- endif %}
70 {%- if blog %}
71 blog:
72 source:
73 engine: git
74 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-module-blog.git#egg=leonardo_module_blog'
75 elephantblog:
76 source:
77 engine: git
78 address: 'git+https://github.com/michaelkuty/feincms-elephantblog.git@next#egg=elephantblog'
79 {%- endif %}
80 {%- if oembed %}
81 oembed:
82 source:
83 engine: git
84 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-oembed.git#egg=leonardo_oembed'
85 {%- endif %}
86 {%- if epic_editor %}
87 epic_editor:
88 source:
89 engine: git
90 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-epiceditor.git#egg=leonardo_epiceditor'
91 {%- endif %}
92 {%- if forms %}
93 forms:
94 source:
95 engine: git
96 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-module-forms.git#egg=leonardo_module_forms'
97 {%- endif %}
98 {%- if admin_sso %}
99 admin-sso:
100 source:
101 engine: git
102 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-admin-sso.git#egg=leonardo_admin_sso'
103 {%- endif %}
104 {%- if events %}
105 events:
106 source:
107 engine: git
108 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-agenda.git#egg=leonardo_agenda'
109 agenda:
110 source:
111 engine: git
112 address: 'git+https://github.com/michaelkuty/feincms-elephantagenda.git#egg=elephantagenda'
113 {%- endif %}
114 {%- if czech_store %}
115 leonardo_store_cz:
116 source:
117 engine: git
118 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-store-cz.git#egg=leonardo_store_cz'
119 {%- endif %}
120 {%- if store_cash_on_delivery %}
121 leonardo_store_cod:
122 source:
123 engine: git
124 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-store-cash-on-delivery.git#egg=leonardo_store_cod'
125 {%- endif %}
126 {%- if workers %}
127 leonardo-celery:
128 source:
129 engine: git
130 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-celery.git#egg=leonardo_celery'
131 {%- endif %}
132 {%- if links %}
133 links:
134 source:
135 engine: git
136 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-module-links.git#egg=leonardo_module_links'
137 {%- endif %}
138 {%- if redirects %}
139 redirects:
140 source:
141 engine: git
142 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-sane-redirects.git#egg=leonardo_sane_redirects'
143 {%- endif %}
144 {%- if forum %}
145 redirects:
146 source:
147 engine: git
148 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-spirit.git#egg=leonardo_spirit'
149 {%- endif %}
150 {%- if auth_ldap %}
151 redirects:
152 source:
153 engine: git
154 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-auth-ldap.git#egg=leonardo_auth_ldap'
155 {%- endif %}
156 {%- if auth_kerberos %}
157 redirects:
158 source:
159 engine: git
160 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-auth-kerberos.git#egg=leonardo_auth_kerberos'
161 {%- endif %}
162 {%- if team %}
163 team:
164 source:
165 engine: git
166 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-team.git#egg=team'
167 {%- endif %}
168 {%- if theme_bootswatch %}
169 theme_bootswatch:
170 source:
171 engine: git
172 address: 'git+git@repo1.robotice.cz:leonardo-themes/bootswatch-theme.git@site/mjk#egg=leonardo_theme_bootswatch'
173 {%- endif %}
174 {%- if multisite %}
175 multisite:
176 source:
177 engine: git
178 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-multisite.git#egg=leonardo_multisite'
179 {%- endif %}
180 {%- if news %}
181 leonardo-news:
182 source:
183 engine: git
184 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-news.git#egg=leonardo_news'
185 {%- endif %}
186 {%- if newswall %}
187 leonardo-newswall:
188 source:
189 engine: git
190 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-newswall.git#egg=leonardo_newswall'
191 django-newswall:
192 source:
193 engine: git
194 address: 'git+https://github.com/michaelkuty/django-newswall.git#egg=django-newswall'
195 {%- endif %}
196 {%- if newsletter %}
197 leonardo-newsletter:
198 source:
199 engine: git
200 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-newsletter.git#egg=leonardo_newsletter'
201 newsletter:
202 source:
203 engine: git
204 address: 'git+https://github.com/michaelkuty/emencia-django-newsletter.git#egg=newsletter'
205 {%- endif %}
206 {%- if counters %}
207 leonardo-counters:
208 source:
209 engine: git
210 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-counters.git#egg=leonardo_counters'
211 {%- endif %}
212 {%- if admin_honeypot %}
213 leonardo-admin-honeypot:
214 source:
215 engine: git
216 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-admin-honeypot.git#egg=leonardo_admin_honeypot'
217 {%- endif %}
218 {%- if admin_dashboard %}
219 leonardo-admin-dashboard:
220 source:
221 engine: git
222 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-admin-dashboard.git#egg=leonardo_admin_dashboard'
223 {%- endif %}
224 {%- if theme_education %}
225 theme_education:
226 source:
227 engine: git
228 address: 'git+git@repo1.robotice.cz:leonardo-themes/education-theme.git#egg=leonardo_theme_education'
229 {%- endif %}
230 {%- if vis_temporal %}
231 leonardo_module_vis_temporal:
232 source:
233 engine: git
234 address: 'git+git@repo1.robotice.cz:leonardo-modules/temporal-vis-module.git#egg=leonardo_module_vis_temporal'
235 {%- endif %}
236 {%- if vis_quantitative %}
237 leonardo_module_vis_quantitative:
238 source:
239 engine: git
240 address: 'git+git@repo1.robotice.cz:leonardo-modules/quantitative-vis-module.git#egg=leonardo_module_vis_quantitative'
241 {%- endif %}
242 {%- if vis_relational %}
243 leonardo_module_vis_relational:
244 source:
245 engine: git
246 address: 'git+git@repo1.robotice.cz:leonardo-modules/relational-vis-module.git#egg=leonardo_module_vis_relational'
247 {%- endif %}
248 sentry:
249 source:
250 engine: git
251 address: 'git+git@repo1.robotice.cz:leonardo-modules/leonardo-module-sentry.git#egg=leonardo_module_sentry'
252 languages:
253 {%- if en %}
254 en: {
255 {%- if default_language == "en" %}
256 default: true
257 {%- endif %}
258 }
259 {%- endif %}
260 {%- if cs %}
261 cs: {
262 {%- if default_language == "cs" %}
263 default: true
264 {%- endif %}
265 }
266 {%- endif %}
267 admins: ${_param:leonardo_robotice_admins}
268 managers: ${_param:leonardo_robotice_managers}
269 logging:
270 engine: sentry
271 dsn: ${_param:leonardo_{{ name }}_logging_dsn}
272 postgresql:
273 server:
274 database:
275 leonardo_{{ name }}:
276 enabled: true
277 encoding: 'UTF8'
278 locale: 'cs_CZ'
279 users:
280 - name: leonardo_{{ name }}
281 password: ${_param:postgresql_leonardo_{{ name }}_password}
282 host: localhost
283 rights: all privileges
284 initial_data:
285 engine: backupninja
286 source: backup.robotice.org
287 host: web02.webapp.prd.dio.robotice.cz
288 name: leonardo_{{ name }}
289 nginx:
290 server:
291 site:
292 nginx_leonardo_{{ name }}:
293 enabled: true
294 type: leonardo
295 name: {{ name }}
296 {%- if ssl.enabled %}
297 ssl:
298 enabled: true
299 engine: letsencrypt
300 mode: secure
301 {%- endif %}
302 host:
303 name: www.{{ domain }}
304 {%- if aliases %}
305 aliases: {{ aliases|parse_aliases }}
306 {%- endif %}
307 nginx_redirect_leonardo_{{ name }}:
308 enabled: true
309 type: nginx_redirect
310 name: leonardo_{{ name }}
311 host:
312 name: {{ domain }}
313 port: 80
314 {%- if aliases %}
315 aliases: {{ aliases|parse_aliases }}
316 {%- endif %}
317 redirect:
318 host: www.{{ domain }}
319 {%- if ssl.enabled %}
320 nginx_ssl_redirect_leonardo_{{ name }}:
321 enabled: true
322 type: nginx_redirect
323 name: leonardo_{{ name }}_ssl
324 host:
325 name: {{ domain }}
326 port: 443
327 {%- if aliases %}
328 aliases: {{ aliases|parse_aliases }}
329 {%- endif %}
330 redirect:
331 host: www.{{ domain }}
332 letsencrypt:
333 client:
334 domainset:
335 {{ name }}:
336 - www.{{ name }}.cz
337 - {{ name }}.cz
338 {%- endif %}