Skip to content

Commit 317ef7b

Browse files
web-flowclaude
andcommitted
feat(crucible): setup proper-raptor as Crucible storage node
- Add proper-raptor network config (USB 2.5GbE with bridge) - Add node_exporter for Prometheus monitoring - Add gshiva user setup script - Add Crucible downstairs start script - Create comprehensive IP assignments doc - Add proper-raptor to Prometheus scrape config - Update inventory.txt with Crucible section Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 44fbe13 commit 317ef7b

7 files changed

Lines changed: 395 additions & 2 deletions

File tree

docs/reference/ip-assignments.md

Lines changed: 115 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,115 @@
1+
# IP Assignments - 192.168.4.0/24
2+
3+
**Source of Truth** for all static IP assignments in the homelab.
4+
5+
> **Related Files:**
6+
> - [`proxmox/inventory.txt`](../../proxmox/inventory.txt) - Ansible-style inventory (legacy, sync with this file)
7+
> - [`gitops/.../IP-ASSIGNMENTS.md`](../../gitops/clusters/homelab/infrastructure-config/metallb-config/IP-ASSIGNMENTS.md) - MetalLB assignments only
8+
9+
## MAAS IP Ranges
10+
11+
| Range | Type | Purpose |
12+
|-------|------|---------|
13+
| 192.168.4.1 | Gateway | OPNsense router |
14+
| 192.168.4.2-19 | Unmanaged | Proxmox hosts (bare metal) |
15+
| 192.168.4.20-49 | Reserved Dynamic | MAAS internal (commissioning/deployment) |
16+
| 192.168.4.50-78 | DHCP Pool | Auto-assigned to new machines |
17+
| 192.168.4.79 | Reserved | K3s control plane VIP (kube-vip) |
18+
| 192.168.4.80-120 | Reserved | MetalLB LoadBalancer pool |
19+
| 192.168.4.121-179 | DHCP Pool | Auto-assigned (extended range) |
20+
| 192.168.4.180-199 | Reserved | Storage/Crucible nodes |
21+
| 192.168.4.200-250 | Reserved Static | Infrastructure VMs (manual assignment) |
22+
23+
---
24+
25+
## Proxmox Hosts (Bare Metal)
26+
27+
| IP | Hostname | Notes |
28+
|----|----------|-------|
29+
| 192.168.4.11 | rapid-civet | |
30+
| 192.168.4.17 | still-fawn | AMD Radeon GPU |
31+
| 192.168.4.19 | chief-horse | HAOS host |
32+
| 192.168.4.122 | pve | Primary Proxmox host |
33+
| 192.168.4.172 | fun-bedbug | Disabled - thermal issues |
34+
| 192.168.4.175 | pumped-piglet | RTX 3070 GPU |
35+
36+
---
37+
38+
## Infrastructure Services
39+
40+
| IP | Service | Notes |
41+
|----|---------|-------|
42+
| 192.168.4.53 | ubuntu-maas-vm | MAAS controller |
43+
| 192.168.4.79 | k3s-vip | K3s control plane VIP (kube-vip) |
44+
45+
---
46+
47+
## K3s VMs (Control Plane Nodes)
48+
49+
| IP | VM Name | VMID | Proxmox Host | Status |
50+
|----|---------|------|--------------|--------|
51+
| 192.168.4.210 | k3s-vm-pumped-piglet-gpu | 105 | pumped-piglet | Active (primary) |
52+
| 192.168.4.212 | k3s-vm-still-fawn | 108 | still-fawn | Active |
53+
| 192.168.4.192 | k3s-vm-fun-bedbug | 114 | fun-bedbug | Disabled (thermal) |
54+
| 192.168.4.193 | k3s-vm-pve | 107 | pve | Standby (powered off) |
55+
56+
---
57+
58+
## MetalLB LoadBalancer IPs (80-120)
59+
60+
| IP | Service | Namespace | Notes |
61+
|----|---------|-----------|-------|
62+
| 192.168.4.80 | traefik | kube-system | Main ingress, all HTTP(S) |
63+
| 192.168.4.81 | frigate | frigate | NVR web UI, RTSP, WebRTC TCP |
64+
| 192.168.4.82 | stable-diffusion-webui | stable-diffusion | SD WebUI |
65+
| 192.168.4.84 | frigate-webrtc-udp | frigate | WebRTC UDP streams |
66+
| 192.168.4.85 | ollama-lb | ollama | Ollama API |
67+
| 192.168.4.120 | samba-lb | samba | SMB/CIFS shares |
68+
69+
---
70+
71+
## Storage/Crucible Nodes (180-199)
72+
73+
| IP | Hostname | Interface | Notes |
74+
|----|----------|-----------|-------|
75+
| 192.168.4.189 | proper-raptor | enp1s0 (1GbE) | Management interface |
76+
| 192.168.4.190 | proper-raptor | enx* (USB 2.5GbE) | Crucible storage traffic (planned) |
77+
78+
---
79+
80+
## RKE2 Evaluation VMs (200-202)
81+
82+
| IP | VM Name | VMID | Proxmox Host | Status |
83+
|----|---------|------|--------------|--------|
84+
| 192.168.4.200 | rancher-server | 200 | pumped-piglet | Evaluation |
85+
| 192.168.4.202 | linux-control | 202 | pumped-piglet | Evaluation |
86+
| (none) | windows-worker | 201 | pumped-piglet | Stopped |
87+
88+
---
89+
90+
## Other Infrastructure VMs (203+)
91+
92+
| IP | VM Name | Notes |
93+
|----|---------|-------|
94+
| 192.168.4.203 | k3s-vm-fun-bedbug | Legacy entry (now .192) |
95+
| 192.168.4.211 | (homelab.yaml ref) | Unknown - needs investigation |
96+
| 192.168.4.238 | k3s-vm-pve | Legacy entry (now .193) |
97+
98+
---
99+
100+
## Reserved for Future Use
101+
102+
| Range | Purpose |
103+
|-------|---------|
104+
| 192.168.4.191-199 | Crucible storage expansion |
105+
| 192.168.4.204-209 | Available |
106+
| 192.168.4.213-237 | Available |
107+
| 192.168.4.239-250 | Available |
108+
109+
---
110+
111+
## Update Log
112+
113+
| Date | Change |
114+
|------|--------|
115+
| 2026-01-25 | Created from scattered sources |

