diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T02:52:15.930781+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T02:52:15.930781+00:00 new file mode 100644 index 0000000..32c2fed --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T02:52:15.930781+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T02:52:15.930781+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T03:52:16.199077+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T03:52:16.199077+00:00 new file mode 100644 index 0000000..47457a5 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T03:52:16.199077+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T03:52:16.199077+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T04:52:16.451331+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T04:52:16.451331+00:00 new file mode 100644 index 0000000..d27ceb9 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T04:52:16.451331+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T04:52:16.451331+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T05:52:16.700926+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T05:52:16.700926+00:00 new file mode 100644 index 0000000..13c07d2 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T05:52:16.700926+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T05:52:16.700926+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T06:52:16.942536+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T06:52:16.942536+00:00 new file mode 100644 index 0000000..bd44798 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T06:52:16.942536+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T06:52:16.942536+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T07:52:17.241685+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T07:52:17.241685+00:00 new file mode 100644 index 0000000..f16060e --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T07:52:17.241685+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T07:52:17.241685+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T08:52:17.462682+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T08:52:17.462682+00:00 new file mode 100644 index 0000000..2d33055 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T08:52:17.462682+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T08:52:17.462682+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T09:52:17.694911+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T09:52:17.694911+00:00 new file mode 100644 index 0000000..0e1dbb4 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T09:52:17.694911+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T09:52:17.694911+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T10:52:17.932955+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T10:52:17.932955+00:00 new file mode 100644 index 0000000..468fe55 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T10:52:17.932955+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T10:52:17.932955+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T11:52:18.207285+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T11:52:18.207285+00:00 new file mode 100644 index 0000000..7edffb2 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T11:52:18.207285+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T11:52:18.207285+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T12:52:18.448214+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T12:52:18.448214+00:00 new file mode 100644 index 0000000..cb80c98 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T12:52:18.448214+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T12:52:18.448214+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T13:52:18.667953+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T13:52:18.667953+00:00 new file mode 100644 index 0000000..82cb5cd --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T13:52:18.667953+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T13:52:18.667953+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T14:52:18.880569+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T14:52:18.880569+00:00 new file mode 100644 index 0000000..0fc9cd9 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T14:52:18.880569+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T14:52:18.880569+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T15:52:19.069146+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T15:52:19.069146+00:00 new file mode 100644 index 0000000..b9e93fc --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T15:52:19.069146+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T15:52:19.069146+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T16:52:19.280844+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T16:52:19.280844+00:00 new file mode 100644 index 0000000..978eb20 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T16:52:19.280844+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T16:52:19.280844+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T17:52:19.591846+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T17:52:19.591846+00:00 new file mode 100644 index 0000000..480d02a --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T17:52:19.591846+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T17:52:19.591846+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T18:52:19.823937+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T18:52:19.823937+00:00 new file mode 100644 index 0000000..13e46cc --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T18:52:19.823937+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T18:52:19.823937+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T19:52:20.066260+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T19:52:20.066260+00:00 new file mode 100644 index 0000000..2818e31 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T19:52:20.066260+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T19:52:20.066260+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T20:52:20.311531+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T20:52:20.311531+00:00 new file mode 100644 index 0000000..c9efc66 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T20:52:20.311531+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T20:52:20.311531+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T21:52:20.574235+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T21:52:20.574235+00:00 new file mode 100644 index 0000000..d39a36d --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T21:52:20.574235+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T21:52:20.574235+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T22:52:20.835497+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T22:52:20.835497+00:00 new file mode 100644 index 0000000..4047625 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T22:52:20.835497+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T22:52:20.835497+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-10T23:52:21.149870+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T23:52:21.149870+00:00 new file mode 100644 index 0000000..c90192f --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-10T23:52:21.149870+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-10T23:52:21.149870+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-11T00:52:21.468688+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-11T00:52:21.468688+00:00 new file mode 100644 index 0000000..1214fa6 --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-11T00:52:21.468688+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-11T00:52:21.468688+00:00"} \ No newline at end of file diff --git a/consul_backup/fitbit-garmin-sync/logs/2026-05-11T01:52:21.908297+00:00 b/consul_backup/fitbit-garmin-sync/logs/2026-05-11T01:52:21.908297+00:00 new file mode 100644 index 0000000..6024f8a --- /dev/null +++ b/consul_backup/fitbit-garmin-sync/logs/2026-05-11T01:52:21.908297+00:00 @@ -0,0 +1 @@ +{"sync_type": "weight_sync", "status": "partial", "message": "Synced 0 records, 1 failed", "records_processed": 0, "timestamp": "2026-05-11T01:52:21.908297+00:00"} \ No newline at end of file diff --git a/nomad_backup/homeassistant.hcl b/nomad_backup/homeassistant.hcl new file mode 100644 index 0000000..5c03fd8 --- /dev/null +++ b/nomad_backup/homeassistant.hcl @@ -0,0 +1,110 @@ +job "homeassistant" { + datacenters = ["dc1"] + type = "service" + + constraint { + attribute = "${attr.kernel.name}" + value = "linux" + } + + constraint { + attribute = "${attr.unique.hostname}" + operator = "regexp" + value = "odroid.*" + } + + group "hass" { + count = 1 + + restart { + attempts = 99 + interval = "1h" + delay = "10s" + mode = "delay" + } + + task "wait-for-postgres" { + driver = "docker" + lifecycle { + hook = "prestart" + sidecar = false + } + config { + image = "postgres:16-alpine" + command = "sh" + args = ["-c", "until pg_isready -h master.postgres.service.dc1.consul -U hass; do sleep 3; done"] + } + resources { + cpu = 50 + memory = 64 + } + } + + task "config-backup" { + driver = "docker" + lifecycle { + hook = "poststart" + sidecar = true + } + config { + image = "alpine:3.19" + command = "sh" + args = ["-c", "apk add --no-cache rsync && while true; do rsync -a --delete --exclude='*.db*' --exclude='*.log*' --exclude='tts/' --exclude='deps/' --exclude='__pycache__/' /config/ /configbackup/; sleep 1800; done"] + volumes = [ + "/mnt/Public/config/homeassistant:/config:ro", + "/mnt/Public/config/homeassistant-backup:/configbackup", + ] + } + resources { + cpu = 30 + memory = 64 + } + } + + task "hass" { + driver = "docker" + config { + image = "linuxserver/homeassistant:latest" + network_mode = "host" + cap_add = ["NET_ADMIN"] + volumes = [ + "/etc/localtime:/etc/localtime:ro", + "/mnt/Public/config/homeassistant:/config", + ] + } + + env { + JEMALLOC_DISABLE = true + PUID = "1000" + PGID = "1000" + } + + resources { + cpu = 256 + memory = 512 + } + + service { + name = "homeassistant" + tags = ["global", "homeassistant", "migration-target", "logo=home-assistant"] + port = "http" + + check { + type = "http" + path = "/api/config" + interval = "10s" + timeout = "2s" + header { + Authorization = ["Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI3MGI3ZmQzN2RhNjg0ZDcwYmI0MzhlYjJhNzc1NTNjMSIsImlhdCI6MTc3ODQ1Njc1MiwiZXhwIjoyMDkzODE2NzUyfQ.gAWoByWWDDW9YSUpTZHb-xtdiFo-0u5RqHsxKhMQ4rc"] + } + } + } + } + + network { + port "http" { + static = 8124 + } + } + } +} diff --git a/nomad_backup/wireguard.hcl b/nomad_backup/wireguard.hcl index 1c6f040..2e47e77 100644 --- a/nomad_backup/wireguard.hcl +++ b/nomad_backup/wireguard.hcl @@ -2,57 +2,60 @@ job "wireguard" { region = "global" datacenters = ["dc1"] type = "service" - // constraint { - // attribute = "${attr.cpu.arch}" - // operator = "regexp" - // value = "arm" - // } + + constraint { + attribute = "${node.unique.name}" + value = "opti1" + } + group "wireguard" { count = 1 - task "wireguard" { driver = "docker" - config { - image = "lscr.io/linuxserver/wireguard" - ports = ["vpn"] + image = "ghcr.io/wg-easy/wg-easy" + ports = ["vpn", "ui"] volumes = [ - "/mnt/Public/config/wireguard:/config", - "/lib/modules:/lib/modules" - ] - cap_add = ["NET_ADMIN","SYS_MODULE"] - // network_mode = "host" - - // network_mode = "container:gocast-${NOMAD_ALLOC_ID}" + "/mnt/Public/config/wireguard:/etc/wireguard", + ] + cap_add = ["NET_ADMIN", "SYS_MODULE"] sysctl = { - "net.ipv4.conf.all.src_valid_mark"="1" + "net.ipv4.conf.all.src_valid_mark" = "1" + "net.ipv4.ip_forward" = "1" } + } + +env { + TZ = "EST5EDT" + WG_HOST = "wireguard.fbleagh.duckdns.org" + WG_PORT = 51820 + WG_DEFAULT_DNS = "192.168.4.250,192.168.4.1,1.1.1.1" + WG_DEFAULT_ADDRESS = "10.8.0.x" + WG_ALLOWED_IPS = "0.0.0.0/0" + PASSWORD_HASH = "$2a$12$WAdMQQAoOqtANtsH09hVtuOnCvvghOX9oLZjGkUsovOjgkbPmMdtq" +} - } - env { - TZ = "EST5EDT" - PUID = 1000 - PGID = 1000 - SERVERURL="wireguard.fbleagh.duckdns.org" - SERVERPORT=51820 - PEERS="StuPhone,SurfaceGo,Surface,SurfaceGo3" - PEERDNS="192.168.1.250,192.168.1.1,1.1.1.1" - // INTERNAL_SUBNET= "192.168.1.0" - ALLOWEDIPS="0.0.0.0/0" - } service { name = "${TASKGROUP}" port = "vpn" - tags = ["enable_gocast", + tags = [ + "enable_gocast", "gocast_vip=192.168.1.241/32", "gocast_nat=tcp:51820:51820", - "gocast_nat=udp:51820:51820"] + "gocast_nat=udp:51820:51820", + ] + } + + service { + name = "${TASKGROUP}-ui" + port = "ui" + tags = ["wireguard-ui"] } resources { cpu = 50 - memory = 100 + memory = 128 } } @@ -61,6 +64,10 @@ job "wireguard" { static = 51820 to = 51820 } + port "ui" { + static = 51821 + to = 51821 + } } } -} +} \ No newline at end of file