All notable changes to this project will be documented in this file.
This changelog is based on Keep a Changelog. This project adheres to Semantic Versioning.
-
Added a default Kubernetes
StorageClass
of "manual", for manually creatingPersistentVolume
resources.--- apiVersion: storage.k8s.io/v1 kind: StorageClass metadata: name: manual annotations: storageclass.kubernetes.io/is-default-class: "true" provisioner: kubernetes.io/no-provisioner volumeBindingMode: WaitForFirstConsumer
See "Change the default StorageClass" for more information.
-
#3 Fixed Kubernetes Node Taint configuration; I had skipped this step in the original installation guide. The fix was really simple:
$ kubectl taint nodes --all node-role.kubernetes.io/master- node/homelab untainted
The home lab is alive! I can tmux
from the iPad via mosh
! 💯
-
Installed a few missing utilities, including
mosh
,iptables-persistent
,telnet
, andnetcat
. -
Installed the Docker APT repositories and Docker CE packages, following this guide
$ sudo apt-get remove docker docker-engine docker.io containerd runc $ sudo apt-get install \ apt-transport-https \ ca-certificates \ curl \ gnupg2 \ software-properties-common $ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo apt-key add $ sudo apt-key fingerprint 0EBFCD88 $ sudo add-apt-repository \ "deb [arch=amd64] https://download.docker.com/linux/debian \ $(lsb_release -cs) \ stable" $ sudo apt-get update $ sudo apt-get install docker-ce docker-ce-cli containerd.io
-
Installed Kubernetes!
Followed these guides to install Kubernetes using
kubeadm
:In the end it was pretty simple to setup!
$ sudo apt-get update && sudo apt-get install -y apt-transport-https curl $ curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add - $ cat <<EOF | sudo tee /etc/apt/sources.list.d/kubernetes.list deb https://apt.kubernetes.io/ kubernetes-xenial main EOF $ sudo apt-get update $ sudo apt-get install -y kubelet kubeadm kubectl $ sudo apt-mark hold kubelet kubeadm kubectl $ kubeadm config images pull $ sudo swapoff -a $ sudo kubeadm init $ sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config $ sudo chown ${USER}:${USER} $HOME/.kube/config $ chmod 644 $HOME/.kube/config
-
Installed a Kubernetes network plugin (Flannel)
$ kubectl apply -f https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
-
I live tweeted about my progress!
-
Configured some iptables rules!
$ sudo iptables -S -P INPUT ACCEPT -P FORWARD ACCEPT -P OUTPUT ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p udp -m udp --dport 60000:61000 -j ACCEPT $ sudo iptables -S -P INPUT ACCEPT -P FORWARD ACCEPT -P OUTPUT ACCEPT -A INPUT -i lo -j ACCEPT -A INPUT -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT -A INPUT -p tcp -m tcp --dport 22 -j ACCEPT -A INPUT -p udp -m udp --dport 60000:61000 -j ACCEPT
TIL: you can run
dpkg-reconfigure iptables-persistent
to save firewall rules. -
Disabled system swap (as recommended by
kubeadm
)$ sudo swapoff -a
I also edited
/etc/fstab
and commented out the swap partition to prevent it from be mounted after a reboot.
-
Installed Debian Buster! Not to be dismayed by my not-so-smart-os woes, I decided to take the
less interestingbasic route and just install linux. I grew up on Ubuntu Linux, but I've grown to prefer an even less opinionated Linux, so I grabbed the latest Debian image, flashed my USB drive, and got up and running in minutes. -
I chose not to install a desktop environment to keep things lean, and I also opted not to install any of the package bundles (e.g. what does "basic system utilities") even mean?
-
Installed
ssh
,sudo
,vim
,curl
,tmux
,git
,htop
, and the drivers for my WiFi card (firmware-iwlwifi
). Keeping things lightweight! -
Added my user to the sudoers
usermod -aG sudo calebhailey
-
Added
/scripts/ddns
for easy remote access via a Google Domains hosted domain name (documentation). -
Synced my dotfiles.
-
Modified
/etc/ssh/sshd_config
to disable password authentication and PAM. -
Modified the root user crontab to run the
ddns
script every 5 minutes:*/5 * * * * /usr/local/bin/ddns >> /var/log/ddns.log 2>&1
Works like a charm! I get a nice clean log output like:
$ $ tail -f /var/log/ddns.log Thu 26 Dec 2019 11:55:01 PM PST nochg 123.123.123.123 Fri 27 Dec 2019 12:00:02 AM PST nochg 123.123.123.123
Now I can easily pull up a log to see how often my ISP is changing my IP address. Things only a 🤓 would be excited about.
-
Modified my user's
$HOME/.ssh/authorized_keys
so I can SSH.$ curl -s https://github.com/calebhailey.keys > $HOME/.ssh/authorized_keys
Perhaps I should hook this up as a cron job too?
Well, that was short lived. The SmartOS installer hangs immediately after loading the kernel modules. Some intense Googling led me to some GitHub issues about similar issues on NUC7 series systems, which were eventually fixed; I attempted some of the troubleshooting steps from those GitHub issues without success. Elsewhere (Reddit maybe?) I found comments suggesting that NUC7 owners were having success (thanks to the above mentioned fixes) where NUC8 owners were not. So perhaps my NUC (model number NUC8i7BEH) isn't supported by SmartOS (yet)... so abort mission?
-
Installed SmartOS following the Quick Start Guide
-
Live tweeted, like a nerd 🤓
-
Added Raspberry Pi 4 to the mix! Some of my Googling suggested that the installer hanging was an ACPI issue, so the USB ports would go dead. So maybe a PXE boot would work? Is that a good enough excuse to order a Raspberry Pi 4? Sure. Why not. The Raspberry Pi should arrive in a few days, and shortly thereafter is shall become a PXE server... and whatever else I need to init my home lab? Yay.
- #1 Fixed image authorization failure (disabled smart boot in the Intel NUC BIOS)
- Tried a few dozen different
-
Started a README(.md)
-
Started this CHANGELOG(.md) to document my journey
-
Added a
.gitignore
file to ignore my localdownloads/
directory -
Built a SmartOS Bootable USB Key following this guide
Downloaded the latest SmartOS tarball... ran some commands I found on the internet (what's the worst that could happen???):
$ diskutil list /dev/disk0 (internal, physical): #: TYPE NAME SIZE IDENTIFIER 0: GUID_partition_scheme *1.0 TB disk0 1: EFI EFI 314.6 MB disk0s1 2: Apple_APFS Container disk1 1.0 TB disk0s2 /dev/disk1 (synthesized): #: TYPE NAME SIZE IDENTIFIER 0: APFS Container Scheme - +1.0 TB disk1 Physical Store disk0s2 1: APFS Volume Macintosh HD - Data 241.7 GB disk1s1 2: APFS Volume Preboot 125.5 MB disk1s2 3: APFS Volume Recovery 1.6 GB disk1s3 4: APFS Volume VM 3.2 GB disk1s4 5: APFS Volume Macintosh HD 11.0 GB disk1s5 /dev/disk2 (external, physical): #: TYPE NAME SIZE IDENTIFIER 0: FDisk_partition_scheme *8.0 GB disk2 1: Windows_FAT_32 NO NAME 8.0 GB disk2s1 $ diskutil unmountDisk /dev/disk2 Unmount of all volumes on disk2 was successful $ gunzip smartos-20191219T093118Z-USB.img.gz $ ls smartos-20191219T093118Z-USB.img $ sudo dd bs=1m if=smartos-20191219T093118Z-USB.img of=/dev/rdisk2 1907+1 records in 1907+1 records out 2000000000 bytes transferred in 157.314476 secs (12713388 bytes/sec) $ diskutil eject /dev/disk2 Disk /dev/disk2 ejected
Success?!
-
Next: Stick the USB key in a port and boot from it!
-
No longer able to run all-the-containers on my laptop, I suddenly remembered that I have an unused computer on the shelf (reaches for the Intel NUC).
-
Installed some DDR4 RAM and NVMe storage in an Intel NUC, turned it on...
A bootable device has not been detected.
Womp womp.
-
Started Googling...
-
Quickly determined that it would be helpful to document this journey.
$ mkdir homelab && cd homelab && git init
- Unboxed an Intel NUC, realized it required assembly, set it on a shelf to collect dust.