Migrate directory to new Nomad syntax

This commit is contained in:
Quentin 2020-12-22 14:52:49 +01:00
parent bb5a82b056
commit a2adaa2101

View file

@ -1,4 +1,4 @@
job "directory2" {
job "directory" {
datacenters = ["dc1"]
type = "service"
priority = 90
@ -10,15 +10,21 @@ job "directory2" {
group "bottin" {
count = 1
network {
port "ldap_port" {
static = 389
to = 389
}
}
task "bottin" {
driver = "docker"
config {
image = "lxpz/bottin_amd64:20"
network_mode = "host"
readonly_rootfs = true
port_map {
ldap_port = 389
}
ports = [ "ldap_port" ]
volumes = [
"secrets/config.json:/config.json"
]
@ -26,15 +32,10 @@ job "directory2" {
resources {
memory = 100
network {
port "ldap_port" {
static = "389"
}
}
}
template {
data = "{{ key \"configuration/directory/bottin/config.json\" }}"
data = file("../config/configuration/directory/bottin/config.json")
destination = "secrets/config.json"
}
@ -60,34 +61,29 @@ job "directory2" {
group "guichet" {
count = 1
network {
port "web_port" { to = 9991 }
}
task "guichet" {
driver = "docker"
config {
image = "lxpz/guichet_amd64:10"
readonly_rootfs = true
port_map {
web_port = 9991
}
ports = [ "web_port" ]
volumes = [
"secrets/config.json:/config.json"
]
}
artifact {
source = "http://127.0.0.1:8500/v1/kv/configuration/directory/guichet/config.json.tpl?raw"
destination = "secrets/config.json.tpl"
mode = "file"
}
template {
source = "secrets/config.json.tpl"
data = file("../config/configuration/directory/guichet/config.json.tpl")
destination = "secrets/config.json"
}
resources {
memory = 200
network {
port "web_port" {}
}
}
service {