Compare commits

..

3 Commits

Author SHA1 Message Date
376b3cd7e4 Remove old config. 2025-10-23 21:22:27 +01:00
5d0880a789 Migrate another batch of services to NFS. 2025-10-23 21:20:11 +01:00
09603daf80 Update docs. 2025-10-23 20:52:31 +01:00
10 changed files with 78 additions and 132 deletions

View File

@@ -59,13 +59,19 @@ NixOS cluster configuration using flakes. Homelab infrastructure with Nomad/Cons
## Migration Status ## Migration Status
**Phase**: 2 complete, ready for Phase 3 **Phase**: 4 in progress (20/35 services migrated)
**Current**: Migrating GlusterFS → NFS **Current**: Migrating services from GlusterFS → NFS
**Next**: Copy data, update Nomad jobs, remove GlusterFS **Next**: Finish migrating remaining services, update host volumes, remove GlusterFS
**Later**: Convert fractal to NixOS (deferred) **Later**: Convert fractal to NixOS (deferred)
See `docs/MIGRATION_TODO.md` for detailed checklist. 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 ## Common Tasks
**Deploy a host**: `deploy -s '.#hostname'` **Deploy a host**: `deploy -s '.#hostname'`

View File

@@ -53,61 +53,57 @@ See [CLUSTER_REVAMP.md](./CLUSTER_REVAMP.md) for detailed procedures.
### Core Infrastructure (CRITICAL) ### Core Infrastructure (CRITICAL)
- [x] mysql.hcl - moved to zippy, using `/data/services` - [x] mysql.hcl - moved to zippy, using `/data/services`
- [ ] postgres.hcl - update paths, add affinity for zippy - [x] postgres.hcl - migrated to `/data/services`
- [ ] redis.hcl - update paths, add affinity for zippy - [x] redis.hcl - migrated to `/data/services`
- [ ] traefik.hcl - update paths (already floating) - [x] traefik.hcl - migrated to `/data/services`
- [ ] authentik.hcl - verify (stateless, no changes needed) - [x] authentik.hcl - stateless, no changes needed
### Monitoring Stack (HIGH) ### Monitoring Stack (HIGH)
- [ ] prometheus.hcl - update paths - [x] prometheus.hcl - migrated to `/data/services`
- [ ] grafana.hcl - update paths - [x] grafana.hcl - migrated to `/data/services` (2025-10-23)
- [ ] loki.hcl - update paths - [x] loki.hcl - migrated to `/data/services`
- [ ] vector.hcl - remove glusterfs log collection - [ ] vector.hcl - needs update to remove glusterfs log collection (line 26, 101-109)
### Databases (HIGH) ### Databases (HIGH)
- [ ] clickhouse.hcl - update paths, add affinity for zippy - [x] clickhouse.hcl - migrated to `/data/services`
- [ ] unifi.hcl - update paths (includes mongodb) - [x] unifi.hcl - migrated to `/data/services` (includes mongodb)
### Web Applications (HIGH-MEDIUM) ### Web Applications (HIGH-MEDIUM)
- [ ] wordpress.hcl - update from `/data/sync/wordpress` to `/data/services/wordpress` - [x] wordpress.hcl - migrated to `/data/services`
- [ ] gitea.hcl - update paths - [x] gitea.hcl - migrated to `/data/services` (2025-10-23)
- [ ] wiki.hcl - update paths, verify with exec driver - [ ] wiki.hcl - uses `appdata` volume (points to `/data/compute/appdata`)
- [ ] plausible.hcl - verify (stateless) - [x] plausible.hcl - stateless, no changes needed
- [ ] tiddlywiki.hcl - uses `appdata` volume (points to `/data/compute/appdata`)
### Web Applications (LOW, may be deprecated) ### Web Applications (LOW, may be deprecated)
- [ ] ghost.hcl - update paths or remove (no longer used?) - [x] vikunja.hcl - migrated to `/data/services` (2025-10-23, not running)
- [ ] 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)
### Media Stack (MEDIUM) ### Media Stack (MEDIUM)
- [ ] media.hcl - update paths, add constraint for fractal - [x] media.hcl - migrated to `/data/services`
- [ ] radarr, sonarr, bazarr, plex, qbittorrent
### Utility Services (MEDIUM-LOW) ### Utility Services (MEDIUM-LOW)
- [ ] evcc.hcl - update paths - [x] evcc.hcl - migrated to `/data/services`
- [ ] weewx.hcl - update paths - [x] weewx.hcl - migrated to `/data/services` (2025-10-23)
- [ ] code-server.hcl - update paths - [x] code-server.hcl - migrated to `/data/services`
- [ ] beancount.hcl - update paths - [x] beancount.hcl - migrated to `/data/services`
- [ ] adminer.hcl - verify (stateless) - [x] adminer.hcl - stateless, no changes needed
- [ ] maps.hcl - update paths - [x] maps.hcl - migrated to `/data/services`
- [ ] netbox.hcl - update paths - [x] netbox.hcl - migrated to `/data/services`
- [ ] farmos.hcl - update paths - [x] farmos.hcl - migrated to `/data/services` (2025-10-23)
- [ ] urbit.hcl - update paths - [x] urbit.hcl - migrated to `/data/services`
- [ ] webodm.hcl - update paths - [x] webodm.hcl - migrated to `/data/services` (2025-10-23, not running)
- [ ] velutrack.hcl - verify paths - [x] velutrack.hcl - migrated to `/data/services`
- [ ] resol-gateway.hcl - verify paths - [ ] resol-gateway.hcl - uses `code` volume (points to `/data/compute/code`)
- [ ] igsync.hcl - update paths - [ ] igsync.hcl - uses `appdata` volume (points to `/data/compute/appdata`)
- [ ] jupyter.hcl - verify paths - [x] jupyter.hcl - migrated to `/data/services` (2025-10-23, not running)
- [ ] whoami.hcl - verify (stateless test service) - [x] whoami.hcl - stateless test service, no changes needed
- [ ] tiddlywiki.hcl - update paths (if separate from wiki.hcl)
### Backup Jobs (HIGH) ### Backup Jobs (HIGH)
- [x] mysql-backup - moved to zippy, verified - [x] mysql-backup - moved to zippy, verified
- [ ] postgres-backup.hcl - verify destination - [x] postgres-backup.hcl - migrated to `/data/services`
- [ ] wordpress-backup.hcl - verify destination
### Host Volume Definitions (CRITICAL)
- [ ] common/nomad.nix - update host_volume paths from `/data/compute/{appdata,code}` to `/data/services/{appdata,code}`
### Verification ### Verification
- [ ] All services healthy in Nomad - [ ] All services healthy in Nomad
@@ -148,6 +144,22 @@ See [CLUSTER_REVAMP.md](./CLUSTER_REVAMP.md) for detailed procedures.
--- ---
**Last updated**: 2025-10-22 **Last updated**: 2025-10-23 21:16
**Current phase**: Phase 2 complete (zippy storage setup done), ready for Phase 3 (GlusterFS → NFS migration) **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 **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

