diff options
author | Quentin <quentin@deuxfleurs.fr> | 2020-12-22 14:52:49 +0100 |
---|---|---|
committer | Quentin <quentin@deuxfleurs.fr> | 2020-12-22 14:52:49 +0100 |
commit | a2adaa2101d2b82d457c1ef6e9e25acb9022b9fc (patch) | |
tree | 8765023021aadd9d46fa61fd4e7757d348a82d16 /app/deployment | |
parent | bb5a82b056deeee6ca03aacb8404cb0ab1c1ec1a (diff) | |
download | infrastructure-a2adaa2101d2b82d457c1ef6e9e25acb9022b9fc.tar.gz infrastructure-a2adaa2101d2b82d457c1ef6e9e25acb9022b9fc.zip |
Migrate directory to new Nomad syntax
Diffstat (limited to 'app/deployment')
-rw-r--r-- | app/deployment/directory.hcl (renamed from app/deployment/bottin2.hcl) | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/app/deployment/bottin2.hcl b/app/deployment/directory.hcl index fec7d74..0acc08f 100644 --- a/app/deployment/bottin2.hcl +++ b/app/deployment/directory.hcl @@ -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 { |