diff --git a/ansible_playbooks/ansible_hosts.yml b/ansible_playbooks/ansible_hosts.yml index 32f5783..78d5555 100644 --- a/ansible_playbooks/ansible_hosts.yml +++ b/ansible_playbooks/ansible_hosts.yml @@ -24,20 +24,20 @@ all: group: "999" mode: "0755" read_only: false - n2.thefij: - nomad_node_class: ingress - nomad_reserved_memory: 1024 - nfs_mounts: - - src: 10.50.250.2:/srv/volumes - path: /srv/volumes/moxy - opts: proto=tcp,rw - nomad_unique_host_volumes: - - name: nextcloud-data - path: /srv/volumes/nextcloud - owner: "root" - group: "bin" - mode: "0755" - read_only: false + # n2.thefij: + # nomad_node_class: ingress + # nomad_reserved_memory: 1024 + # nfs_mounts: + # - src: 10.50.250.2:/srv/volumes + # path: /srv/volumes/moxy + # opts: proto=tcp,rw + # nomad_unique_host_volumes: + # - name: nextcloud-data + # path: /srv/volumes/nextcloud + # owner: "root" + # group: "bin" + # mode: "0755" + # read_only: false pi4: nomad_node_class: ingress nomad_reserved_memory: 512 @@ -61,12 +61,12 @@ nomad_servers: nonopi.thefij: ansible_host: 192.168.2.170 n1.thefij: {} - n2.thefij: {} + # n2.thefij: {} pi4: {} # qnomad.thefij: {} nomad_clients: hosts: n1.thefij: {} - n2.thefij: {} + # n2.thefij: {} pi4: {} # qnomad.thefij: {} diff --git a/backups/backups.tf b/backups/backups.tf index 844ebef..739b819 100644 --- a/backups/backups.tf +++ b/backups/backups.tf @@ -8,7 +8,7 @@ resource "nomad_job" "backup" { resource "nomad_job" "backup-oneoff" { # TODO: Get list of nomad hosts dynamically - for_each = toset(["n1", "n2", "pi4"]) + for_each = toset(["n1", "pi4"]) # for_each = toset([ # for node in data.consul_service.nomad.service : # node.node_name @@ -24,7 +24,7 @@ resource "nomad_job" "backup-oneoff" { locals { # NOTE: This can't be dynamic in first deploy since these values are not known # all_job_ids = toset(flatten([[for job in resource.nomad_job.backup-oneoff : job.id], [resource.nomad_job.backup.id]])) - all_job_ids = toset(["backup", "backup-oneoff-n1", "backup-oneoff-n2", "backup-oneoff-pi4"]) + all_job_ids = toset(["backup", "backup-oneoff-n1", "backup-oneoff-pi4"]) } resource "nomad_acl_policy" "secrets_mysql" { diff --git a/core/blocky/blocky.nomad b/core/blocky/blocky.nomad index a967038..0e3dd8a 100644 --- a/core/blocky/blocky.nomad +++ b/core/blocky/blocky.nomad @@ -22,7 +22,7 @@ job "blocky" { group "blocky" { # TODO: This must be updated to match the nubmer of servers (possibly grabbed from TF) # I am moving away from `system` jobs because of https://github.com/hashicorp/nomad/issues/12023 - count = 3 + count = 2 network { mode = "bridge" diff --git a/core/exporters.nomad b/core/exporters.nomad index 99e1a70..8ad5d38 100644 --- a/core/exporters.nomad +++ b/core/exporters.nomad @@ -3,10 +3,14 @@ job "exporters" { type = "service" priority = 55 + constraint { + distinct_hosts = true + } + group "promtail" { # TODO: This must be updated to match the nubmer of servers (possibly grabbed from TF) - # I am moving away from `system` jobs because of https://github.com/hashicorp/nomad/issues/12023 - count = 3 + # I am moving away from `system` jobs because of https://github.com/hashicorp/nomad/issues/1202 + count = 2 network { mode = "bridge"