Skip to content

Commit

Permalink
Run backupbot (#312)
Browse files Browse the repository at this point in the history
  • Loading branch information
lens0021 authored Oct 7, 2024
1 parent 51d380b commit 47f1516
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
17 changes: 8 additions & 9 deletions jobs/backupbot.nomad
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
variable "test" {
type = bool
description = "Uses jobs for the test server. Without CSI"
default = false
variable "mysql_password_mediawiki" {
type = string
default = ""
}

job "backupbot" {
Expand All @@ -25,18 +24,18 @@ job "backupbot" {

env {
LOCAL_SETTINGS = "/a/secrets.php"
WG_DB_SERVER = NOMAD_UPSTREAM_ADDR_mysql
WG_DB_USER = "mediawiki"
WG_DB_PASSWORD = var.mysql_password_mediawiki
}

resources {
memory = 100
}
}

dynamic "network" {
for_each = var.test ? [{}] : []
content {
mode = "bridge"
}
network {
mode = "bridge"
}
}

Expand Down
5 changes: 4 additions & 1 deletion terraform/backupbot.tf
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
resource "nomad_job" "backupbot" {
count = 0
provider = nomad.green
depends_on = [nomad_job.mysql_green]

detach = false
jobspec = file("../jobs/backupbot.nomad")

hcl2 {
allow_fs = true
vars = {
mysql_password_mediawiki = var.mysql_password_mediawiki
}
}
}

0 comments on commit 47f1516

Please sign in to comment.