Compare commits

..

No commits in common. "74081f3a7db5a8235246abf0ebab59b9feec8fb6" and "c9c555d7ec06f102e21da2fe73bd8ac835c699ac" have entirely different histories.

2 changed files with 0 additions and 82 deletions

View file

@ -1,81 +0,0 @@
job "backup-daily" {
datacenters = [ "zuma-house", "mayel-house", "gribse-house" ]
type = "batch"
priority = "60"
periodic {
crons = [ "@daily" ]
prohibit_overlap = true
}
group "backup-consul" {
task "consul-kv-export" {
driver = "docker"
lifecycle {
hook = "prestart"
sidecar = false
}
config {
image = "hashicorp/consul:1.21.5"
network_mode = "host"
entrypoint = [ "/bin/sh", "-c" ]
args = [ "/bin/consul kv export > $NOMAD_ALLOC_DIR/consul.json" ]
}
env {
CONSUL_HTTP_ADDR = "http://consul.service.filouterie.consul:8500"
CONSUL_HTTP_SSL = "false"
}
resources {
cpu = 200
memory = 200
}
restart {
attempts = 2
interval = "30m"
delay = "15s"
mode = "fail"
}
}
task "restic-backup" {
driver = "docker"
config {
image = "restic/restic:0.18.1"
entrypoint = [ "/bin/sh", "-c" ]
network_mode = "host"
args = [ "restic backup $NOMAD_ALLOC_DIR/consul.json && restic forget --group-by paths --keep-within 1m1d --keep-within-weekly 3m --keep-within-monthly 1y && restic prune --max-unused 50% --max-repack-size 2G && restic check" ]
}
template {
data = <<EOH
AWS_ACCESS_KEY_ID={{ key "secrets/backup-consul/key_id" }}
AWS_SECRET_ACCESS_KEY={{ key "secrets/backup-consul/secret_key" }}
RESTIC_REPOSITORY={{ key "secrets/backup-consul/restic_repository" }}
RESTIC_PASSWORD={{ key "secrets/backup-consul/restic_password" }}
EOH
destination = "secrets/env_vars"
env = true
}
resources {
cpu = 200
memory = 200
}
restart {
attempts = 2
interval = "30m"
delay = "15s"
mode = "fail"
}
}
}
}

View file

@ -60,7 +60,6 @@ TRICOT_HTTP_BIND_ADDR=[::]:80
TRICOT_HTTPS_BIND_ADDR=[::]:443
TRICOT_METRICS_BIND_ADDR=[::]:9334
TRICOT_MAX_LOG_PER_SEC=10
TRICOT_WARMUP_CERT_MEMORY_STORE=true
RUST_LOG=tricot=debug
EOH
destination = "secrets/env"