
[{"content":"","date":"5 June 2026","externalUrl":null,"permalink":"/tags/docker/","section":"Tags","summary":"","title":"Docker","type":"tags"},{"content":"","date":"5 June 2026","externalUrl":null,"permalink":"/tags/homelab/","section":"Tags","summary":"","title":"Homelab","type":"tags"},{"content":"","date":"5 June 2026","externalUrl":null,"permalink":"/series/homelab-build/","section":"Series","summary":"","title":"Homelab Build","type":"series"},{"content":"","date":"5 June 2026","externalUrl":null,"permalink":"/tags/k3s/","section":"Tags","summary":"","title":"K3s","type":"tags"},{"content":"","date":"5 June 2026","externalUrl":null,"permalink":"/tags/kubernetes/","section":"Tags","summary":"","title":"Kubernetes","type":"tags"},{"content":"","date":"5 June 2026","externalUrl":null,"permalink":"/","section":"Neils Tech Blog","summary":"","title":"Neils Tech Blog","type":"page"},{"content":"","date":"5 June 2026","externalUrl":null,"permalink":"/tags/networking/","section":"Tags","summary":"","title":"Networking","type":"tags"},{"content":"","date":"5 June 2026","externalUrl":null,"permalink":"/posts/","section":"Posts","summary":"","title":"Posts","type":"posts"},{"content":"","date":"5 June 2026","externalUrl":null,"permalink":"/tags/raspberry-pi/","section":"Tags","summary":"","title":"Raspberry Pi","type":"tags"},{"content":" Objective # Establish a consistent, reproducible baseline for Raspberry Pi nodes to support a future Kubernetes (k3s) cluster. This phase focuses on hardware setup, OS provisioning, networking, and container runtime readiness.\nArchitecture Overview # Nodes: 1x Control Plane (Pi4) 3x Worker Nodes (Pi4) Network: Linksys Router (DHCP) Netgear GS308PP Switch Access: SSH via Ubuntu (WSL) on Windows host OS: Debian-based Raspberry Pi OS Phase 1: Hardware Setup # Components # Raspberry Pi 4 devices MicroSD cards (32GB–256GB) Netgear GS308PP switch Ethernet cables (Cat5e/Cat6) USB-C power supply (multi-port Anker recommended) Physical Topology # Router (Linksys) ↓ Switch (Netgear GS308PP) ↓ Pi Nodes (eth0) ↓ Windows Desktop (WSL access) Key Notes # Switch is unmanaged → no configuration required All Pis connected via Ethernet (eth0) WiFi intentionally disabled for cluster stability Phase 2: OS Installation # Tool Used # Raspberry Pi Imager (Windows) OS Selection # Raspberry Pi OS (64-bit, Lite preferred) Advanced Configuration (IMPORTANT) # Enable SSH Set username/password Configure hostname per node: pi4-control-plane pi4-worker-1 pi4-worker-2 pi4-worker-3 Validation # After flashing:\nBoot Pi Confirm activity LED (green blinking) Verify network visibility via nmap Phase 3: Network Discovery # From Ubuntu (WSL):\nnmap -sn 10.252.1.0/24 Identify nodes via:\nHostnames IP addresses assigned via DHCP Phase 4: SSH Access # ssh @ If host key mismatch occurs:\nssh-keygen -f \u0026#39;~/.ssh/known_hosts\u0026#39; -R \u0026#39;\u0026#39; Phase 5: Baseline System Configuration # Update System # sudo apt update \u0026amp;\u0026amp; sudo apt upgrade -y Install Core Tools # sudo apt install -y curl wget git htop net-tools nmap unzip rfkill Phase 6: Kernel Configuration (cgroups) # Edit:\nsudo nano /boot/firmware/cmdline.txt Ensure the line contains:\ncgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1 Reboot:\nsudo reboot Verify:\ncat /sys/fs/cgroup/cgroup.controllers Expected:\ncpuset cpu io memory pids Phase 7: Disable WiFi (Critical for Cluster Stability) # Immediate Disable # sudo rfkill block wifi sudo ip link set wlan0 down Prevent DHCP Usage # echo \u0026#39;denyinterfaces wlan0\u0026#39; | sudo tee -a /etc/dhcpcd.conf Disable WiFi Services # sudo systemctl stop wpa_supplicant sudo systemctl disable wpa_supplicant Persist Disable via systemd # sudo tee /etc/systemd/system/disable-wifi.service \u0026gt; /dev/null \u0026lt;\u0026lt;EOF [Unit] Description=Disable WiFi After=network.target [Service] Type=oneshot ExecStart=/usr/sbin/rfkill block wifi [Install] WantedBy=multi-user.target EOF sudo systemctl daemon-reload sudo systemctl enable disable-wifi.service Verification # ip a rfkill list Expected:\neth0 active with IP wlan0 no IP Soft blocked: yes Phase 8: Docker Installation # curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh Add user to Docker group:\nsudo usermod -aG docker $USER Reconnect session and verify:\ndocker run hello-world Phase 9: Network Validation # Check interfaces:\nip a ip route Confirm:\nSingle interface (eth0) No WiFi routing Default gateway via router Phase 10: Troubleshooting Lessons Learned # Issue: SSH \u0026ldquo;Host Identification Changed\u0026rdquo; # Cause: Reimaged device or IP reassignment Fix: ssh-keygen -R Issue: Multiple IPs per Node # Cause: WiFi + Ethernet both active Impact: Routing inconsistencies Cluster instability Fix: Disable WiFi completely Issue: Docker Permission Denied # Cause: User not in docker group Fix: sudo usermod -aG docker $USER Issue: dpkg Lock Errors # Cause: Background apt process Fix: Wait or complete pending configuration sudo dpkg --configure -a Phase 1 Completion Criteria # All nodes must meet:\nReachable via SSH Unique hostname assigned System updated WiFi disabled permanently Single network interface (eth0) Time synchronized cgroups enabled (memory present) Docker installed and functional Next Phase # Phase 2 will include:\nStatic IP assignment SSH key-based authentication k3s control plane deployment Worker node cluster join ","date":"5 June 2026","externalUrl":null,"permalink":"/posts/pi-cluster-runbook/","section":"Posts","summary":"","title":"Raspberry Pi Cluster Runbook - Phase 1: Node Provisioning","type":"posts"},{"content":"","date":"5 June 2026","externalUrl":null,"permalink":"/series/","section":"Series","summary":"","title":"Series","type":"series"},{"content":"","date":"5 June 2026","externalUrl":null,"permalink":"/tags/","section":"Tags","summary":"","title":"Tags","type":"tags"},{"content":"","date":"4 June 2026","externalUrl":null,"permalink":"/tags/infrastructure/","section":"Tags","summary":"","title":"Infrastructure","type":"tags"},{"content":"","date":"4 June 2026","externalUrl":null,"permalink":"/tags/linux/","section":"Tags","summary":"","title":"Linux","type":"tags"},{"content":" Raspberry Pi 4 Provisioning SOP (Windows → Infrastructure) # Objective # Provision a Raspberry Pi 4 as a remotely accessible Linux node, install Docker, and deploy a containerized service using Docker Compose.\n1. Hardware + Network Setup # Components # Raspberry Pi 4 MicroSD card (≥32GB, 256GB used) Ethernet cable Netgear GS308PP switch Windows desktop (host machine) Physical Connections # Connect Pi → Netgear switch (Ethernet) Connect switch → router (Linksys) (Optional) Connect desktop → switch Expected Outcome # Pi receives IP via DHCP from router Network LEDs active (green = link, blinking = activity) 2. OS Installation (Windows) # Tooling # Raspberry Pi Imager (Windows) Steps # Insert MicroSD into Windows machine Open Raspberry Pi Imager Select: OS: Debian-based image (Debian 13 used) Storage: MicroSD card Configure (advanced options): Enable SSH Set username/password Configure hostname (e.g., pi4-control-plane) Write image to disk Validation # bootfs partition appears after write No write errors 3. First Boot + Network Discovery # Power On # Insert SD card into Pi Connect power On Windows (PowerShell) # ipconfig arp -a On Router (preferred) # Log into router UI (Linksys) Identify DHCP lease for Pi Expected Outcome # Pi assigned IP (e.g., 10.252.1.201) 4. SSH Access # From Windows or WSL # ssh \u0026lt;user\u0026gt;@\u0026lt;pi-ip\u0026gt; First Connection # Accept host fingerprint Enter password Validation # hostname whoami hostname -I 5. System Validation # cat /etc/os-release uname -a Expected # Debian 13 (trixie) Hostname matches configured value 6. Package Management Stabilization # Issue Encountered # dpkg lock due to background updates Resolution Process # ps -p \u0026lt;pid\u0026gt; -f top pgrep -a apt pgrep -a dpkg Correct Handling # Wait for processes to complete Avoid removing lock files Recovery (if stuck) # sudo kill -9 \u0026lt;pid\u0026gt; sudo dpkg --configure -a sudo apt update 7. Docker Installation # curl -fsSL https://get.docker.com -o get-docker.sh sudo sh get-docker.sh Configure Non-Root Access # sudo usermod -aG docker $USER exit ssh \u0026lt;user\u0026gt;@\u0026lt;pi-ip\u0026gt; Validation # docker run hello-world 8. Project Initialization # mkdir -p ~/homelab-platform cd ~/homelab-platform Install Git # sudo apt install -y git git config --global user.name \u0026#34;\u0026lt;name\u0026gt;\u0026#34; git config --global user.email \u0026#34;\u0026lt;email\u0026gt;\u0026#34; 9. GitHub SSH Setup # ssh-keygen -t ed25519 -C \u0026#34;\u0026lt;email\u0026gt;\u0026#34; cat ~/.ssh/id_ed25519.pub Add key to GitHub → Settings → SSH and GPG Keys # Validate # ssh -T git@github.com 10. First Service Deployment (Nginx) # Test Container # docker run -d --name nginx-test -p 8080:80 nginx Validate # Browser: http://\u0026lt;pi-ip\u0026gt;:8080 11. Transition to Docker Compose # docker-compose.yml # services: nginx: image: nginx:latest container_name: nginx-test ports: - \u0026#34;8080:80\u0026#34; restart: unless-stopped Resolve Conflict (if needed) # docker rm -f nginx-test Deploy # docker compose up -d docker ps 12. Repository Integration # git init git remote add origin git@github.com:\u0026lt;username\u0026gt;/homelab-platform.git git add . git commit -m \u0026#34;Initial homelab setup with nginx service\u0026#34; git push -u origin main Troubleshooting Reference # Blink Pi to Locate Faulty Nodes # echo none | sudo tee /sys/class/leds/led0/trigger while true; do echo 1 | sudo tee /sys/class/leds/led0/brightness; sleep 0.5; echo 0 | sudo tee /sys/class/leds/led0/brightness; sleep 0.5; done Once discovered # Ctrl + C echo mmc0 | sudo tee /sys/class/leds/led0/trigger No IP Address (169.254.x.x) # Cause: No DHCP Fix: Ensure switch → router connection Cannot SSH (Connection Refused) # sudo apt install -y openssh-server sudo systemctl enable ssh sudo systemctl start ssh Docker Permission Denied # sudo usermod -aG docker $USER Error Cannot Write to Disk # Port Not Accessible # docker ps docker logs \u0026lt;container\u0026gt; Final State # Pi accessible via SSH Docker installed and functional GitHub integration complete Service deployed via Docker Compose Node designated as pi4-control-plane ","date":"4 June 2026","externalUrl":null,"permalink":"/posts/pi4-provisioning-sop/","section":"Posts","summary":"","title":"Raspberry Pi 4 Provisioning SOP","type":"posts"},{"content":"","externalUrl":null,"permalink":"/authors/","section":"Authors","summary":"","title":"Authors","type":"authors"},{"content":"","externalUrl":null,"permalink":"/categories/","section":"Categories","summary":"","title":"Categories","type":"categories"}]