Add HashiCorp stack documentation
This commit is contained in:
@@ -0,0 +1,106 @@
|
|||||||
|
# HashiCorp Stack - hf-pdocker-01
|
||||||
|
|
||||||
|
## Overview
|
||||||
|
|
||||||
|
Production HashiCorp stack deployed on `hf-pdocker-01` (192.168.86.192) providing orchestration, service discovery, and secrets management.
|
||||||
|
|
||||||
|
## Components
|
||||||
|
|
||||||
|
| Service | Version | Port | UI URL |
|
||||||
|
|---------|---------|------|--------|
|
||||||
|
| Consul | 1.17.1 | 8500 | http://192.168.86.192:8500 |
|
||||||
|
| Nomad | 1.7.3 | 4646 | http://192.168.86.192:4646 |
|
||||||
|
| Vault | 1.15.4 | 8200 | http://192.168.86.192:8200 |
|
||||||
|
|
||||||
|
## Architecture
|
||||||
|
|
||||||
|
```
|
||||||
|
┌─────────────────────────────────────────────────────────┐
|
||||||
|
│ hf-pdocker-01 (192.168.86.192) │
|
||||||
|
├─────────────────────────────────────────────────────────┤
|
||||||
|
│ Consul Server → Service Discovery, KV Store │
|
||||||
|
│ Nomad Server → Workload Orchestration │
|
||||||
|
│ Nomad Client → Runs containers │
|
||||||
|
│ Vault Server → Secrets Management (Consul backend) │
|
||||||
|
└─────────────────────────────────────────────────────────┘
|
||||||
|
```
|
||||||
|
|
||||||
|
## Nomad Host Volumes
|
||||||
|
|
||||||
|
| Volume Name | Path | Purpose |
|
||||||
|
|-------------|------|---------|
|
||||||
|
| media | /data/media | Shared media files (movies, tv, downloads) |
|
||||||
|
| jellyfin-config | /data/configs/jellyfin | Jellyfin configuration |
|
||||||
|
| sonarr-config | /data/configs/sonarr | Sonarr configuration |
|
||||||
|
| radarr-config | /data/configs/radarr | Radarr configuration |
|
||||||
|
| sabnzbd-config | /data/configs/sabnzbd | SABnzbd configuration |
|
||||||
|
| nzbhydra-config | /data/configs/nzbhydra | NZBHydra2 configuration |
|
||||||
|
| jellyseerr-config | /data/configs/jellyseerr | Jellyseerr configuration |
|
||||||
|
|
||||||
|
## Vault Secrets Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
secret/
|
||||||
|
└── media/
|
||||||
|
├── jellyfin
|
||||||
|
├── sonarr
|
||||||
|
├── radarr
|
||||||
|
├── sabnzbd
|
||||||
|
├── nzbhydra
|
||||||
|
└── jellyseerr
|
||||||
|
```
|
||||||
|
|
||||||
|
## Deployed Jobs
|
||||||
|
|
||||||
|
### media-stack
|
||||||
|
Combined job running all media services:
|
||||||
|
- Jellyfin (8096) - Media streaming
|
||||||
|
- Sonarr (8989) - TV show management
|
||||||
|
- Radarr (7878) - Movie management
|
||||||
|
- SABnzbd (8082) - Usenet downloader
|
||||||
|
- NZBHydra2 (5076) - Indexer aggregator
|
||||||
|
- Jellyseerr (5055) - Media requests
|
||||||
|
|
||||||
|
## Commands
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# Cluster status
|
||||||
|
consul members
|
||||||
|
nomad server members
|
||||||
|
nomad node status
|
||||||
|
vault status
|
||||||
|
|
||||||
|
# Job management
|
||||||
|
nomad job run <job.hcl>
|
||||||
|
nomad job status <job>
|
||||||
|
nomad job stop <job>
|
||||||
|
|
||||||
|
# View logs
|
||||||
|
nomad alloc logs <alloc-id>
|
||||||
|
|
||||||
|
# Vault secrets
|
||||||
|
export VAULT_ADDR='http://127.0.0.1:8200'
|
||||||
|
vault kv list secret/media/
|
||||||
|
vault kv get secret/media/<service>
|
||||||
|
```
|
||||||
|
|
||||||
|
## Configuration Files
|
||||||
|
|
||||||
|
| Service | Config Path |
|
||||||
|
|---------|-------------|
|
||||||
|
| Consul | /etc/consul.d/consul.hcl |
|
||||||
|
| Nomad | /etc/nomad.d/nomad.hcl, client.hcl |
|
||||||
|
| Vault | /etc/vault.d/vault.hcl |
|
||||||
|
|
||||||
|
## Systemd Services
|
||||||
|
|
||||||
|
```bash
|
||||||
|
systemctl status consul nomad vault
|
||||||
|
systemctl restart consul nomad vault
|
||||||
|
journalctl -u nomad -f
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
*Deployed: 2026-02-04*
|
||||||
|
*Maintained by: Pluto 🪐*
|
||||||
Reference in New Issue
Block a user