aboutsummaryrefslogtreecommitdiff
path: root/cluster/staging/app
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2023-01-04 10:06:06 +0100
committerAlex Auvolat <alex@adnab.me>2023-01-04 10:06:06 +0100
commitda78f3671e2bc532ec64069516fac0ff885c4d7b (patch)
tree79a4765afce877d0218712ba3df19c89be285cac /cluster/staging/app
parent26f78872e6d94671381c2b199c643e43a81b8b7f (diff)
downloadnixcfg-da78f3671e2bc532ec64069516fac0ff885c4d7b.tar.gz
nixcfg-da78f3671e2bc532ec64069516fac0ff885c4d7b.zip
staging: deploy things on bespin
Diffstat (limited to 'cluster/staging/app')
-rw-r--r--cluster/staging/app/core/deploy/core-service.hcl2
-rw-r--r--cluster/staging/app/core/deploy/core-system.hcl2
-rw-r--r--cluster/staging/app/directory/deploy/directory.hcl2
-rw-r--r--cluster/staging/app/drone-ci/deploy/bad-runner-vm.hcl48
-rw-r--r--cluster/staging/app/drone-ci/deploy/runner-docker.hcl91
-rw-r--r--cluster/staging/app/garage/deploy/garage.hcl2
-rw-r--r--cluster/staging/app/telemetry/deploy/telemetry-service.hcl2
-rw-r--r--cluster/staging/app/telemetry/deploy/telemetry-system.hcl2
8 files changed, 6 insertions, 145 deletions
diff --git a/cluster/staging/app/core/deploy/core-service.hcl b/cluster/staging/app/core/deploy/core-service.hcl
index 72f6f0b..5994d89 100644
--- a/cluster/staging/app/core/deploy/core-service.hcl
+++ b/cluster/staging/app/core/deploy/core-service.hcl
@@ -1,5 +1,5 @@
job "core-service" {
- datacenters = ["neptune", "jupiter", "corrin"]
+ datacenters = ["neptune", "jupiter", "corrin", "bespin"]
type = "service"
priority = 90
diff --git a/cluster/staging/app/core/deploy/core-system.hcl b/cluster/staging/app/core/deploy/core-system.hcl
index 5cdffa7..4d6e503 100644
--- a/cluster/staging/app/core/deploy/core-system.hcl
+++ b/cluster/staging/app/core/deploy/core-system.hcl
@@ -1,5 +1,5 @@
job "core-system" {
- datacenters = ["neptune", "jupiter", "corrin"]
+ datacenters = ["neptune", "jupiter", "corrin", "bespin"]
type = "system"
priority = 90
diff --git a/cluster/staging/app/directory/deploy/directory.hcl b/cluster/staging/app/directory/deploy/directory.hcl
index 1938ec5..c88d47e 100644
--- a/cluster/staging/app/directory/deploy/directory.hcl
+++ b/cluster/staging/app/directory/deploy/directory.hcl
@@ -1,5 +1,5 @@
job "directory" {
- datacenters = ["neptune", "jupiter"]
+ datacenters = ["neptune", "jupiter", "corrin", "bespin"]
type = "service"
priority = 90
diff --git a/cluster/staging/app/drone-ci/deploy/bad-runner-vm.hcl b/cluster/staging/app/drone-ci/deploy/bad-runner-vm.hcl
deleted file mode 100644
index 7c3a7e2..0000000
--- a/cluster/staging/app/drone-ci/deploy/bad-runner-vm.hcl
+++ /dev/null
@@ -1,48 +0,0 @@
-job "drone-runner" {
- datacenters = ["neptune"]
- type = "system"
-
- group "runner-vm" {
- network {
- port "ssh" {
- static = 22544
- }
- }
-
- task "drone-runner-vm" {
- driver = "qemu"
-
- config {
- image_path = "local/drone-runner.qcow2"
- accelerator = "kvm"
- args = [
- "-drive", "index=1,file=fat:rw:/var/lib/nomad/alloc/${NOMAD_ALLOC_ID}/${NOMAD_TASK_NAME}/secrets,format=raw,media=disk",
- "-device", "e1000,netdev=user.0",
- "-netdev", "user,id=user.0,hostfwd=tcp::${NOMAD_PORT_ssh}-:22",
- "-smp", "2",
- ]
- port_map {
- ssh = 22
- }
- }
-
- artifact {
- source = "https://alex.web.deuxfleurs.fr/drone-runner.qcow2.zst"
- destination = "local/drone-runner.qcow2"
- mode = "file"
- }
-
- template {
- data = <<EOH
-DRONE_RPC_SECRET={{ key "secrets/drone-ci/rpc_secret" | trimSpace }}
-DRONE_RUNNER_NAME={{ env "attr.unique.hostname" }}
-EOH
- destination = "secrets/secret_env"
- }
-
- resources {
- memory = 2000
- }
- }
- }
-}
diff --git a/cluster/staging/app/drone-ci/deploy/runner-docker.hcl b/cluster/staging/app/drone-ci/deploy/runner-docker.hcl
deleted file mode 100644
index d7c6ef4..0000000
--- a/cluster/staging/app/drone-ci/deploy/runner-docker.hcl
+++ /dev/null
@@ -1,91 +0,0 @@
-job "drone-runner" {
- datacenters = ["neptune"]
- type = "system"
-
- group "runner" {
-
- task "populate-nix-store" {
- lifecycle {
- hook = "prestart"
- sidecar = false
- }
-
- driver = "docker"
- config {
- image = "nixpkgs/nix:nixos-21.05"
- command = "sh"
- args = [
- "-c", "test -d /mnt/store || cp -rv /nix/{store,var} /mnt/"
- ]
- volumes = [
- "/var/lib/drone/nix:/mnt",
- ]
- }
-
- resources {
- memory = 100
- cpu = 100
- }
- }
-
- task "drone-runner" {
- driver = "docker"
- config {
- image = "drone/drone-runner-docker:1.8.1"
-
- volumes = [
- "/var/lib/drone/nix:/nix",
- "/var/run/docker.sock:/var/run/docker.sock"
- ]
- }
-
- template {
- data = <<EOH
-DRONE_RPC_PROTO=https
-DRONE_RPC_HOST=drone.deuxfleurs.fr
-DRONE_RPC_SECRET={{ key "secrets/drone-ci/rpc_secret" | trimSpace }}
-DRONE_RUNNER_CAPACITY=1
-DRONE_DEBUG=true
-DRONE_LOGS_TRACE=true
-DRONE_RPC_DUMP_HTTP=true
-DRONE_RPC_DUMP_HTTP_BODY=true
-DRONE_RUNNER_NAME={{ env "attr.unique.hostname" }}
-DRONE_RUNNER_LABELS=nix:1
-EOH
- destination = "secrets/env"
- env = true
- }
-
- resources {
- memory = 200
- cpu = 100
- }
- }
-
- task "drone-gc" {
- driver = "docker"
- config {
- image = "drone/gc:latest"
-
- volumes = [
- "/var/run/docker.sock:/var/run/docker.sock"
- ]
- }
-
- template {
- data = <<EOH
-GC_DEBUG=true
-GC_CACHE=10gb
-GC_INTERVAL=10m
-EOH
- destination = "secrets/env"
- env = true
- }
-
- resources {
- memory = 100
- cpu = 100
- }
- }
- }
-}
diff --git a/cluster/staging/app/garage/deploy/garage.hcl b/cluster/staging/app/garage/deploy/garage.hcl
index 0d2c803..4e9d047 100644
--- a/cluster/staging/app/garage/deploy/garage.hcl
+++ b/cluster/staging/app/garage/deploy/garage.hcl
@@ -2,7 +2,7 @@ job "garage-staging" {
type = "system"
priority = 90
- datacenters = [ "neptune", "jupiter", "corrin" ]
+ datacenters = [ "neptune", "jupiter", "corrin", "bespin" ]
update {
max_parallel = 1
diff --git a/cluster/staging/app/telemetry/deploy/telemetry-service.hcl b/cluster/staging/app/telemetry/deploy/telemetry-service.hcl
index 1c59a79..9785c96 100644
--- a/cluster/staging/app/telemetry/deploy/telemetry-service.hcl
+++ b/cluster/staging/app/telemetry/deploy/telemetry-service.hcl
@@ -1,5 +1,5 @@
job "telemetry-service" {
- datacenters = ["neptune", "jupiter", "corrin"]
+ datacenters = ["neptune", "jupiter", "corrin", "bespin"]
type = "service"
group "prometheus" {
diff --git a/cluster/staging/app/telemetry/deploy/telemetry-system.hcl b/cluster/staging/app/telemetry/deploy/telemetry-system.hcl
index 1f0e64e..cd9b8a8 100644
--- a/cluster/staging/app/telemetry/deploy/telemetry-system.hcl
+++ b/cluster/staging/app/telemetry/deploy/telemetry-system.hcl
@@ -1,5 +1,5 @@
job "telemetry-system" {
- datacenters = ["neptune", "jupiter", "corrin"]
+ datacenters = ["neptune", "jupiter", "corrin", "bespin"]
type = "system"
priority = "100"