View File

@@ -19,8 +19,8 @@ job "farmos" {
image = "gitea.v.paler.net/ppetru/farmos:latest" image = "gitea.v.paler.net/ppetru/farmos:latest"
ports = ["http"] ports = ["http"]
volumes = [ volumes = [
"/data/compute/appdata/farmos/sites:/opt/drupal/web/sites", "/data/services/farmos/sites:/opt/drupal/web/sites",
"/data/compute/appdata/farmos/keys:/opt/drupal/keys", "/data/services/farmos/keys:/opt/drupal/keys",
] ]
} }

View File

@@ -25,8 +25,8 @@ job "gitea" {
"ssh", "ssh",
] ]
volumes = [ volumes = [
"/data/compute/appdata/gitea/data:/var/lib/gitea", "/data/services/gitea/data:/var/lib/gitea",
"/data/compute/appdata/gitea/config:/etc/gitea", "/data/services/gitea/config:/etc/gitea",
"/etc/timezone:/etc/timezone:ro", "/etc/timezone:/etc/timezone:ro",
"/etc/localtime:/etc/localtime:ro", "/etc/localtime:/etc/localtime:ro",
] ]

View File

@@ -14,7 +14,7 @@ job "grafana" {
config { config {
image = "grafana/grafana-enterprise:latest" image = "grafana/grafana-enterprise:latest"
ports = [ "http" ] ports = [ "http" ]
volumes = [ "/data/compute/appdata/grafana:/var/lib/grafana" ] volumes = [ "/data/services/grafana:/var/lib/grafana" ]
} }
env { env {

View File

@@ -20,7 +20,7 @@ job "jupyter" {
ports = ["http"] ports = ["http"]
volumes = [ volumes = [
"/data/compute/appdata/jupyter:/home/jovyan/work", "/data/services/jupyter:/home/jovyan/work",
] ]
command = "start-notebook.py" command = "start-notebook.py"

View File

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

View File

@@ -19,9 +19,9 @@ job "vikunja" {
image = "vikunja/vikunja:latest" image = "vikunja/vikunja:latest"
ports = ["http"] ports = ["http"]
volumes = [ volumes = [
"/data/compute/appdata/vikunja/config.yml:/app/vikunja/config.yml:ro", "/data/services/vikunja/config.yml:/app/vikunja/config.yml:ro",
"/data/compute/appdata/vikunja/db:/db", "/data/services/vikunja/db:/db",
"/data/compute/appdata/vikunja/files:/app/vikunja/files", "/data/services/vikunja/files:/app/vikunja/files",
] ]
} }
@@ -56,7 +56,7 @@ job "vikunja" {
image = "typesense/typesense:27.1" image = "typesense/typesense:27.1"
ports = ["http"] ports = ["http"]
volumes = [ volumes = [
"/data/compute/appdata/vikunja/typesense:/data", "/data/services/vikunja/typesense:/data",
] ]
} }

View File

@@ -33,7 +33,7 @@ job "odm" {
ports = ["ui"] ports = ["ui"]
command = "/webodm/start.sh" command = "/webodm/start.sh"
volumes = [ volumes = [
"/data/compute/appdata/webodm:/webodm/app/media", "/data/services/webodm:/webodm/app/media",
"local/local_settings.py:/webodm/webodm/local_settings.py:ro", "local/local_settings.py:/webodm/webodm/local_settings.py:ro",
] ]
} }
@@ -136,7 +136,7 @@ EOH
command = "/webodm/worker.sh" command = "/webodm/worker.sh"
args = ["start"] args = ["start"]
volumes = [ volumes = [
"/data/compute/appdata/webodm:/webodm/app/media", "/data/services/webodm:/webodm/app/media",
"local/local_settings.py:/webodm/webodm/local_settings.py:ro", "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 # to be able to receive UDP broadcast packets from the weatherlink
network_mode = "host" network_mode = "host"
volumes = [ volumes = [
"/data/compute/appdata/weewx/etc:/etc/weewx", "/data/services/weewx/etc:/etc/weewx",
"/data/compute/appdata/weewx/html:/var/www/html", "/data/services/weewx/html:/var/www/html",
] ]
} }
@@ -46,7 +46,7 @@ job "weewx" {
"-enable-health", "-enable-health",
] ]
volumes = [ "/data/compute/appdata/weewx/html:/srv/http" ] volumes = [ "/data/services/weewx/html:/srv/http" ]
} }
} }