dns: pdns-admin in dedicated nomad group
This commit is contained in:
parent
374a62c304
commit
af58866882
@ -15,6 +15,9 @@ job "pdns-auth" {
|
||||
operator = "set_contains"
|
||||
value = "cluster"
|
||||
}
|
||||
vault {
|
||||
policies = ["pdns"]
|
||||
}
|
||||
group "pdns-auth" {
|
||||
network {
|
||||
port "dns" {
|
||||
@ -23,12 +26,6 @@ job "pdns-auth" {
|
||||
port "http" {
|
||||
static = 8081
|
||||
}
|
||||
port "pdnsadmin"{
|
||||
to = 80
|
||||
}
|
||||
}
|
||||
vault {
|
||||
policies = ["pdns"]
|
||||
}
|
||||
task "pdns-auth" {
|
||||
|
||||
@ -88,47 +85,7 @@ include-dir=/etc/powerdns/pdns.d
|
||||
memory = 100
|
||||
}
|
||||
}
|
||||
task "pnds-admin" {
|
||||
service {
|
||||
name = "pdns-admin"
|
||||
tags = [
|
||||
"homer.enable=true",
|
||||
"homer.name=PDNS-ADMIN",
|
||||
"homer.service=Application",
|
||||
"homer.logo=http://${NOMAD_ADDR_pdnsadmin}/static/img/favicon.png",
|
||||
"homer.target=_blank",
|
||||
"homer.url=http://${NOMAD_ADDR_pdnsadmin}",
|
||||
|
||||
]
|
||||
port = "pdnsadmin"
|
||||
}
|
||||
driver = "docker"
|
||||
config {
|
||||
image = "docker.service.consul:5000/powerdnsadmin/pda-legacy:latest"
|
||||
ports= ["pdnsadmin"]
|
||||
volumes = [
|
||||
"/mnt/diskstation/nomad/pdns-admin/:/data/node_module/",
|
||||
]
|
||||
}
|
||||
template{
|
||||
destination = "secrets/pdns-admin.env"
|
||||
env = true
|
||||
data = <<EOH
|
||||
{{ with secret "secrets/data/nomad/pdns"}}
|
||||
SECRET_KEY="{{ .Data.data.SECRET_KEY }}"
|
||||
GUNICORN_WORKERS=2
|
||||
{{ end }}
|
||||
{{ with secret "secrets/data/database/pdns"}}
|
||||
SQLALCHEMY_DATABASE_URI=postgresql://pdns-admin:{{ .Data.data.pdnsadmin }}@active.db.service.consul/pdns-admin
|
||||
{{end}}
|
||||
EOH
|
||||
}
|
||||
resources {
|
||||
cpu = 50
|
||||
memory = 200
|
||||
}
|
||||
|
||||
}
|
||||
task "pdns-recursor" {
|
||||
|
||||
driver = "docker"
|
||||
@ -188,4 +145,53 @@ local-address=192.168.1.6
|
||||
}
|
||||
}
|
||||
}
|
||||
group "pdns-admin" {
|
||||
network {
|
||||
port "pdnsadmin" {
|
||||
to = 80
|
||||
}
|
||||
}
|
||||
task "pnds-admin" {
|
||||
service {
|
||||
name = "pdns-admin"
|
||||
tags = [
|
||||
"homer.enable=true",
|
||||
"homer.name=PDNS-ADMIN",
|
||||
"homer.service=Application",
|
||||
"homer.logo=http://${NOMAD_ADDR_pdnsadmin}/static/img/favicon.png",
|
||||
"homer.target=_blank",
|
||||
"homer.url=http://${NOMAD_ADDR_pdnsadmin}",
|
||||
|
||||
]
|
||||
port = "pdnsadmin"
|
||||
}
|
||||
driver = "docker"
|
||||
config {
|
||||
image = "docker.service.consul:5000/powerdnsadmin/pda-legacy:latest"
|
||||
ports = ["pdnsadmin"]
|
||||
volumes = [
|
||||
"/mnt/diskstation/nomad/pdns-admin/:/data/node_module/",
|
||||
]
|
||||
}
|
||||
template {
|
||||
destination = "secrets/pdns-admin.env"
|
||||
env = true
|
||||
data = <<EOH
|
||||
{{ with secret "secrets/data/nomad/pdns"}}
|
||||
SECRET_KEY="{{ .Data.data.SECRET_KEY }}"
|
||||
GUNICORN_WORKERS=2
|
||||
{{ end }}
|
||||
{{ with secret "secrets/data/database/pdns"}}
|
||||
SQLALCHEMY_DATABASE_URI=postgresql://pdns-admin:{{ .Data.data.pdnsadmin }}@active.db.service.consul/pdns-admin
|
||||
{{end}}
|
||||
EOH
|
||||
}
|
||||
resources {
|
||||
cpu = 50
|
||||
memory = 200
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user