Skip to content

Commit

Permalink
feat(consul): add job to snapshot consul (#13)
Browse files Browse the repository at this point in the history
Signed-off-by: Bruce Becker <[email protected]>

Signed-off-by: Bruce Becker <[email protected]>
  • Loading branch information
brucellino authored Nov 12, 2022
1 parent ae5501e commit 38c9cbd
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions consul-snapshot.nomad
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
job "consul-backup" {
datacenters = ["dc1"]
type = "batch"
periodic {
cron = "1-59/5 * * * * *"
}
group "data" {
count = 1
network {}
volume "scratch" {
type = "host"
source = "scratch"
read_only = false
}
task "get-terraform" {
driver = "exec"
lifecycle {
hook = "prestart"
sidecar = false
}
config {
command = "bash"
args = ["-c", "curl https://releases.hashicorp.com/terraform/1.3.4/terraform_1.3.4_linux_arm64.zip | gunzip ->terraform ; chmod u+x terraform"]
}
volume_mount {
volume = "scratch"
destination = "/volume"
read_only = false
}
}
task "check-consul" {
driver = "exec"
config {
command = "bash"
args = ["-c", "consul -version"]
}
}
}
}

0 comments on commit 38c9cbd

Please sign in to comment.