Chapter: 1 Cluster Architecture Overview

Hardware specifications and role assignments. Details the manager node (16-core Beelink with 28GB RAM) and three worker nodes (4-core Pi 5s). Explains service placement strategy and resource allocation across the heterogeneous cluster.

1.2 Docker Swarm Configuration

Cluster Topology Swarm Information: Cluster ID:[SECRET] Total Nodes: 4 (1 manager, 3 workers) Docker Version: 28.4.0 across all nodes Network Driver: Overlay with VXLAN encapsulation Address Pool: 10.0.0.0/8 with /24 subnets Network Configuration: Homelab Network: 10.0.1.0/24 (primary application network) Ingress Network: 10.0.0.0/24 (published ports) Portainer Network: 10.0.2.0/24 (management isolation) Node Constraints and Placement Strategies The cluster employs strategic service placement based on node capabilities: Manager Node (p0) Services: constraints: [node.hostname == p0] Critical Infrastructure: Traefik, PostgreSQL, MariaDB Authentication Services: Authentik server and worker Management Tools: Portainer, Homarr, Adminer High-I/O Services: Nextcloud, Paperless-NGX Rationale: Centralized on the most powerful node with direct storage access.

1.3 Service Distribution Strategy

High Availability Considerations Single Points of Failure: Database services (PostgreSQL, MariaDB) run on manager node only Authentication (Authentik) centralized for security Reverse proxy (Traefik) single instance with restart policies Resilience Measures: Global agent deployment for management access Multiple replica services where applicable Automatic restart policies on all services Centralized storage prevents data loss during node failures Load Balancing Approach Traefik Load Balancing: Round-robin distribution for multi-replica services Health checks ensure traffic only reaches healthy instances SSL termination at proxy level Service Examples:

1.1 Hardware Infrastructure

Node Specifications and Roles Docker Swarm cluster consists of five nodes with distinct hardware profiles and strategic role assignments: Manager Node: p0 (Beelink SER5) CPU: 16 cores (x86_64 architecture) Memory: 28.31 GiB Role: Swarm Leader and Primary Manager Operating System: Ubuntu 24.04.3 LTS (Noble Numbat) Kernel: Linux 6.8.0-84-generic Primary Responsibilities: Swarm management and orchestration Certificate authority for swarm TLS High-resource services (databases, authentication) Storage-intensive applications Manager Node: p4 (Unraid VM) CPU: 12 cores (x86_64 architecture)