forked from tinkerbell/hook
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hook.yaml
152 lines (131 loc) · 4.5 KB
/
hook.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
kernel:
image: quay.io/tinkerbell/hook-kernel:5.10.85-d1225df88208e5a732e820a182b75fb35c737bdd
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
init:
- linuxkit/init:144c9cee8aed9e30a16940f2bf1d3813883aceda
# can't use the latest version of runc because it has a bug that prevents docker from starting containers properly.
- linuxkit/runc:v0.8
- linuxkit/containerd:d445de33c7f08470187b068d247b1c0dea240f0a
- linuxkit/ca-certificates:c1c73ef590dffb6a0138cf758fe4a4305c9864f4
onboot:
- name: sysctl
image: linuxkit/sysctl:a88a50c104d538b58da5e1441f6f0b4b738f76a6
- name: sysfs
image: linuxkit/sysfs:5fd982d39ff7bec8e480c67a110acb2d3794c291
- name: vlan
image: linuxkit/ip:6cc44dd4e18ddb02de01bc4b34b5799971b6a7bf
binds.add:
- /etc/ip/vlan.sh:/etc/ip/vlan.sh
command: ["/etc/ip/vlan.sh"]
services:
- name: getty
image: linuxkit/getty:76951a596aa5e0867a38e28f0b94d620e948e3e8
binds.add:
- /etc/profile.d/local.sh:/etc/profile.d/local.sh
- /etc/motd:/etc/motd
- /etc/os-release:/etc/os-release
env:
- INSECURE=true
- name: rngd
image: linuxkit/rngd:310c16ec5315bd07d4b8f5332cfa7dc5cbc7d368
- name: dhcpcd
image: linuxkit/dhcpcd:52d2c4df0311b182e99241cdc382ff726755c450
command: ["/etc/ip/dhcp.sh", "false"]
binds.add:
- /var/lib/dhcpcd:/var/lib/dhcpcd
- /run:/run
- /etc/ip/dhcp.sh:/etc/ip/dhcp.sh
- /dhcpcd.conf:/dhcpcd.conf
runtime:
mkdir:
- /var/lib/dhcpcd
- name: ntpd
image: linuxkit/openntpd:d6c36ac367ed26a6eeffd8db78334d9f8041b038
binds:
- /var/run:/var/run
- name: hook-docker
image: quay.io/tinkerbell/hook-docker:latest
capabilities:
- all
net: host
pid: host
mounts:
- type: cgroup
options: ["rw", "nosuid", "noexec", "nodev", "relatime"]
binds:
- /dev/console:/dev/console
- /dev:/dev
- /etc/resolv.conf:/etc/resolv.conf
- /lib/modules:/lib/modules
- /var/run/docker:/var/run
- /var/run/images:/var/lib/docker
- /var/run/worker:/worker
runtime:
mkdir:
- /var/run/images
- /var/run/docker
- /var/run/worker
- name: hook-bootkit
image: quay.io/tinkerbell/hook-bootkit:latest
capabilities:
- all
net: host
mounts:
- type: cgroup
options: ["rw", "nosuid", "noexec", "nodev", "relatime"]
binds:
- /var/run/docker:/var/run
runtime:
mkdir:
- /var/run/docker
#dbg - name: sshd
#dbg image: linuxkit/sshd:666b4a1a323140aa1f332826164afba506abf597
files:
- path: etc/profile.d/local.sh
contents: |
alias docker='ctr -n services.linuxkit tasks exec --tty --exec-id cmd hook-docker docker'
alias docker-shell='ctr -n services.linuxkit tasks exec --tty --exec-id shell hook-docker sh'
name_version=$(grep PRETTY_NAME= /etc/os-release | cut -d'=' -f2 | tr -d '"')
export PS1='${name_version}:\w\$ '
# Disable kernel messages on console
echo 4 > /proc/sys/kernel/printk
mode: "0644"
- path: etc/motd
mode: "0644"
# This is ANSI Regular font
contents: |
Welcome to HookOS! Your Tinkerbell operating system installation environment.
██ ██ ██ ██████ ███████
██ ██ ██████ ██████ ██ ██ ██ ██ ██
███████ ██ ██ ██ ██ █████ ██ ██ ███████
██ ██ ██ ██ ██ ██ ██ ██ ██ ██ ██
██ ██ ██████ ██████ ██ ██ ██████ ███████
- Use `docker` commands to access the tink worker/agent container and workflow action containers.
- Logs are located in the `/var/log/` directory.
- path: etc/os-release
mode: "0444"
contents: |
NAME="HookOS"
VERSION=0.8.1
ID=hookos
VERSION_ID=0.8.1
PRETTY_NAME="HookOS 0.8.1"
ANSI_COLOR="1;34"
HOME_URL="https://github.com/tinkerbell/hook"
- path: etc/ip/vlan.sh
source: "files/vlan.sh"
mode: "0777"
- path: etc/ip/dhcp.sh
source: "files/dhcp.sh"
mode: "0777"
- path: dhcpcd.conf
source: "files/dhcpcd.conf"
mode: "0644"
#dbg - path: root/.ssh/authorized_keys
#dbg source: ~/.ssh/id_rsa.pub
#dbg mode: "0600"
#dbg optional: true
trust:
org:
- linuxkit
- library