de1d9e1d9328f11c9d3d88d455b8d06a43099806
Replaces initial Nomad/Consul/Terraform skeleton with current Docker-based infrastructure across all three nodes (hf-pdocker-01, hf-pdocker-02, bart). Key changes: - CLAUDE.md: updated service distribution reflecting hf-pdocker-01 restored - docs/plans/2026-03-08-hf-pdocker-01-rebuild.md: new rebuild plan doc - compose/bart/: ai-agents, guacamole, matrix, media, openvas, smarthome, watchtower - compose/hf-pdocker-02/: traefik, monitoring, adguard, gitea, semaphore, wikijs, unifi, vaultwarden, actual-budget, mcpo, netclaw, trivy, watchtower, n8n - compose/hf-pdocker-01/: frigate, frigate-notify, farm-agent - stacks/: all Swarm stack definitions (monitoring, traefik, smarthome, matrix, guacamole, media, ai-agents, frigate, gitea, semaphore, wikijs, unifi, etc.) - .gitignore: exclude .env credential files and acme.json certs - .env.example: placeholder credential files for all services - .claude/agents/: gitea-backup and other infrastructure agent configs - scripts/: frigate media cleanup and NAS sync scripts Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Hobbs.farm Infrastructure as Code
Enterprise-grade infrastructure management using HashiCorp stack + Ansible.
Architecture
┌─────────────────────────────────────────────────────────────────┐
│ HOBBS.FARM IaC │
├─────────────────────────────────────────────────────────────────┤
│ │
│ ┌───────────┐ ┌───────────┐ ┌───────────┐ │
│ │ TERRAFORM │────▶│ ANSIBLE │────▶│ NOMAD │ │
│ │ │ │ │ │ │ │
│ │ • Infra │ │ • Config │ │ • Deploy │ │
│ │ • State │ │ • Install │ │ • Scale │ │
│ │ • DNS │ │ • Secure │ │ • Monitor │ │
│ └───────────┘ └───────────┘ └───────────┘ │
│ │ │ │ │
│ └────────────────┴────────────────┘ │
│ │ │
│ ┌───────────────────────┴───────────────────────┐ │
│ │ HASHICORP STACK │ │
│ │ ┌─────────┐ ┌─────────┐ ┌─────────┐ │ │
│ │ │ NOMAD │ │ CONSUL │ │ VAULT │ │ │
│ │ │ orchest │◄─┤ service │◄─┤ secrets │ │ │
│ │ │ ration │ │ mesh │ │ mgmt │ │ │
│ │ └─────────┘ └─────────┘ └─────────┘ │ │
│ └───────────────────────────────────────────────┘ │
│ │
│ ┌─────────────────────────────────────────────────┐ │
│ │ HOSTS │ │
│ │ hf-pdocker-01 (primary) hf-pdocker-02 (secondary) │
│ │ 192.168.86.192 192.168.86.45 │
│ └─────────────────────────────────────────────────┘ │
└─────────────────────────────────────────────────────────────────┘
Directory Structure
hobbs-iac/
├── terraform/ # Infrastructure provisioning
│ ├── environments/ # Per-environment configs
│ │ └── prod/
│ ├── modules/ # Reusable modules
│ └── nomad-jobs/ # Nomad job definitions (HCL)
├── ansible/ # Configuration management
│ ├── inventory/ # Host inventory
│ ├── playbooks/ # Automation playbooks
│ ├── roles/ # Ansible roles
│ └── group_vars/ # Variables
├── nomad/ # Nomad-specific configs
│ ├── jobs/ # Job specifications
│ ├── policies/ # ACL policies
│ └── templates/ # Job templates
├── consul/ # Consul configs
│ ├── config/ # Consul configuration
│ └── policies/ # ACL policies
├── vault/ # Vault configs
│ ├── policies/ # Access policies
│ └── secrets/ # Secret definitions (encrypted)
└── scripts/ # Utility scripts
Quick Start
1. Bootstrap Hosts (Ansible)
cd ansible
ansible-playbook -i inventory/hosts.yml playbooks/bootstrap.yml
2. Install HashiCorp Stack
ansible-playbook -i inventory/hosts.yml playbooks/hashicorp-stack.yml
3. Initialize Terraform
cd terraform/environments/prod
terraform init
terraform plan
terraform apply
4. Deploy Services
# Deploy all Nomad jobs
nomad job run ../nomad-jobs/traefik.nomad
nomad job run ../nomad-jobs/monitoring.nomad
# ... etc
Naming Convention
See Naming Convention Standard
| Type | Format | Example |
|---|---|---|
| Physical | hf-p<function>-## |
hf-pdocker-01 |
| Virtual | hf-v<function>-## |
hf-vapp-01 |
| Container | hf-c<function>-## |
hf-cproxy-01 |
| Network | hf-n<function>-## |
hf-nfw-01 |
| Storage | hf-s<function>-## |
hf-snas-01 |
Prerequisites
- Ansible 2.15+
- Terraform 1.5+
- Nomad 1.6+
- Consul 1.16+
- Vault 1.15+
License
Private - Hobbs.farm internal use only
Description
Languages
HTML
50.4%
Python
34.8%
Svelte
7.8%
Shell
3.4%
Dockerfile
1.6%
Other
2%