forked from lxc/distrobuilder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
scheme.yaml
233 lines (199 loc) · 4.46 KB
/
scheme.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
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
115
116
117
118
119
120
121
122
123
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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
# This example contains every possible key
image:
description: |-
here goes the image description
distrobution: distro
release: release
architecture: x86_64
expiry: 30d
variant: default
name: distro-release-x86_64
serial: some-random-string
source:
downloader: ubuntu-http
url: http://archive.ubuntu.com
keys:
- 0xdeadbeaf
keyserver: http://keyserver.ubuntu.com
variant: default
suite: suite
same_as: xenial
skip_verification: false
targets:
lxc:
create-message: |-
You just created an {{ image.description }} container.
To enable SSH, run: apt install openssh-server
No default root or user password are set by LXC.
config:
- type: all
before: 5
content: |-
lxc.include = LXC_TEMPLATE_CONFIG/ubuntu.common.conf
- type: user
before: 5
content: |-
lxc.include = LXC_TEMPLATE_CONFIG/ubuntu.userns.conf
- type: all
after: 4
content: |-
lxc.include = LXC_TEMPLATE_CONFIG/common.conf
# For Ubuntu 14.04
lxc.mount.entry = /sys/kernel/debug sys/kernel/debug none bind,optional 0 0
lxc.mount.entry = /sys/kernel/security sys/kernel/security none bind,optional 0 0
lxc.mount.entry = /sys/fs/pstore sys/fs/pstore none bind,optional 0 0
lxc.mount.entry = mqueue dev/mqueue mqueue rw,relatime,create=dir,optional 0 0
- type: user
after: 4
content: |-
lxc.include = LXC_TEMPLATE_CONFIG/userns.conf
# For Ubuntu 14.04
lxc.mount.entry = /sys/firmware/efi/efivars sys/firmware/efi/efivars none bind,optional 0 0
lxc.mount.entry = /proc/sys/fs/binfmt_misc proc/sys/fs/binfmt_misc none bind,optional 0 0
- type: all
content: |-
lxc.arch = {{ image.architecture_personality }}
lxd:
vm:
size: 2147483648
filesystem: ext4
files:
- generator: dump
path: /some/path
content: |-
here goes the content
name: name
mode: 0644
gid: 1000
uid: 1000
template:
properties:
key: value
when:
- always
templated: true
releases:
- a
- b
architectures:
- x86_64
variants:
- default
- generator: hostname
path: /etc/hostname
- generator: hosts
path: /etc/hosts
- generator: remove
path: /root/file
- generator: template
name: foo
content: |-
Here goes the content
template:
properties:
key: value
when:
- create
- copy
- generator: upstart-tty
path: /etc/init/lxc-tty.conf
- generator: cloud-init
name: user-data
content: |-
Here goes the user-data
packages:
manager: apt
custom-manager:
clean:
cmd: mgr
flags:
- clean
install:
cmd: mgr
flags:
- install
remove:
cmd: mgr
flags:
- remove
refresh:
cmd: mgr
flags:
- refresh
update:
cmd: mgr
flags:
- update
flags:
- --yes
update: true
cleanup: false
sets:
- packages:
- gnupg
action: install
early: true
- packages:
- vim
action: install
releases:
- a
- b
architectures:
- x86_64
variants:
- default
- packages:
- lightdm
action: install
flags:
- --no-install-recommends
- packages:
- grub
action: remove
repositories:
- name: reponame
url: |-
deb http://archive.ubuntu.com/ubuntu {{ image.release }}-updates main restricted universe multiverse
type: type
key: 0xdeadbeaf
releases:
- a
- b
architectures:
- x86_64
variants:
- default
actions:
- trigger: post-unpack
action: |-
#!/bin/sh
do something after the rootfs has been unpacked
- trigger: post-files
action: |-
#!/bin/sh
do something after the files section has been processed
- trigger: post-update
action: |-
#!/bin/sh
do something after packages have been processed
- trigger: post-packages
action: |-
#!/bin/sh
do something after the packages section has been processed
releases:
- a
- b
architectures:
- x86_64
variants:
- default
mappings:
architectures:
a: b
c: d
architecture_map: debian
environment:
clear_defaults: true
variables:
- FOO: bar