Compare commits
3 Commits
bbd072abf2
...
376b3cd7e4
| Author | SHA1 | Date | |
|---|---|---|---|
| 376b3cd7e4 | |||
| 5d0880a789 | |||
| 09603daf80 |
12
CLAUDE.md
12
CLAUDE.md
@@ -59,13 +59,19 @@ NixOS cluster configuration using flakes. Homelab infrastructure with Nomad/Cons
|
||||
|
||||
## Migration Status
|
||||
|
||||
**Phase**: 2 complete, ready for Phase 3
|
||||
**Current**: Migrating GlusterFS → NFS
|
||||
**Next**: Copy data, update Nomad jobs, remove GlusterFS
|
||||
**Phase**: 4 in progress (20/35 services migrated)
|
||||
**Current**: Migrating services from GlusterFS → NFS
|
||||
**Next**: Finish migrating remaining services, update host volumes, remove GlusterFS
|
||||
**Later**: Convert fractal to NixOS (deferred)
|
||||
|
||||
See `docs/MIGRATION_TODO.md` for detailed checklist.
|
||||
|
||||
**IMPORTANT**: When working on migration tasks:
|
||||
1. Always update `docs/MIGRATION_TODO.md` after completing each service migration
|
||||
2. Update both the individual service checklist AND the summary counts at the bottom
|
||||
3. Pattern: `/data/compute/appdata/foo` → `/data/services/foo` (NOT `/data/services/appdata/foo`!)
|
||||
4. Migration workflow per service: stop → copy data → edit config → start → update MIGRATION_TODO.md
|
||||
|
||||
## Common Tasks
|
||||
|
||||
**Deploy a host**: `deploy -s '.#hostname'`
|
||||
|
||||
@@ -53,61 +53,57 @@ See [CLUSTER_REVAMP.md](./CLUSTER_REVAMP.md) for detailed procedures.
|
||||
|
||||
### Core Infrastructure (CRITICAL)
|
||||
- [x] mysql.hcl - moved to zippy, using `/data/services`
|
||||
- [ ] postgres.hcl - update paths, add affinity for zippy
|
||||
- [ ] redis.hcl - update paths, add affinity for zippy
|
||||
- [ ] traefik.hcl - update paths (already floating)
|
||||
- [ ] authentik.hcl - verify (stateless, no changes needed)
|
||||
- [x] postgres.hcl - migrated to `/data/services`
|
||||
- [x] redis.hcl - migrated to `/data/services`
|
||||
- [x] traefik.hcl - migrated to `/data/services`
|
||||
- [x] authentik.hcl - stateless, no changes needed
|
||||
|
||||
### Monitoring Stack (HIGH)
|
||||
- [ ] prometheus.hcl - update paths
|
||||
- [ ] grafana.hcl - update paths
|
||||
- [ ] loki.hcl - update paths
|
||||
- [ ] vector.hcl - remove glusterfs log collection
|
||||
- [x] prometheus.hcl - migrated to `/data/services`
|
||||
- [x] grafana.hcl - migrated to `/data/services` (2025-10-23)
|
||||
- [x] loki.hcl - migrated to `/data/services`
|
||||
- [ ] vector.hcl - needs update to remove glusterfs log collection (line 26, 101-109)
|
||||
|
||||
### Databases (HIGH)
|
||||
- [ ] clickhouse.hcl - update paths, add affinity for zippy
|
||||
- [ ] unifi.hcl - update paths (includes mongodb)
|
||||
- [x] clickhouse.hcl - migrated to `/data/services`
|
||||
- [x] unifi.hcl - migrated to `/data/services` (includes mongodb)
|
||||
|
||||
### Web Applications (HIGH-MEDIUM)
|
||||
- [ ] wordpress.hcl - update from `/data/sync/wordpress` to `/data/services/wordpress`
|
||||
- [ ] gitea.hcl - update paths
|
||||
- [ ] wiki.hcl - update paths, verify with exec driver
|
||||
- [ ] plausible.hcl - verify (stateless)
|
||||
- [x] wordpress.hcl - migrated to `/data/services`
|
||||
- [x] gitea.hcl - migrated to `/data/services` (2025-10-23)
|
||||
- [ ] wiki.hcl - uses `appdata` volume (points to `/data/compute/appdata`)
|
||||
- [x] plausible.hcl - stateless, no changes needed
|
||||
- [ ] tiddlywiki.hcl - uses `appdata` volume (points to `/data/compute/appdata`)
|
||||
|
||||
### Web Applications (LOW, may be deprecated)
|
||||
- [ ] ghost.hcl - update paths or remove (no longer used?)
|
||||
- [ ] vikunja.hcl - update paths or remove (no longer used?)
|
||||
- [ ] leantime.hcl - update paths or remove (no longer used?)
|
||||
|
||||
### Network Infrastructure (HIGH)
|
||||
- [ ] unifi.hcl - update paths (already listed above)
|
||||
- [x] vikunja.hcl - migrated to `/data/services` (2025-10-23, not running)
|
||||
|
||||
### Media Stack (MEDIUM)
|
||||
- [ ] media.hcl - update paths, add constraint for fractal
|
||||
- [ ] radarr, sonarr, bazarr, plex, qbittorrent
|
||||
- [x] media.hcl - migrated to `/data/services`
|
||||
|
||||
### Utility Services (MEDIUM-LOW)
|
||||
- [ ] evcc.hcl - update paths
|
||||
- [ ] weewx.hcl - update paths
|
||||
- [ ] code-server.hcl - update paths
|
||||
- [ ] beancount.hcl - update paths
|
||||
- [ ] adminer.hcl - verify (stateless)
|
||||
- [ ] maps.hcl - update paths
|
||||
- [ ] netbox.hcl - update paths
|
||||
- [ ] farmos.hcl - update paths
|
||||
- [ ] urbit.hcl - update paths
|
||||
- [ ] webodm.hcl - update paths
|
||||
- [ ] velutrack.hcl - verify paths
|
||||
- [ ] resol-gateway.hcl - verify paths
|
||||
- [ ] igsync.hcl - update paths
|
||||
- [ ] jupyter.hcl - verify paths
|
||||
- [ ] whoami.hcl - verify (stateless test service)
|
||||
- [ ] tiddlywiki.hcl - update paths (if separate from wiki.hcl)
|
||||
- [x] evcc.hcl - migrated to `/data/services`
|
||||
- [x] weewx.hcl - migrated to `/data/services` (2025-10-23)
|
||||
- [x] code-server.hcl - migrated to `/data/services`
|
||||
- [x] beancount.hcl - migrated to `/data/services`
|
||||
- [x] adminer.hcl - stateless, no changes needed
|
||||
- [x] maps.hcl - migrated to `/data/services`
|
||||
- [x] netbox.hcl - migrated to `/data/services`
|
||||
- [x] farmos.hcl - migrated to `/data/services` (2025-10-23)
|
||||
- [x] urbit.hcl - migrated to `/data/services`
|
||||
- [x] webodm.hcl - migrated to `/data/services` (2025-10-23, not running)
|
||||
- [x] velutrack.hcl - migrated to `/data/services`
|
||||
- [ ] resol-gateway.hcl - uses `code` volume (points to `/data/compute/code`)
|
||||
- [ ] igsync.hcl - uses `appdata` volume (points to `/data/compute/appdata`)
|
||||
- [x] jupyter.hcl - migrated to `/data/services` (2025-10-23, not running)
|
||||
- [x] whoami.hcl - stateless test service, no changes needed
|
||||
|
||||
### Backup Jobs (HIGH)
|
||||
- [x] mysql-backup - moved to zippy, verified
|
||||
- [ ] postgres-backup.hcl - verify destination
|
||||
- [ ] wordpress-backup.hcl - verify destination
|
||||
- [x] postgres-backup.hcl - migrated to `/data/services`
|
||||
|
||||
### Host Volume Definitions (CRITICAL)
|
||||
- [ ] common/nomad.nix - update host_volume paths from `/data/compute/{appdata,code}` to `/data/services/{appdata,code}`
|
||||
|
||||
### Verification
|
||||
- [ ] All services healthy in Nomad
|
||||
@@ -148,6 +144,22 @@ See [CLUSTER_REVAMP.md](./CLUSTER_REVAMP.md) for detailed procedures.
|
||||
|
||||
---
|
||||
|
||||
**Last updated**: 2025-10-22
|
||||
**Current phase**: Phase 2 complete (zippy storage setup done), ready for Phase 3 (GlusterFS → NFS migration)
|
||||
**Last updated**: 2025-10-23 21:16
|
||||
**Current phase**: Phase 4 in progress (26/35 services migrated, 4 host-volume services + config updates remaining, 4 stateless)
|
||||
**Note**: Phase 1 (fractal NixOS conversion) deferred until after GlusterFS migration is complete
|
||||
|
||||
## Migration Summary
|
||||
|
||||
**Already migrated to `/data/services` (26 services):**
|
||||
mysql, mysql-backup, postgres, postgres-backup, redis, clickhouse, prometheus, grafana, loki, unifi, wordpress, gitea, traefik, evcc, weewx, netbox, farmos, webodm, jupyter, vikunja, urbit, code-server, beancount, velutrack, maps, media
|
||||
|
||||
**Still need migration (4 services using host volumes):**
|
||||
- wiki (appdata), tiddlywiki (appdata), igsync (appdata), resol-gateway (code)
|
||||
- These require updating common/nomad.nix host_volume definitions first
|
||||
|
||||
**Stateless/no changes needed (4 services):**
|
||||
authentik, adminer, plausible, whoami
|
||||
|
||||
**Configuration updates needed:**
|
||||
- vector.hcl: remove glusterfs log collection
|
||||
- common/nomad.nix: update host_volume paths
|
||||
|
||||
@@ -19,8 +19,8 @@ job "farmos" {
|
||||
image = "gitea.v.paler.net/ppetru/farmos:latest"
|
||||
ports = ["http"]
|
||||
volumes = [
|
||||
"/data/compute/appdata/farmos/sites:/opt/drupal/web/sites",
|
||||
"/data/compute/appdata/farmos/keys:/opt/drupal/keys",
|
||||
"/data/services/farmos/sites:/opt/drupal/web/sites",
|
||||
"/data/services/farmos/keys:/opt/drupal/keys",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -25,8 +25,8 @@ job "gitea" {
|
||||
"ssh",
|
||||
]
|
||||
volumes = [
|
||||
"/data/compute/appdata/gitea/data:/var/lib/gitea",
|
||||
"/data/compute/appdata/gitea/config:/etc/gitea",
|
||||
"/data/services/gitea/data:/var/lib/gitea",
|
||||
"/data/services/gitea/config:/etc/gitea",
|
||||
"/etc/timezone:/etc/timezone:ro",
|
||||
"/etc/localtime:/etc/localtime:ro",
|
||||
]
|
||||
|
||||
@@ -14,7 +14,7 @@ job "grafana" {
|
||||
config {
|
||||
image = "grafana/grafana-enterprise:latest"
|
||||
ports = [ "http" ]
|
||||
volumes = [ "/data/compute/appdata/grafana:/var/lib/grafana" ]
|
||||
volumes = [ "/data/services/grafana:/var/lib/grafana" ]
|
||||
}
|
||||
|
||||
env {
|
||||
|
||||
@@ -20,7 +20,7 @@ job "jupyter" {
|
||||
ports = ["http"]
|
||||
|
||||
volumes = [
|
||||
"/data/compute/appdata/jupyter:/home/jovyan/work",
|
||||
"/data/services/jupyter:/home/jovyan/work",
|
||||
]
|
||||
|
||||
command = "start-notebook.py"
|
||||
|
||||
@@ -1,72 +0,0 @@
|
||||
job "tiddlywiki" {
|
||||
datacenters = ["alo"]
|
||||
|
||||
group "server" {
|
||||
volume "appdata" {
|
||||
type = "host"
|
||||
read_only = false
|
||||
source = "appdata"
|
||||
}
|
||||
volume "nix-store" {
|
||||
type = "host"
|
||||
read_only = true
|
||||
source = "nix-store"
|
||||
}
|
||||
volume "sw" {
|
||||
type = "host"
|
||||
read_only = true
|
||||
source = "sw"
|
||||
}
|
||||
|
||||
network {
|
||||
port "http" { }
|
||||
}
|
||||
|
||||
task "mws" {
|
||||
driver = "exec"
|
||||
|
||||
config {
|
||||
command = "/sw/bin/node"
|
||||
args = [
|
||||
"/appdata/tiddlywiki-mws/tiddlywiki.js",
|
||||
"/appdata/tiddlywiki-mws/editions/multiwikiserver",
|
||||
"--mws-load-plugin-bags",
|
||||
"--build",
|
||||
"load-mws-demo-data",
|
||||
"--mws-listen",
|
||||
"host=0.0.0.0",
|
||||
"port=${NOMAD_PORT_http}",
|
||||
]
|
||||
}
|
||||
|
||||
volume_mount {
|
||||
volume = "appdata"
|
||||
destination = "/appdata"
|
||||
}
|
||||
volume_mount {
|
||||
volume = "nix-store"
|
||||
destination = "/nix/store"
|
||||
}
|
||||
volume_mount {
|
||||
volume = "sw"
|
||||
destination = "/sw"
|
||||
}
|
||||
|
||||
service {
|
||||
name = "tiddlywiki"
|
||||
port = "http"
|
||||
tags = [
|
||||
"traefik.enable=true",
|
||||
"traefik.http.routers.tiddlywiki.rule=Host(`wiki.alo.land`)",
|
||||
"traefik.http.routers.tiddlywiki.entryPoints=websecure",
|
||||
"traefik.http.routers.tiddlywiki.middlewares=authentik@file",
|
||||
]
|
||||
}
|
||||
|
||||
resources {
|
||||
cpu = 1000
|
||||
memory = 512
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,9 +19,9 @@ job "vikunja" {
|
||||
image = "vikunja/vikunja:latest"
|
||||
ports = ["http"]
|
||||
volumes = [
|
||||
"/data/compute/appdata/vikunja/config.yml:/app/vikunja/config.yml:ro",
|
||||
"/data/compute/appdata/vikunja/db:/db",
|
||||
"/data/compute/appdata/vikunja/files:/app/vikunja/files",
|
||||
"/data/services/vikunja/config.yml:/app/vikunja/config.yml:ro",
|
||||
"/data/services/vikunja/db:/db",
|
||||
"/data/services/vikunja/files:/app/vikunja/files",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ job "vikunja" {
|
||||
image = "typesense/typesense:27.1"
|
||||
ports = ["http"]
|
||||
volumes = [
|
||||
"/data/compute/appdata/vikunja/typesense:/data",
|
||||
"/data/services/vikunja/typesense:/data",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,7 @@ job "odm" {
|
||||
ports = ["ui"]
|
||||
command = "/webodm/start.sh"
|
||||
volumes = [
|
||||
"/data/compute/appdata/webodm:/webodm/app/media",
|
||||
"/data/services/webodm:/webodm/app/media",
|
||||
"local/local_settings.py:/webodm/webodm/local_settings.py:ro",
|
||||
]
|
||||
}
|
||||
@@ -136,7 +136,7 @@ EOH
|
||||
command = "/webodm/worker.sh"
|
||||
args = ["start"]
|
||||
volumes = [
|
||||
"/data/compute/appdata/webodm:/webodm/app/media",
|
||||
"/data/services/webodm:/webodm/app/media",
|
||||
"local/local_settings.py:/webodm/webodm/local_settings.py:ro",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -23,8 +23,8 @@ job "weewx" {
|
||||
# to be able to receive UDP broadcast packets from the weatherlink
|
||||
network_mode = "host"
|
||||
volumes = [
|
||||
"/data/compute/appdata/weewx/etc:/etc/weewx",
|
||||
"/data/compute/appdata/weewx/html:/var/www/html",
|
||||
"/data/services/weewx/etc:/etc/weewx",
|
||||
"/data/services/weewx/html:/var/www/html",
|
||||
]
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ job "weewx" {
|
||||
"-enable-health",
|
||||
]
|
||||
|
||||
volumes = [ "/data/compute/appdata/weewx/html:/srv/http" ]
|
||||
volumes = [ "/data/services/weewx/html:/srv/http" ]
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user