gitops/clusters/homelab/infrastructure/monitoring/monitoring-values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ prometheus:
2121
- 192.168.4.19:9100 # chief-horse
2222
- 192.168.4.172:9100 # fun-bedbug
2323
- 192.168.4.175:9100 # pumped-piglet
24+
- job_name: "crucible-node-exporter"
25+
static_configs:
26+
- targets:
27+
- 192.168.4.189:9100 # proper-raptor (Crucible storage)
2428
- job_name: "proxmox-pve-exporter"
2529
metrics_path: /pve
2630
static_configs:

proxmox/inventory.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
# inventory.txt
2+
# See also: docs/reference/ip-assignments.md (comprehensive IP table)
3+
24
[proxmox]
35
192.168.4.122 # pve
46
192.168.4.17 # still-fawn
@@ -13,8 +15,12 @@
1315
[k3s-vms]
1416
192.168.4.210 # k3s-vm-pumped-piglet-gpu (VMID 105 on pumped-piglet)
1517
192.168.4.212 # k3s-vm-still-fawn (VMID 108 on still-fawn) - GPU + Coral TPU
16-
192.168.4.203 # k3s-vm-fun-bedbug (VMID 114 on fun-bedbug)
17-
# 192.168.4.238 # k3s-vm-pve (VMID 107 on pve) - STOPPED, removed from cluster 2026-01-17
18+
192.168.4.192 # k3s-vm-fun-bedbug (VMID 114 on fun-bedbug) - DISABLED thermal
19+
192.168.4.193 # k3s-vm-pve (VMID 107 on pve) - STANDBY powered off
20+
21+
[crucible]
22+
192.168.4.189 # proper-raptor (management - enp1s0 1GbE)
23+
192.168.4.190 # proper-raptor (storage - enx* USB 2.5GbE) - PLANNED
1824

