Remove slapos.cookbook:template dependency from lxc
[slapos.git] / software / lxc / instance-lxc.cfg
1 [buildout]
2
3 eggs-directory = ${buildout:eggs-directory}
4 develop-eggs-directory = ${buildout:develop-eggs-directory}
5 offline = true
6
7 parts =
8     publish
9     rootfs
10     uuid
11     lxc-conf
12     shellinabox
13     certificate-authority
14     ca-shellinabox
15
16 [rootdirectory]
17 recipe = slapos.cookbook:mkdirectory
18 etc = $${buildout:directory}/etc
19 tmp = $${buildout:directory}/tmp
20 srv = $${buildout:directory}/srv
21 bin = $${buildout:directory}/bin
22
23 [basedirectory]
24 recipe = slapos.cookbook:mkdirectory
25 services = $${rootdirectory:etc}/run
26
27 [directory]
28 recipe = slapos.cookbook:mkdirectory
29 shellinabox = $${rootdirectory:srv}/shellinabox/
30 ca-dir = $${rootdirectory:srv}/ca/
31
32 [cadirectory]
33 recipe = slapos.cookbook:mkdirectory
34 requests = $${directory:ca-dir}/requests/
35 private = $${directory:ca-dir}/private/
36 certs = $${directory:ca-dir}/certs/
37 newcerts = $${directory:ca-dir}/newcerts/
38 crl = $${directory:ca-dir}/crl/
39
40 [cadirectory]
41 recipe = slapos.cookbook:mkdirectory
42 requests = $${directory:ca-dir}/requests/
43 private = $${directory:ca-dir}/private/
44 certs = $${directory:ca-dir}/certs/
45 newcerts = $${directory:ca-dir}/newcerts/
46 crl = $${directory:ca-dir}/crl/
47
48
49 [rootfs]
50 recipe = slapos.cookbook:downloader
51 url = $${slap-parameter:rootfs}
52 md5sum = $${slap-parameter:rootfs-md5sum}
53 downloaded-file = $${rootdirectory:srv}/rootfs.img
54 downloaded-file-complete = $${:downloaded-file}.complete
55 binary = $${basedirectory:services}/rootfsdownload
56 path = ${tar:location}/bin/:${gzip:location}/bin/:${bzip2:location}/bin/:${xz-utils:location}/bin/
57 archive = true
58
59 [lxc-conf]
60 recipe = slapos.recipe.template
61 url = ${lxc-conf-in:location}/${lxc-conf-in:filename}
62 output = $${rootdirectory:etc}/lxc.conf
63 bridge = !!BRIDGE_NAME!!
64 interface = lxc$${slap-network-information:network-interface}
65
66 [passwd]
67 recipe = slapos.cookbook:pwgen
68 file = $${buildout:directory}/.password
69 pwgen-binary = ${pwgen:location}/bin/pwgen
70
71 [shellinabox]
72 recipe = slapos.cookbook:shellinabox
73 ipv6 = $${slap-network-information:global-ipv6}
74 port = 8080
75 shell = ${lxc:location}/bin/lxc-console -n $${uuid:uuid}
76 wrapper = $${rootdirectory:bin}/shellinaboxd_raw
77 shellinabox-binary = ${shellinabox:location}/bin/shellinaboxd
78 password = $${passwd:password}
79 directory = $${buildout:directory}/
80 login-shell = $${rootdirectory:bin}/login
81 certificate-directory = $${directory:shellinabox}
82 cert-file = $${directory:shellinabox}/public.crt
83 key-file = $${directory:shellinabox}/private.key
84
85 [ca-shellinabox]
86 <= certificate-authority
87 recipe = slapos.cookbook:certificate_authority.request
88 executable = $${shellinabox:wrapper}
89 wrapper = $${rootdirectory:bin}/shellinaboxd
90 key-file = $${shellinabox:key-file}
91 cert-file = $${shellinabox:cert-file}
92
93 [certificate-authority]
94 recipe = slapos.cookbook:certificate_authority
95 openssl-binary = ${openssl:location}/bin/openssl
96 ca-dir = $${directory:ca-dir}
97 requests-directory = $${cadirectory:requests}
98 wrapper = $${basedirectory:services}/ca
99 ca-private = $${cadirectory:private}
100 ca-certs = $${cadirectory:certs}
101 ca-newcerts = $${cadirectory:newcerts}
102 ca-crl = $${cadirectory:crl}
103
104 [ca-shellinabox]
105 <= certificate-authority
106 recipe = slapos.cookbook:certificate_authority.request
107 executable = $${shellinabox:wrapper}
108 wrapper = $${rootdirectory:bin}/shellinaboxd
109 key-file = $${shellinabox:key-file}
110 cert-file = $${shellinabox:cert-file}
111
112 [uuid]
113 recipe = slapos.cookbook:uuid
114 cache-file = $${buildout:directory}/.slapcontainername
115
116 [publish]
117 recipe = slapos.cookbook:publish
118 url = https://[$${shellinabox:ipv6}]:$${shellinabox:port}/
119 password = $${shellinabox:password}
120
121
122 [slap-parameter]
123 rootfs-md5sum =