- Add .gitignore: exclude compiled binaries, build artifacts, and Helm values files containing real secrets (authentik, prometheus) - Add all Kubernetes deployment manifests (deployment/) - Add services source code: ha-sync, device-inventory, games-console, paperclip, parts-inventory - Add Ansible orchestration: playbooks, roles, inventory, cloud-init - Add hardware specs, execution plans, scripts, HOMELAB.md - Add skills/homelab/SKILL.md + skills/install.sh to preserve Copilot skill - Remove previously-tracked inventory-cli binary from git index Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
39 lines
1.4 KiB
Bash
Executable file
39 lines
1.4 KiB
Bash
Executable file
#!/usr/bin/env bash
|
|
# Build games-console images and load them onto all K8s worker nodes.
|
|
# Run from services/games-console/ (or via: make load).
|
|
set -euo pipefail
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
|
|
NODE1_IP="192.168.2.100" # kube-node-1 (control-plane + worker, Dell)
|
|
NODE2_IP="192.168.2.195" # kube-node-2 (worker)
|
|
NODE3_IP="192.168.2.196" # kube-node-3 (worker)
|
|
|
|
echo "=== Building games-console-backend:latest ==="
|
|
docker build -t games-console-backend:latest -f "$SCRIPT_DIR/backend/Dockerfile" "$SCRIPT_DIR/backend"
|
|
|
|
echo "=== Building games-console-ui:latest ==="
|
|
docker build -t games-console-ui:latest -f "$SCRIPT_DIR/ui/Dockerfile" "$SCRIPT_DIR/ui"
|
|
|
|
load_image() {
|
|
local img="$1"
|
|
local node="$2"
|
|
local user="$3"
|
|
echo " → $img → $user@$node"
|
|
docker save "$img" | ssh "$user@$node" "sudo ctr --namespace k8s.io images import -"
|
|
}
|
|
|
|
echo "=== Loading images onto kube-node-1 ($NODE1_IP) ==="
|
|
load_image games-console-backend:latest "$NODE1_IP" dan
|
|
load_image games-console-ui:latest "$NODE1_IP" dan
|
|
|
|
echo "=== Loading images onto kube-node-2 ($NODE2_IP) ==="
|
|
load_image games-console-backend:latest "$NODE2_IP" dan
|
|
load_image games-console-ui:latest "$NODE2_IP" dan
|
|
|
|
echo "=== Loading images onto kube-node-3 ($NODE3_IP) ==="
|
|
load_image games-console-backend:latest "$NODE3_IP" dan
|
|
load_image games-console-ui:latest "$NODE3_IP" dan
|
|
|
|
echo "=== Done! ==="
|
|
echo "Deploy with: kubectl apply -f deployment/games-console/"
|