Migrate another batch of services to NFS.

This commit is contained in:
2025-10-23 21:20:11 +01:00
parent 09603daf80
commit 5d0880a789
9 changed files with 38 additions and 32 deletions

View File

@@ -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'`

View File

@@ -60,7 +60,7 @@ See [CLUSTER_REVAMP.md](./CLUSTER_REVAMP.md) for detailed procedures.
### Monitoring Stack (HIGH)
- [x] prometheus.hcl - migrated to `/data/services`
- [ ] grafana.hcl - still using `/data/compute`
- [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)
@@ -70,32 +70,32 @@ See [CLUSTER_REVAMP.md](./CLUSTER_REVAMP.md) for detailed procedures.
### Web Applications (HIGH-MEDIUM)
- [x] wordpress.hcl - migrated to `/data/services`
- [ ] gitea.hcl - still using `/data/compute`
- [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)
- [ ] vikunja.hcl - still using `/data/compute` (check if still needed)
- [x] vikunja.hcl - migrated to `/data/services` (2025-10-23, not running)
### Media Stack (MEDIUM)
- [x] media.hcl - migrated to `/data/services`
### Utility Services (MEDIUM-LOW)
- [x] evcc.hcl - migrated to `/data/services`
- [ ] weewx.hcl - still using `/data/compute`
- [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`
- [ ] farmos.hcl - still using `/data/compute`
- [x] farmos.hcl - migrated to `/data/services` (2025-10-23)
- [x] urbit.hcl - migrated to `/data/services`
- [ ] webodm.hcl - still using `/data/compute`
- [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`)
- [ ] jupyter.hcl - still using `/data/compute`
- [x] jupyter.hcl - migrated to `/data/services` (2025-10-23, not running)
- [x] whoami.hcl - stateless test service, no changes needed
### Backup Jobs (HIGH)
@@ -144,18 +144,18 @@ See [CLUSTER_REVAMP.md](./CLUSTER_REVAMP.md) for detailed procedures.
---
**Last updated**: 2025-10-23
**Current phase**: Phase 4 in progress (19/35 services migrated, 11 still need migration, 4 stateless)
**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` (19 services):**
mysql, mysql-backup, postgres, postgres-backup, redis, clickhouse, prometheus, loki, unifi, wordpress, traefik, evcc, netbox, urbit, code-server, beancount, velutrack, maps, media
**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 (11 services):**
- Direct `/data/compute` references: grafana, gitea, vikunja, weewx, farmos, webodm, jupyter
- Host volume references: wiki (appdata), tiddlywiki (appdata), igsync (appdata), resol-gateway (code)
**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

View File

@@ -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",
]
}

View File

@@ -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",
]

View File

@@ -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 {

View File

@@ -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"

View File

@@ -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",
]
}

View File

@@ -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",
]
}

View File

@@ -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" ]
}
}