1925
[rke2-eval]
2026
# On pumped-piglet (VMID 200, 201, 202)
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/bin/bash
2+
# Install node_exporter on proper-raptor for Prometheus monitoring
3+
#
4+
set -e
5+
6+
HOST="ubuntu@192.168.4.189"
7+
NODE_EXPORTER_VERSION="1.7.0"
8+
9+
echo "=== Installing node_exporter on proper-raptor ==="
10+
11+
# Check SSH access
12+
if ! ssh -o ConnectTimeout=5 -o BatchMode=yes "$HOST" "echo 'SSH OK'" 2>/dev/null; then
13+
echo "ERROR: Cannot SSH to $HOST"
14+
exit 1
15+
fi
16+
17+
echo "=== Step 1: Download and install node_exporter ==="
18+
ssh "$HOST" << EOF
19+
set -e
20+
cd /tmp
21+
curl -LO https://github.com/prometheus/node_exporter/releases/download/v${NODE_EXPORTER_VERSION}/node_exporter-${NODE_EXPORTER_VERSION}.linux-amd64.tar.gz
22+
tar xzf node_exporter-${NODE_EXPORTER_VERSION}.linux-amd64.tar.gz
23+
sudo mv node_exporter-${NODE_EXPORTER_VERSION}.linux-amd64/node_exporter /usr/local/bin/
24+
rm -rf node_exporter-${NODE_EXPORTER_VERSION}.linux-amd64*
25+
node_exporter --version
26+
EOF
27+
28+
echo "=== Step 2: Create systemd service ==="
29+
ssh "$HOST" "sudo tee /etc/systemd/system/node_exporter.service" << 'EOF'
30+
[Unit]
31+
Description=Prometheus Node Exporter
32+
After=network.target
33+
34+
[Service]
35+
Type=simple
36+
User=nobody
37+
ExecStart=/usr/local/bin/node_exporter
38+
Restart=always
39+
RestartSec=5
40+
41+
[Install]
42+
WantedBy=multi-user.target
43+
EOF
44+
45+
echo "=== Step 3: Start and enable service ==="
46+
ssh "$HOST" "sudo systemctl daemon-reload && sudo systemctl enable --now node_exporter"
47+
48+
echo "=== Step 4: Verify ==="
49+
ssh "$HOST" "systemctl status node_exporter --no-pager"
50+
ssh "$HOST" "curl -s http://localhost:9100/metrics | head -20"
51+
52+
echo ""
53+
echo "=== node_exporter installed ==="
54+
echo "Metrics available at: http://192.168.4.189:9100/metrics"
55+
echo ""
56+
echo "Add to Prometheus scrape config:"
57+
echo " - job_name: 'crucible-node'"
58+
echo " static_configs:"
59+
echo " - targets: ['192.168.4.189:9100']"
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
#!/bin/bash
2+
# Setup proper-raptor network: USB 2.5GbE with bridge (like Proxmox hosts)
3+
#
4+
# This converts proper-raptor from netplan to ifupdown with a bridge,
5+
# matching the proven fun-bedbug configuration.
6+
#
7+
# After running: unplug built-in NIC cable, keep only USB 2.5GbE connected
8+
#
9+
set -e
10+
11+
HOST="ubuntu@192.168.4.189"
12+
USB_NIC="enx00e04ca81110" # USB 2.5GbE adapter
13+
BUILTIN_NIC="enp1s0" # Built-in 1GbE
14+
MGMT_IP="192.168.4.189" # Management IP (current)
15+
STORAGE_IP="192.168.4.190" # Crucible storage IP (new, on bridge)
16+
GATEWAY="192.168.4.1"
17+
DNS="192.168.4.53"
18+
19+
echo "=== Setting up proper-raptor network ==="
20+
echo "USB NIC: $USB_NIC"
21+
echo "Management IP: $MGMT_IP (will move to bridge)"
22+
echo "Storage IP: $STORAGE_IP (Crucible traffic)"
23+
echo ""
24+
25+
# Check SSH access
26+
if ! ssh -o ConnectTimeout=5 -o BatchMode=yes "$HOST" "echo 'SSH OK'" 2>/dev/null; then
27+
echo "ERROR: Cannot SSH to $HOST"
28+
exit 1
29+
fi
30+
31+
echo "=== Step 1: Install bridge-utils and ifupdown ==="
32+
ssh "$HOST" "sudo apt-get update && sudo apt-get install -y bridge-utils ifupdown"
33+
34+
echo "=== Step 2: Disable cloud-init network config ==="
35+
ssh "$HOST" "sudo mkdir -p /etc/cloud/cloud.cfg.d && echo 'network: {config: disabled}' | sudo tee /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg"
36+
37+
echo "=== Step 3: Backup current netplan ==="
38+
ssh "$HOST" "sudo cp /etc/netplan/50-cloud-init.yaml /etc/netplan/50-cloud-init.yaml.backup.\$(date +%Y%m%d)"
39+
40+
echo "=== Step 4: Create /etc/network/interfaces ==="
41+
ssh "$HOST" "sudo tee /etc/network/interfaces" << 'EOF'
42+
# Network configuration for proper-raptor
43+
# Matches Proxmox host pattern (fun-bedbug)
44+
# USB 2.5GbE adapter with bridge for reliable boot
45+
46+
auto lo
47+
iface lo inet loopback
48+
49+
# Built-in 1GbE - unused, no cable connected
50+
iface enp1s0 inet manual
51+
52+
# USB 2.5GbE adapter - bridge member
53+
auto enx00e04ca81110
54+
iface enx00e04ca81110 inet manual
55+
56+
# Bridge on USB adapter - gets the IP
57+
auto br0
58+
iface br0 inet static
59+
address 192.168.4.189/24
60+
gateway 192.168.4.1
61+
bridge-ports enx00e04ca81110
62+
bridge-stp off
63+
bridge-fd 0
64+
dns-nameservers 192.168.4.53
65+
dns-search maas
66+
67+
# Secondary IP for Crucible storage traffic (optional)
68+
# Uncomment if you want separate IP for storage
69+
#auto br0:0
70+
#iface br0:0 inet static
71+
# address 192.168.4.190/24
72+
EOF
73+
74+
echo "=== Step 5: Disable netplan and enable ifupdown ==="
75+
ssh "$HOST" "sudo systemctl mask systemd-networkd-wait-online.service"
76+
ssh "$HOST" "sudo rm -f /etc/netplan/50-cloud-init.yaml"
77+
78+
echo "=== Step 6: Fix /etc/hosts ==="
79+
ssh "$HOST" "sudo tee /etc/hosts" << 'EOF'
80+
127.0.0.1 localhost
81+
192.168.4.189 proper-raptor.maas proper-raptor
82+
83+
# IPv6
84+
::1 localhost ip6-localhost ip6-loopback
85+
ff02::1 ip6-allnodes
86+
ff02::2 ip6-allrouters
87+
EOF
88+
89+
echo ""
90+
echo "=== Configuration complete ==="
91+
echo ""
92+
echo "NEXT STEPS:"
93+
echo "1. Unplug the cable from built-in NIC (enp1s0)"
94+
echo "2. Ensure USB 2.5GbE adapter cable is connected to switch"
95+
echo "3. Reboot: ssh $HOST 'sudo reboot'"
96+
echo "4. Wait ~60 seconds, then verify: ssh $HOST 'ip addr show br0'"
97+
echo ""
98+
echo "If boot hangs, connect cable to built-in NIC temporarily to recover."
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/bin/bash
2+
# Setup gshiva user on proper-raptor
3+
#
4+
set -e
5+
6+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
7+
ENV_FILE="$SCRIPT_DIR/../../proxmox/homelab/.env"
8+
9+
# Load password from .env
10+
if [[ -f "$ENV_FILE" ]]; then
11+
CRUCIBLE_USER_PASSWORD=$(grep "^CRUCIBLE_USER_PASSWORD=" "$ENV_FILE" | cut -d'=' -f2- | tr -d '"')
12+
fi
13+
14+
if [[ -z "$CRUCIBLE_USER_PASSWORD" ]]; then
15+
echo "ERROR: CRUCIBLE_USER_PASSWORD not found in $ENV_FILE"
16+
echo "Add: CRUCIBLE_USER_PASSWORD=yourpassword"
17+
exit 1
18+
fi
19+
20+
HOST="ubuntu@192.168.4.189"
21+
NEW_USER="gshiva"
22+
23+
echo "=== Setting up user $NEW_USER on proper-raptor ==="
24+
25+
# Check SSH access
26+
if ! ssh -o ConnectTimeout=5 -o BatchMode=yes "$HOST" "echo 'SSH OK'" 2>/dev/null; then
27+
echo "ERROR: Cannot SSH to $HOST"
28+
exit 1
29+
fi
30+
31+
# Check if user already exists
32+
if ssh "$HOST" "id $NEW_USER" 2>/dev/null; then
33+
echo "User $NEW_USER already exists"
34+
else
35+
echo "Creating user $NEW_USER..."
36+
ssh "$HOST" "sudo useradd -m -s /bin/bash -G sudo $NEW_USER"
37+
fi
38+
39+
# Set password
40+
echo "Setting password for $NEW_USER..."
41+
ssh "$HOST" "echo '$NEW_USER:$CRUCIBLE_USER_PASSWORD' | sudo chpasswd"
42+
43+
# Copy SSH keys from ubuntu user
44+
echo "Copying SSH authorized_keys..."
45+
ssh "$HOST" "sudo mkdir -p /home/$NEW_USER/.ssh && sudo cp /home/ubuntu/.ssh/authorized_keys /home/$NEW_USER/.ssh/ && sudo chown -R $NEW_USER:$NEW_USER /home/$NEW_USER/.ssh && sudo chmod 700 /home/$NEW_USER/.ssh && sudo chmod 600 /home/$NEW_USER/.ssh/authorized_keys"
46+
47+
# Enable password auth for this user (optional, SSH keys preferred)
48+
echo "Ensuring SSH access..."
49+
ssh "$HOST" "sudo usermod -aG sudo $NEW_USER"
50+
51+
echo ""
52+
echo "=== User setup complete ==="
53+
echo "Test: ssh $NEW_USER@192.168.4.189"

0 commit comments

Comments
 (0)