kvm: move slapos.cookbook:kvm recipe to buildout+jinja
[slapos.git] / software / kvm / common.cfg
1 [buildout]
2
3 extends =
4   ../../component/6tunnel/buildout.cfg
5   ../../component/curl/buildout.cfg
6   ../../component/dash/buildout.cfg
7   ../../component/dcron/buildout.cfg
8   ../../component/gzip/buildout.cfg
9   ../../component/qemu-kvm/buildout.cfg
10   ../../component/logrotate/buildout.cfg
11   ../../component/noVNC/buildout.cfg
12   ../../component/openssl/buildout.cfg
13   ../../component/dcron/buildout.cfg
14   ../../component/netcat/buildout.cfg
15   ../../component/pycurl/buildout.cfg
16   ../../stack/slapos.cfg
17   ../../stack/nodejs.cfg
18   ../../stack/resilient/buildout.cfg
19   ../../stack/monitor/buildout.cfg
20
21 # stacks are listed from most generic to most specific,
22 # to avoid versioning issues
23
24 parts =
25   template
26   eggs
27
28 # XXX: we have to manually add this for resilience
29   rdiff-backup
30   collective.recipe.template-egg
31
32 #XXX-Cedric : Currently, one can only access to KVM using noVNC.
33 #             Ideally one should be able to access KVM by using either NoVNC or VNC.
34 #             Problem is : no native crypto support in web browsers. So we have to disable ssl
35 #             In qemu builtin vnc server, and make it available only for localhost
36 #             so that only novnc can listen to it.
37
38 #XXX-Cedric: Check status of https://github.com/kanaka/noVNC/issues/13 to see
39 #            When qemu has builtin support for websockets in vnc server to get rid of
40 #            Websockify (socket <-> websocket proxy server) when it is ready.
41 #            May solve previous XXX depending on the implementation.
42
43 #XXX-Cedric : add list of keyboard layouts (azerty/us querty/...) parameter to qemu
44
45 [eggs]
46 recipe = zc.recipe.egg
47 eggs =
48   ${lxml-python:egg}
49   websockify
50   slapos.cookbook
51   slapos.toolbox
52   erp5.util
53   cns.recipe.symlink
54   collective.recipe.template
55   plone.recipe.command
56   ${pycurl:egg}
57
58 [http-proxy]
59 # https://github.com/nodejitsu/node-http-proxy
60 recipe = slapos.recipe.build:download-unpacked
61 #XXX-Cedric : use upstream when merged
62 url = https://nodeload.github.com/desaintmartin/node-http-proxy/zipball/20120621
63 md5sum = 20204d0b29c2cef26e1c91e99eedca6b
64
65 [proxy-by-url]
66 # https://github.com/dominictarr/proxy-by-url
67 recipe = slapos.recipe.build:download-unpacked
68 #XXX-Cedric : use upstream when merged
69 url = https://nodeload.github.com/desaintmartin/proxy-by-url/zipball/20120621
70 md5sum = c2609948aa708581f93b981b23880314
71
72 [npm-modules]
73 recipe = plone.recipe.command
74 destination = ${buildout:parts-directory}/${:_buildout_section_name_}
75 location = ${buildout:parts-directory}/${:_buildout_section_name_}
76 command =
77   export HOME=${:location};
78   rm -fr ${:destination} &&
79   mkdir -p ${:destination} &&
80   cd ${:destination} &&
81   ${nodejs:location}/bin/node ${nodejs:location}/bin/npm install colors@0.6.0-1 &&
82   ${nodejs:location}/bin/node ${nodejs:location}/bin/npm install socket.io@0.8.7 &&
83   ${nodejs:location}/bin/node ${nodejs:location}/bin/npm install socket.io-client@0.8.7 &&
84   ${nodejs:location}/bin/node ${nodejs:location}/bin/npm install optimist@0.3.1 &&
85   ${nodejs:location}/bin/node ${nodejs:location}/bin/npm install pkginfo@0.2.3
86
87
88 # Create all templates that will be used to deploy instances
89
90 [template]
91 recipe = slapos.recipe.template
92 url = ${:_profile_base_location_}/instance.cfg.in
93 md5sum = ac94fdcf8e3db4bdb2dff4478426595d
94 output = ${buildout:directory}/template.cfg
95 mode = 0644
96
97 [template-kvm]
98 recipe = hexagonit.recipe.download
99 url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
100 mode = 644
101 md5sum = 4056df213786fd87b60efd3d6f1f2bec
102 download-only = true
103 on-update = true
104
105 [template-kvm-cluster]
106 recipe = hexagonit.recipe.download
107 url = ${:_profile_base_location_}/instance-kvm-cluster.cfg.jinja2.in
108 mode = 644
109 md5sum = 8e84c7a4e7be009021243c14707e0a1e
110 download-only = true
111 on-update = true
112
113 [template-kvm-resilient]
114 recipe = hexagonit.recipe.download
115 url = ${:_profile_base_location_}/instance-kvm-resilient.cfg.jinja2
116 mode = 644
117 md5sum = 7564bfbb74e6557e1041e9d6d1bc5d14
118 download-only = true
119 on-update = true
120
121 [template-kvm-resilient-test]
122 recipe = hexagonit.recipe.download
123 url = ${:_profile_base_location_}/instance-kvm-resilient-test.cfg.jinja2
124 md5sum = e3d275621420f0b8c081228caeb571f9
125 mode = 0644
126 download-only = true
127 on-update = true
128
129 [template-kvm-import]
130 recipe = slapos.recipe.template
131 url = ${:_profile_base_location_}/instance-kvm-import.cfg.in
132 md5sum = 6835c9309ff4bf4a0efd1850e6c66b24
133 output = ${buildout:directory}/template-kvm-import.cfg
134 mode = 0644
135
136 [template-kvm-import-script]
137 recipe = hexagonit.recipe.download
138 url = ${:_profile_base_location_}/template/kvm-import.sh.jinja2
139 filename = kvm-import.sh.jinja2
140 md5sum = 926a11421921c29f91fae8240bbcf585
141 download-only = true
142 mode = 0755
143
144 [template-kvm-export]
145 recipe = hexagonit.recipe.download
146 url = ${:_profile_base_location_}/instance-kvm-export.cfg.jinja2
147 mode = 644
148 md5sum = c9f13c1f481ed08c75089aef1d3c6981
149 download-only = true
150 on-update = true
151
152 [template-kvm-export-script]
153 recipe = hexagonit.recipe.download
154 url = ${:_profile_base_location_}/template/kvm-export.sh.jinja2
155 filename = kvm-export.sh.jinja2
156 md5sum = 22bd2e0c8fdb39a764a14c403a3bd752
157 download-only = true
158 mode = 0755
159
160 [template-nbd]
161 recipe = slapos.recipe.template
162 url = ${:_profile_base_location_}/instance-nbd.cfg.in
163 md5sum = f634a5249b773658b7a7bc9fa9bb0368
164 output = ${buildout:directory}/template-nbd.cfg
165 mode = 0644
166
167 [template-frontend]
168 recipe = slapos.recipe.template
169 url = ${:_profile_base_location_}/instance-frontend.cfg.in
170 md5sum = cdb690495e9eb007d2b7d2f8e12f5c59
171 output = ${buildout:directory}/template-frontend.cfg
172 mode = 0644
173
174 [template-ansible-promise]
175 recipe = hexagonit.recipe.download
176 url = ${:_profile_base_location_}/template/ansible-promise.in
177 md5sum = d0bd07d5a7799b7aea7720ffdf46f322
178 mode = 0644
179 download-only = true
180 filename = ansible-promise.in
181
182 [template-kvm-run]
183 recipe = hexagonit.recipe.download
184 url = ${:_profile_base_location_}/template/template-kvm-run.in
185 mode = 644
186 filename = template-kvm-run.in
187 md5sum = 38265d52fdc03589081cc7dd13999020
188 download-only = true
189 on-update = true
190
191 [template-kvm-controller]
192 recipe = hexagonit.recipe.download
193 url = ${:_profile_base_location_}/template/kvm-controller-run.in
194 mode = 644
195 filename = kvm-controller-run.in
196 md5sum = b61ef9c54d912fdbfed3899fa985f79c
197 download-only = true
198 on-update = true
199
200 [template-apache-conf]
201 recipe = hexagonit.recipe.download
202 url = ${:_profile_base_location_}/template/apache.conf.in
203 mode = 644
204 filename = apache.conf.in
205 md5sum = 355fdabdb86fee8e9714b6d357149958
206 download-only = true
207 on-update = true
208
209 [template-content]
210 recipe = hexagonit.recipe.download
211 url = ${:_profile_base_location_}/template/template-content.in
212 mode = 644
213 filename = template-content.in
214 md5sum = 822737e483864bf255ad1259237bef2a
215 download-only = true
216 on-update = true
217
218 [template-logrotate-base]
219 recipe = slapos.recipe.template:jinja2
220 filename = instance-logrotate-base.cfg
221 template = ${:_profile_base_location_}/instance-logrotate-base.cfg.in
222 rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/instance-logrotate-base.cfg
223 md5sum = f28fbd310944f321ccb34b2a34c82005
224 context =
225     key dcron_location dcron:location
226     key gzip_location gzip:location
227     key logrotate_location logrotate:location
228
229 [template-httpd]
230 recipe = slapos.recipe.template:jinja2
231 filename = template-httpd.cfg
232 template = ${:_profile_base_location_}/instance-kvm-http.cfg.in
233 rendered = ${buildout:parts-directory}/${:_buildout_section_name_}/instance-kvm-http.cfg
234 md5sum = 26a181a48046ce88570adb32334747ef
235 context =
236     key apache_location apache:location
237     raw openssl_executable_location ${openssl:location}/bin/openssl
238     raw template_apache_conf ${template-apache-conf:location}/${template-apache-conf:filename}
239
240