Home K8S setup

This commit is contained in:
2021-03-13 00:23:06 +00:00
commit 8a5296a104
47 changed files with 3098 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
# This script
# - prepares raspberry pi memory card ( /dev/disk5 )
# - partitions the memory card
# - unpacks RPI rpi base system
# - applies headless boot configuration with network interface and ssh agent accepting connections without password
PI_CARD="/dev/disk5"
ALPINE_BASE_IMAGE="https://dl-cdn.alpinelinux.org/alpine/v3.13/releases/aarch64/alpine-rpi-3.13.2-aarch64.tar.gz"
# [[ -f /Volumes/RPI0 ]] && echo "Deleting leftover directory"; rm -fr /Volumes/RPI0 || echo "Clean and dandy on the Volumes front"
[[ ! -f static/alpine-aarch64.tar.gz ]] && wget $ALPINE_BASE_IMAGE -O static/alpine-aarch64.tar.gz || echo "Alpine baseimg already exists"
sudo diskutil eraseDisk FAT32 RPI MBRFormat $PI_CARD
sudo diskutil partitionDisk /dev/$PI_CARD MBRFormat FAT32 RPI0 1g FREE RPISYS 0b
sudo tar xf static/alpine-aarch64.tar.gz -C /Volumes/RPI0
sudo cp static/headless.tar.gz /Volumes/RPI0/headless.apkovl.tar.gz
Binary file not shown.
+16
View File
@@ -0,0 +1,16 @@
KEYMAPOPTS="us us-intl"
HOSTNAMEOPTS="-n alpine-test"
INTERFACESOPTS="auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
hostname alpine-test
"
DNSOPTS="-d local"
TIMEZONEOPTS="-z UTC"
APKREPOSOPTS="-f"
SSHDOPTS="-c openssh"
NTPOPTS="-c openntpd"