· 7 years ago · Jun 21, 2018, 05:26 PM
1inventory:
2 sample-cluster:
3 engine: hier-cluster
4 service_class_dir:
5 system_class_dir:
6 cluster_class_dir:
7 class_dir: /srv/architect/mcp/classes
8 formula_dir: /srv/salt-formulas/formulas
9 form:
10 create-garden:
11 name: Create leonardo site
12 size: md
13 layout: page
14 templates:
15 - file: "system/leonardo/server/app/{{ app_name }}.yml"
16 content: |
17 {%- macro password(size=16) -%}
18 {% for index in range(size) %}{{ 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'|random }}{% endfor %}
19 {%- endmacro %}
20 parameters:
21 _param:
22 leonardo_{{ app_name }}_secret_key: {{ password(16) }}
23 postgresql_leonardo_{{ app_name }}_password: {{ password(12) }}
24 supervisor:
25 server:
26 service:
27 leonardo_{{ app_name }}:
28 name: {{ app_name }}
29 type: leonardo
30 leonardo:
31 server:
32 app:
33 {{ app_name }}:
34 enabled: true
35 backup: true
36 workers: 1
37 languages:
38 cs:
39 default: true
40 en:
41 default: false
42 bind:
43 address: localhost
44 protocol: tcp
45 port: {{ range(20000, 50000) | random }}
46 secret_key: ${_param:leonardo_{{ app_name }}_secret_key}
47 source:
48 engine: git
49 address: https://github.com/django-leonardo/django-leonardo.git
50 rev: master
51 site_source:
52 engine: git
53 address: git@git.3ad.eu:leonardo-webs/leonardo-web-{{ app_name.replace("_","-") }}.git
54 rev: master
55 cache:
56 engine: 'memcached'
57 host: '127.0.0.1'
58 prefix: 'CACHE_LEONARDO_{{ app_name|upper }}'
59 database:
60 engine: postgres
61 host: 127.0.0.1
62 name: leonardo_{{ app_name }}
63 password: ${_param:postgresql_leonardo_{{ app_name }}_password}
64 user: leonardo_{{ app_name }}
65 initial_data:
66 engine: backupninja
67 source: cfg.newt.cz
68 host: {{ init_data_leo_host }}
69 name: {{ app_name }}
70 admins: ${_param:leonardo_server_admins}
71 managers: ${_param:leonardo_server_managers}
72 logging: ${_param:leonardo_server_logging}
73 mail: ${_param:leonardo_server_mail_smtp}
74 plugin:
75 static: {}
76 {%- if plugin_oembed %}
77 leonardo_oembed:
78 source:
79 engine: git
80 address: 'git+https://github.com/leonardo-modules/leonardo-oembed.git#egg=leonardo_oembed'
81 {%- endif %}
82 {%- if plugin_forms %}
83 leonardo_forms:
84 source:
85 engine: git
86 address: 'git+https://github.com/leonardo-modules/leonardo-module-forms.git#egg=leonardo_module_forms'
87 {%- endif %}
88 {%- if plugin_links %}
89 leonardo_links:
90 source:
91 engine: git
92 address: 'git+https://github.com/leonardo-modules/leonardo-module-links.git#egg=leonardo_module_links'
93 {%- endif %}
94 {%- if plugin_team %}
95 leonardo_team:
96 source:
97 engine: git
98 address: 'git+https://github.com/leonardo-modules/leonardo-team.git#egg=team'
99 {%- endif %}
100 {%- if plugin_blog %}
101 leonardo_blog:
102 source:
103 engine: git
104 address: 'git+https://github.com/leonardo-modules/leonardo-module-blog.git#egg=leonardo_module_blog'
105 elephantblog:
106 source:
107 engine: git
108 address: 'git+https://github.com/michaelkuty/feincms-elephantblog.git@next#egg=elephantblog'
109 {%- endif %}
110 {%- if plugin_geo %}
111 leonardo_geo:
112 source:
113 engine: git
114 address: 'git+https://github.com/leonardo-modules/leonardo-geo.git#egg=leonardo_geo'
115 {%- endif %}
116 {%- if plugin_multisite %}
117 leonardo_multisite:
118 source:
119 engine: git
120 address: 'git+https://github.com/leonardo-modules/leonardo-multisite.git#egg=leonardo_multisite'
121 {%- endif %}
122 {%- if plugin_counters %}
123 leonardo_counters:
124 source:
125 engine: git
126 address: 'git+https://github.com/leonardo-modules/leonardo-counters.git#egg=leonardo_counters'
127 {%- endif %}
128 {%- if plugin_dashboard %}
129 leonardo_dashboard:
130 source:
131 engine: git
132 address: 'git+https://github.com/leonardo-modules/leonardo-admin-dashboard.git#egg=leonardo_admin_dashboard'
133 {%- endif %}
134 {%- if plugin_folio %}
135 leonardo_folio:
136 source:
137 engine: git
138 address: 'git+https://github.com/leonardo-modules/leonardo-module-folio.git#egg=leonardo_module_folio'
139 {%- endif %}
140 {%- if plugin_agenda %}
141 leonardo_agenda:
142 source:
143 engine: git
144 address: 'git+https://github.com/leonardo-modules/leonardo-agenda.git#egg=leonardo_agenda'
145 {%- endif %}
146 {%- if plugin_scrolltop %}
147 leonardo_scrolltop:
148 source:
149 engine: git
150 address: 'git+https://github.com/leonardo-modules/leonardo-scrolltop.git#egg=leonardo_scrolltop'
151 {%- endif %}
152 {%- if plugin_page_preview %}
153 leonardo_page_preview:
154 source:
155 engine: git
156 address: 'git+https://github.com/dresl/leonardo-page-preview.git#egg=leonardo_page_preview'
157 {%- endif %}
158 {%- if plugin_cookie_law %}
159 leonardo_cookie_law:
160 source:
161 engine: git
162 address: 'git+https://github.com/leonardo-modules/leonardo-cookie-law.git#egg=leonardo_cookie_law'
163 {%- endif %}
164 theme_{{ app_name }}:
165 source:
166 engine: git
167 address: 'git+ssh://git@git.3ad.eu/leonardo-plugins/leonardo-theme-{{ app_name.replace("_","-") }}.git#egg=leonardo_theme_{{ app_name }}'
168 postgresql:
169 server:
170 database:
171 leonardo_{{ app_name }}:
172 enabled: true
173 encoding: 'UTF8'
174 locale: 'cs_CZ'
175 users:
176 - name: leonardo_{{ app_name }}
177 password: ${_param:postgresql_leonardo_{{ app_name }}_password}
178 host: localhost
179 rights: all privileges
180 initial_data:
181 engine: backupninja
182 source: cfg.newt.cz
183 host: {{ init_data_psql_host }}
184 name: leonardo_{{ app_name }}
185 steps:
186 - name: form 1
187 fields:
188 - name: "app_name"
189 label: "Leonardo app name"
190 value_type: "string"
191 required: True
192 width: full
193 - name: "init_data_leo_host"
194 label: "Leonardo initial data"
195 help_text: "Set proper host for your media restoring."
196 value_type: "string"
197 initial: "web0.cms.do.3ad.eu"
198 width: "half"
199 - name: "init_data_psql_host"
200 label: "Postgresql initial data"
201 help_text: "Set proper host for your initial data of PostgreSQL."
202 value_type: "string"
203 initial: "web0.cms.do.3ad.eu"
204 width: "half"
205 - name: "plugin_dashboard"
206 value_type: "boolean"
207 initial: True
208 required: False
209 width: half
210 - name: "plugin_geo"
211 value_type: "boolean"
212 initial: True
213 required: False
214 width: half
215 - name: "plugin_forms"
216 value_type: "boolean"
217 initial: True
218 required: False
219 width: half
220 - name: "plugin_links"
221 value_type: "boolean"
222 initial: True
223 required: False
224 width: half
225 - name: "plugin_blog"
226 value_type: "boolean"
227 initial: True
228 required: False
229 width: half
230 - name: "plugin_cookie_law"
231 value_type: "boolean"
232 initial: True
233 required: False
234 width: half
235 - name: "plugin_oembed"
236 value_type: "boolean"
237 required: False
238 width: half
239 - name: "plugin_team"
240 value_type: "boolean"
241 required: False
242 width: half
243 - name: "plugin_multisite"
244 value_type: "boolean"
245 required: False
246 width: half
247 - name: "plugin_folio"
248 value_type: "boolean"
249 required: False
250 width: half
251 - name: "plugin_scrolltop"
252 value_type: "boolean"
253 required: False
254 width: half
255 - name: "plugin_page_preview"
256 value_type: "boolean"
257 required: False
258 width: half