instance-lxc.cfg 4.39 KB
Newer Older
Antoine Catton's avatar
Antoine Catton committed
1 2 3 4 5 6 7
[buildout]

eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true

parts =
8
    publish
Antoine Catton's avatar
Antoine Catton committed
9
    rootfs
10 11
    uuid
    lxc-conf
12 13 14
    shellinabox
    certificate-authority
    ca-shellinabox
Antoine Catton's avatar
Antoine Catton committed
15 16 17 18
    container-promise
    shellinabox-promise
    rootfs-promise

Antoine Catton's avatar
Antoine Catton committed
19 20 21 22

[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
23
tmp = $${buildout:directory}/tmp
Antoine Catton's avatar
Antoine Catton committed
24
srv = $${buildout:directory}/srv
25
bin = $${buildout:directory}/bin
Antoine Catton's avatar
Antoine Catton committed
26 27 28 29

[basedirectory]
recipe = slapos.cookbook:mkdirectory
services = $${rootdirectory:etc}/run
Antoine Catton's avatar
Antoine Catton committed
30
promises = $${rootdirectory:etc}/promise
Antoine Catton's avatar
Antoine Catton committed
31

32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
[directory]
recipe = slapos.cookbook:mkdirectory
shellinabox = $${rootdirectory:srv}/shellinabox/
ca-dir = $${rootdirectory:srv}/ca/

[cadirectory]
recipe = slapos.cookbook:mkdirectory
requests = $${directory:ca-dir}/requests/
private = $${directory:ca-dir}/private/
certs = $${directory:ca-dir}/certs/
newcerts = $${directory:ca-dir}/newcerts/
crl = $${directory:ca-dir}/crl/

[cadirectory]
recipe = slapos.cookbook:mkdirectory
requests = $${directory:ca-dir}/requests/
private = $${directory:ca-dir}/private/
certs = $${directory:ca-dir}/certs/
newcerts = $${directory:ca-dir}/newcerts/
crl = $${directory:ca-dir}/crl/

53
[rootfs]
54 55 56 57 58
recipe = slapos.cookbook:downloader
url = $${slap-parameter:rootfs}
md5sum = $${slap-parameter:rootfs-md5sum}
downloaded-file = $${rootdirectory:srv}/rootfs.img
downloaded-file-complete = $${:downloaded-file}.complete
59
binary = $${basedirectory:services}/rootfsdownload
Antoine Catton's avatar
Antoine Catton committed
60 61
path = ${tar:location}/bin/:${gzip:location}/bin/:${bzip2:location}/bin/:${xz-utils:location}/bin/
archive = true
62 63

[lxc-conf]
64 65
recipe = slapos.recipe.template
url = ${lxc-conf-in:location}/${lxc-conf-in:filename}
66
output = $${rootdirectory:etc}/lxc.conf
Antoine Catton's avatar
Antoine Catton committed
67
bridge = !!BRIDGE_NAME!!
68 69
interface = lxc$${slap-network-information:network-interface}

70
[passwd]
71 72
recipe = slapos.cookbook:generate.password
storage-path = $${buildout:directory}/.password
73 74 75 76 77 78 79 80

[shellinabox]
recipe = slapos.cookbook:shellinabox
ipv6 = $${slap-network-information:global-ipv6}
port = 8080
shell = ${lxc:location}/bin/lxc-console -n $${uuid:uuid}
wrapper = $${rootdirectory:bin}/shellinaboxd_raw
shellinabox-binary = ${shellinabox:location}/bin/shellinaboxd
81
password = $${passwd:passwd}
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114
directory = $${buildout:directory}/
login-shell = $${rootdirectory:bin}/login
certificate-directory = $${directory:shellinabox}
cert-file = $${directory:shellinabox}/public.crt
key-file = $${directory:shellinabox}/private.key

[ca-shellinabox]
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
executable = $${shellinabox:wrapper}
wrapper = $${rootdirectory:bin}/shellinaboxd
key-file = $${shellinabox:key-file}
cert-file = $${shellinabox:cert-file}

[certificate-authority]
recipe = slapos.cookbook:certificate_authority
openssl-binary = ${openssl:location}/bin/openssl
ca-dir = $${directory:ca-dir}
requests-directory = $${cadirectory:requests}
wrapper = $${basedirectory:services}/ca
ca-private = $${cadirectory:private}
ca-certs = $${cadirectory:certs}
ca-newcerts = $${cadirectory:newcerts}
ca-crl = $${cadirectory:crl}

[ca-shellinabox]
<= certificate-authority
recipe = slapos.cookbook:certificate_authority.request
executable = $${shellinabox:wrapper}
wrapper = $${rootdirectory:bin}/shellinaboxd
key-file = $${shellinabox:key-file}
cert-file = $${shellinabox:cert-file}

115 116 117 118
[uuid]
recipe = slapos.cookbook:uuid
cache-file = $${buildout:directory}/.slapcontainername

119 120
[publish]
recipe = slapos.cookbook:publish
121
url = https://[$${shellinabox:ipv6}]:$${shellinabox:port}/
122 123
password = $${shellinabox:password}

Antoine Catton's avatar
Antoine Catton committed
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150
[template-promise-state]
recipe = slapos.recipe.template
url = ${promise-state:location}/${promise-state:filename}
bash = ${bash:location}/bin/bash
test-binary = ${coreutils:location}/bin/test
cat = ${coreutils:location}/bin/cat
value = started
mode = 700

[container-promise]
<= template-promise-state
output = $${basedirectory:promises}/slapcontainer
file = $${buildout:directory}/.slapcontainer.state

[shellinabox-promise]
<= template-promise-state
output = $${basedirectory:promises}/shellinabox
file = $${buildout:directory}/.shellinabox.state

[rootfs-promise]
recipe = slapos.recipe.template
url = ${promise-exists:location}/${promise-exists:filename}
output = $${basedirectory:promises}/rootfs
bash = ${bash:location}/bin/bash
test-binary = ${coreutils:location}/bin/test
file = $${rootfs:downloaded-file-complete}
mode = 700
151

152 153
[slap-parameter]
rootfs-md5sum =