Compare commits

...

7 Commits

Author SHA1 Message Date
c3a25a84e5 chore: trigger pipeline to test fixed grep pattern
All checks were successful
Deploy CSI Jobs / deploy (push) Successful in 11s
2026-05-27 09:50:50 +02:00
5acb65abbe fix: use \K grep pattern for volume id extraction
Replace variable-length lookbehind with \K which GNU grep supports.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-05-27 09:50:39 +02:00
Henrik Jess Nielsen
0178314810 Run moneymaker on int (has CSI plugin) 2026-05-26 23:56:23 +02:00
Henrik Jess Nielsen
f930ca1c80 Add moneymaker CSI volume and updated job
Some checks failed
Deploy CSI Jobs / deploy (push) Failing after 11s
- csi/volumes/moneymaker-data.hcl: CSI volume (1-10G, single-node-writer)
- jobs/moneymaker.nomad: migrated from host to CSI volume, removed consul constraint
2026-05-26 23:53:28 +02:00
Henrik Jess Nielsen
edffcd0766 Add idempotent volume provisioning step
Skips example.hcl, creates volumes that don't exist yet.
2026-05-26 23:45:53 +02:00
Henrik Jess Nielsen
575bc2053d Update runner label to debian/debian-int 2026-05-26 23:38:03 +02:00
Henrik Jess Nielsen
916b7affec Add Gitea Actions deploy workflow
Deploys CSI controller and node jobs to Nomad on push to main.
Runner: nomad.i80.dk (label: nomad) — local nomad job run calls.
2026-05-26 23:35:52 +02:00
3 changed files with 138 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
name: Deploy CSI Jobs
on:
push:
branches: [main]
paths:
- 'csi/**'
jobs:
deploy:
runs-on: debian
steps:
- name: Pull latest
run: |
cd /opt/nomad-csi
git pull
- name: Deploy controller
run: nomad job run /opt/nomad-csi/csi/controller.nomad
- name: Deploy node plugin
run: nomad job run /opt/nomad-csi/csi/node.nomad
- name: Verify CSI plugin healthy
run: |
sleep 10
nomad plugin status org.democratic-csi.nfs
- name: Provision volumes
run: |
for vol in /opt/nomad-csi/csi/volumes/*.hcl; do
[[ "$vol" == *example* ]] && continue
vol_id=$(grep -oP 'id\s*=\s*"\K[^"]+' "$vol" | head -1)
if nomad volume status "$vol_id" > /dev/null 2>&1; then
echo "Volume $vol_id already exists, skipping"
else
echo "Creating volume $vol_id"
nomad volume create "$vol"
fi
done

View File

@@ -0,0 +1,13 @@
id = "moneymaker-data"
name = "moneymaker-data"
type = "csi"
plugin_id = "org.democratic-csi.nfs"
capacity_min = "1G"
capacity_max = "10G"
capability {
access_mode = "single-node-writer"
attachment_mode = "file-system"
}
# updated ons 27 maj 09:50:50 CEST 2026

85
jobs/moneymaker.nomad Normal file
View File

@@ -0,0 +1,85 @@
job "moneymaker" {
datacenters = ["dc1"]
type = "service"
group "app" {
count = 1
constraint {
attribute = "${node.unique.name}"
value = "int"
}
volume "moneymaker-data" {
type = "csi"
source = "moneymaker-data"
access_mode = "single-node-writer"
attachment_mode = "file-system"
}
network {
port "http" {}
}
task "web" {
driver = "docker"
config {
image = "registry.i80.dk/gitea/mmd:latest"
ports = ["http"]
}
volume_mount {
volume = "moneymaker-data"
destination = "/app/data"
}
env {
PORT = "${NOMAD_PORT_http}"
HOST = "0.0.0.0"
APP_ENV = "production"
SAXO_TOKEN_FILE = "/app/data/.saxo_token.json"
HF_HOME = "/app/data/hf-cache"
LOG_DIR = "/app/data/logs"
DATABASE_URL = ""
SAXO_APP_KEY = ""
SAXO_APP_SECRET_1 = ""
ANTHROPIC_API_KEY = ""
}
resources {
cpu = 300
memory = 512
}
}
task "worker" {
driver = "docker"
config {
image = "registry.i80.dk/gitea/mmd:latest"
}
volume_mount {
volume = "moneymaker-data"
destination = "/app/data"
}
env {
APP_ENV = "production"
SAXO_TOKEN_FILE = "/app/data/.saxo_token.json"
HF_HOME = "/app/data/hf-cache"
LOG_DIR = "/app/data/logs"
DATABASE_URL = ""
SAXO_APP_KEY = ""
SAXO_APP_SECRET_1 = ""
ANTHROPIC_API_KEY = ""
}
resources {
cpu = 1500
memory = 3072
}
}
}
}