Simplify passing blocky config to nomad
This commit is contained in:
parent
79648879ab
commit
2a58439ab5
@ -1,8 +1,3 @@
|
||||
variable "config_data" {
|
||||
type = string
|
||||
description = "Plain text config file for blocky"
|
||||
}
|
||||
|
||||
job "blocky" {
|
||||
datacenters = ["dc1"]
|
||||
type = "service"
|
||||
@ -104,7 +99,9 @@ job "blocky" {
|
||||
}
|
||||
|
||||
template {
|
||||
data = var.config_data
|
||||
data = <<EOF
|
||||
${file("${module_path}/config.yml")}
|
||||
EOF
|
||||
destination = "$${NOMAD_TASK_DIR}/config.yml"
|
||||
splay = "1m"
|
||||
|
||||
|
@ -1,16 +1,7 @@
|
||||
locals {
|
||||
config_data = file("${path.module}/config.yml")
|
||||
}
|
||||
|
||||
resource "nomad_job" "blocky" {
|
||||
hcl2 {
|
||||
vars = {
|
||||
"config_data" = local.config_data,
|
||||
}
|
||||
}
|
||||
|
||||
jobspec = templatefile("${path.module}/blocky.nomad", {
|
||||
use_wesher = var.use_wesher,
|
||||
module_path = path.module,
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -132,7 +132,6 @@ redis:
|
||||
connectionCooldown: 3s
|
||||
{{ end -}}
|
||||
|
||||
|
||||
{{ range nomadService 1 (env "NOMAD_ALLOC_ID") "mysql-tls" -}}
|
||||
{{ with nomadVar "nomad/jobs/blocky" -}}
|
||||
queryLog:
|
||||
|
Loading…
Reference in New Issue
Block a user