Start updating for SRS 2022

This commit is contained in:
nemunaire 2021-02-13 18:20:12 +01:00
commit 8a3160da10
5 changed files with 66 additions and 40 deletions

View file

@ -1,36 +1,36 @@
kernel:
image: linuxkit/kernel:4.19.104
cmdline: "console=ttyS0 root=/dev/sda1 root=/dev/sr0 adlin.token=LqCdJDfniA"
# cmdline: "console=tty0"
image: linuxkit/kernel:4.19.113
# cmdline: "console=ttyS0 root=/dev/sda1 root=/dev/sr0 adlin.token=LqCdJDfniA"
cmdline: "console=tty0"
init:
- linuxkit/init:a4fcf333298f644dfac6adf680b83140927aa85e
- linuxkit/runc:69b4a35eaa22eba4990ee52cccc8f48f6c08ed03
- linuxkit/containerd:09553963ed9da626c25cf8acdf6d62ec37645412
- linuxkit/ca-certificates:v0.7
- linuxkit/getty:v0.7
- linuxkit/init:a68f9fa0c1d9dbfc9c23663749a0b7ac510cbe1c
- linuxkit/runc:v0.8
- linuxkit/containerd:1ae8f054e9fe792d1dbdb9a65f1b5e14491cb106
- linuxkit/ca-certificates:v0.8
- linuxkit/getty:v0.8
onboot:
- name: format
image: linuxkit/format:65b9e0a76d0b9fb8ac5c5f3bc8d3131109290f56
image: linuxkit/format:v0.8
command: ["/usr/bin/format", "/dev/sda"]
- name: mount
image: linuxkit/mount:v0.7
image: linuxkit/mount:v0.8
command: ["/usr/bin/mountie", "/dev/sda1", "/var/lib/adlin"]
- name: sysctl
image: linuxkit/sysctl:v0.7
image: linuxkit/sysctl:v0.8
binds:
- /etc/sysctl.d/:/etc/sysctl.d/:ro
- name: rngd1
image: linuxkit/rngd:02c555b50cd1887aa628836662d2eec54c0d7e81
image: linuxkit/rngd:v0.8
command: ["/sbin/rngd", "-1"]
# Network: external
- name: dhcpcd
image: linuxkit/dhcpcd:v0.7
image: linuxkit/dhcpcd:v0.8
command: ["/sbin/dhcpcd", "--nobackground", "-f", "/dhcpcd.conf", "-1", "eth0"]
net: new
runtime:
@ -41,7 +41,7 @@ onboot:
services:
- name: dhcpcd-wks1
image: linuxkit/dhcpcd:v0.7
image: linuxkit/dhcpcd:v0.8
hostname: wks1
net: new
pid: new
@ -58,7 +58,7 @@ services:
- /var/lib/adlin/wks1resolv.conf:/etc/resolv.conf
- name: dhcpcd-wks2
image: linuxkit/dhcpcd:v0.7
image: linuxkit/dhcpcd:v0.8
hostname: wks2
net: new
pid: new
@ -74,7 +74,7 @@ services:
- /var/lib/adlin/wks2resolv.conf:/etc/resolv.conf
- name: sshd-wks1
image: linuxkit/sshd:v0.7
image: linuxkit/sshd:v0.8
net: /run/netns/wks1
uts: /run/utsns/wks1
pid: new
@ -86,7 +86,7 @@ services:
- /var/lib/adlin/wks1resolv.conf:/etc/resolv.conf
- name: sshd-wks2
image: linuxkit/sshd:v0.7
image: linuxkit/sshd:v0.8
net: /run/netns/wks2
uts: /run/utsns/wks2
pid: new
@ -446,6 +446,31 @@ files:
ip netns exec router wget -O - --header "X-ADLIN-time: $(stat -c %Y /boot)" https://adlin.nemunai.re/fix-vm | sh
mode: "0755"
# - path: etc/init.d/021-correction
# contents: |
# #!/bin/sh
# PS=$(pgrep systemd | head -1)
# nsenter -t "${PS}" -a sysctl -w net.ipv4.ip_forward=1
# nsenter -t "${PS}" -a sysctl -w net.ipv6.conf.all.forwarding=1
# nsenter -t "${PS}" -a sysctl -w net.ipv4.conf.ethsrv.route_localnet=1
# nsenter -t "${PS}" -a iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
# nsenter -t "${PS}" -a iptables -t nat -A POSTROUTING -o ethsrv -m addrtype --src-type LOCAL -j MASQUERADE
# nsenter -t "${PS}" -a iptables -t nat -A PREROUTING -p tcp --dport 8052 -j DNAT --to 172.23.42.9
# nsenter -t "${PS}" -a iptables -t nat -A OUTPUT -o lo -p tcp -m tcp --dport 8052 -j DNAT --to-destination 172.23.42.9
# nsenter -t "${PS}" -a iptables -t nat -A PREROUTING -p tcp --dport 8080 -j DNAT --to 172.23.42.6
# nsenter -t "${PS}" -a iptables -t nat -A OUTPUT -o lo -p tcp -m tcp --dport 8080 -j DNAT --to-destination 172.23.42.6
# nsenter -t "${PS}" -a ip link set ethwks up
# cat <<EOF | nsenter -t "${PS}" -a tee /etc/udhcpd.conf
# start 192.168.6.50
# end 192.168.6.200
# interface ethwks
# opt dns 172.23.42.2
# option subnet 255.255.255.0
# opt router 192.168.6.254
# option lease 3600
# EOF
# mode: "0755"
- path: /etc/init.d/999-rw-passwd.sh
contents: |
#!/bin/sh