Skip to content

Commit 65a45a1

Browse files
committed
Drop hook_debug.yaml in favor of processing hook.yaml
This way we only have one source file to manage and we don't have to worry about the debug matching the production one. Debug was not updated to the new kernel nor the ntpd bind mount addition. Signed-off-by: Manuel Mendez <github@i.m.mmlb.dev>
1 parent 4942d69 commit 65a45a1

File tree

4 files changed

+31
-87
lines changed

4 files changed

+31
-87
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ bin/
22
dist/
33
.env
44
hook-bootkit/local/
5+
hook-debug.*.yaml
56
hook-docker/local/
67
hook-*.tar.gz
78
hook.*.yaml

Makefile

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ hook.$(TAG).yaml: $(LINUXKIT_CONFIG)
2323
sed '/quay.io/ s|:latest|:$(TAG)|' $^ > $@.tmp
2424
mv $@.tmp $@
2525

26+
hook-debug.$(TAG).yaml: hook.$(TAG).yaml
27+
sed '/^\s*#dbg/ s|#dbg||' $^ > $@.tmp
28+
mv $@.tmp $@
29+
2630
image-amd64: hook.$(TAG).yaml
2731
mkdir -p out
2832
linuxkit build -docker -pull -format kernel+initrd -name hook-x86_64 -dir out $^
@@ -41,13 +45,13 @@ dev-image-arm64: hook.$(TAG).yaml
4145

4246
image: image-amd64 image-arm64
4347

44-
debug-image-amd64:
48+
debug-image-amd64: hook-debug.$(TAG).yaml
4549
mkdir -p out/amd64
46-
linuxkit build --docker -format kernel+initrd -name debug-x86_64 -dir out hook_debug.yaml
50+
linuxkit build --docker -format kernel+initrd -name debug-x86_64 -dir out $^
4751

48-
debug-image-arm64:
52+
debug-image-arm64: hook-debug.$(TAG).yaml
4953
mkdir -p out/arm64
50-
linuxkit build --docker -arch arm64 -format kernel+initrd -name debug-aarch64 -dir out hook_debug.yaml
54+
linuxkit build --docker -arch arm64 -format kernel+initrd -name debug-aarch64 -dir out $^
5155

5256
debug-image: debug-image-amd64 debug-image-arm64
5357

hook.yaml

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
kernel:
22
image: quay.io/tinkerbell/hook-kernel:5.10.85
33
cmdline: "console=tty0 console=ttyS0 console=ttyAMA0 console=ttysclp0"
4+
45
init:
56
- linuxkit/init:v0.8
67
- linuxkit/runc:v0.8
78
- linuxkit/containerd:v0.8
89
- linuxkit/ca-certificates:v0.8
10+
911
onboot:
1012
- name: sysctl
1113
image: linuxkit/sysctl:v0.8
14+
1215
- name: sysfs
1316
image: linuxkit/sysfs:v0.8
17+
1418
- name: dhcpcd
1519
image: linuxkit/dhcpcd:v0.8
1620
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1"]
@@ -20,15 +24,18 @@ onboot:
2024
runtime:
2125
mkdir:
2226
- /var/lib/dhcpcd
27+
2328
services:
2429
- name: getty
2530
image: linuxkit/getty:v0.8
2631
binds.add:
2732
- /etc/profile.d/local.sh:/etc/profile.d/local.sh
2833
env:
2934
- INSECURE=true
35+
3036
- name: rngd
3137
image: linuxkit/rngd:v0.8
38+
3239
- name: dhcpcd
3340
image: linuxkit/dhcpcd:v0.8
3441
binds.add:
@@ -37,6 +44,7 @@ services:
3744
runtime:
3845
mkdir:
3946
- /var/lib/dhcpcd
47+
4048
- name: ntpd
4149
image: linuxkit/openntpd:v0.8
4250
binds:
@@ -52,13 +60,14 @@ services:
5260
- type: cgroup
5361
options: ["rw", "nosuid", "noexec", "nodev", "relatime"]
5462
binds:
63+
#dbg- /etc/docker/daemon.json:/etc/docker/daemon.json
64+
- /dev/console:/dev/console
65+
- /dev:/dev
5566
- /etc/resolv.conf:/etc/resolv.conf
5667
- /lib/modules:/lib/modules
5768
- /var/run/docker:/var/run
58-
- /var/run/worker:/worker
59-
- /dev/console:/dev/console
60-
- /dev:/dev
6169
- /var/run/images:/var/lib/docker
70+
- /var/run/worker:/worker
6271
runtime:
6372
mkdir:
6473
- /var/run/images
@@ -78,12 +87,22 @@ services:
7887
runtime:
7988
mkdir:
8089
- /var/run/docker
90+
91+
#dbg - name: sshd
92+
#dbg image: linuxkit/sshd:666b4a1a323140aa1f332826164afba506abf597
93+
8194
files:
8295
- path: etc/profile.d/local.sh
8396
contents: |
8497
alias docker='ctr -n services.linuxkit tasks exec --tty --exec-id cmd docker docker'
8598
alias docker-shell='ctr -n services.linuxkit tasks exec --tty --exec-id shell docker sh'
8699
mode: "0644"
100+
101+
#dbg - path: root/.ssh/authorized_keys
102+
#dbg source: ~/.ssh/id_rsa.pub
103+
#dbg mode: "0600"
104+
#dbg optional: true
105+
87106
trust:
88107
org:
89108
- linuxkit

hook_debug.yaml

Lines changed: 0 additions & 80 deletions
This file was deleted.

0 commit comments

Comments
 (0)