Initial commit

The first host running Fedora CoreOS (FCOS) is
*k8s-aarch64-n0.pyrocufflink.blue*.  This is a Raspberry Pi 4 that is a
specialized member of the Kubernetes cluster.  It hosts the Zigbee2MQTT
and ZWaveJS2MQTT containers, and has the Zigbee and ZWave controller USB
devices attached.
master
Dustin 2023-07-17 15:16:01 -05:00
commit 9dc46e2eff
6 changed files with 75 additions and 0 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
*.ign

9
butane-watch.sh Normal file
View File

@ -0,0 +1,9 @@
#!/bin/sh
# vim: set sw=4 ts=4 sts=4 et :
inotifywait -e CLOSE_WRITE -m . \
| stdbuf -o 0 grep -F .yaml \
| while read _ _ f; do
printf 'Regenerating %s from %s ...\n' "${f%.yaml}.ign" "${f}"
butane -d . ${f} > ${f%.yaml}.ign
done

19
install-kubelet.service Normal file
View File

@ -0,0 +1,19 @@
# vim: set ft=systemd :
[Unit]
Description=Install Kubernetes/Kubelet
After=network-online.target
Wants=network-online.target
Before=zincati.service
ConditionPathExists=!/usr/bin/kubectl
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/rpm-ostree install --apply-live --allow-inactive \
cri-o \
iscsi-initiator-utils \
kubernetes-node \
kubernetes-kubeadm
[Install]
WantedBy=multi-user.target

13
k8s-aarch64-n0.yaml Normal file
View File

@ -0,0 +1,13 @@
variant: fcos
version: 1.4.0
ignition:
config:
merge:
- local: sshkeys.ign
- local: kubelet.ign
storage:
files:
- path: /etc/hostname
contents:
inline: k8s-aarch64-n0.pyrocufflink.blue
mode: 0644

26
kubelet.yaml Normal file
View File

@ -0,0 +1,26 @@
variant: fcos
version: 1.4.0
storage:
files:
- path: /etc/systemd/system/install-kubelet.service
contents:
local: install-kubelet.service
mode: 0644
- path: /etc/modules-load.d/k8s.conf
contents:
inline: |+
br_netfilter
- path: /etc/sysctl.d/k8s.conf
contents:
inline: |+
net.bridge.bridge-nf-call-iptables = 1
net.bridge.bridge-nf-call-ip6tables = 1
net.ipv4.ip_forward = 1
links:
- path: /etc/resolv.conf
overwrite: true
target: ../run/systemd/resolve/resolv.conf
systemd:
units:
- name: install-kubelet.service
enabled: true

7
sshkeys.yaml Normal file
View File

@ -0,0 +1,7 @@
variant: fcos
version: 1.4.0
passwd:
users:
- name: core
ssh_authorized_keys:
- sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29tAAAAINZCN2cxMDwedJ1Ke23Z3CZRcOYjqW8fFqsooRus7RK0AAAABHNzaDo= dustin@rosalina.pyrocufflink.blue