diff options
author | Quentin <quentin@deuxfleurs.fr> | 2019-06-01 16:02:49 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2019-07-11 09:33:07 +0200 |
commit | 61d009f18d5886db8b22ae41e04bb41a4ba2fddb (patch) | |
tree | e44bb326caf3107653c7a48749527cfd77f02cf2 /nomad/bottin.hcl | |
download | infrastructure-61d009f18d5886db8b22ae41e04bb41a4ba2fddb.tar.gz infrastructure-61d009f18d5886db8b22ae41e04bb41a4ba2fddb.zip |
Initial commit
Diffstat (limited to 'nomad/bottin.hcl')
-rw-r--r-- | nomad/bottin.hcl | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/nomad/bottin.hcl b/nomad/bottin.hcl new file mode 100644 index 0000000..281fabc --- /dev/null +++ b/nomad/bottin.hcl @@ -0,0 +1,58 @@ +job "directory" { + datacenters = ["dc1"] + type = "service" + + constraint { + attribute = "${attr.cpu.arch}" + value = "amd64" + } + + group "ldap" { + count = 2 + task "server" { + driver = "docker" + config { + image = "superboum/amd64_bottin:v10" + readonly_rootfs = true + port_map { + ldap_port = 1389 + } + } + + env { + TRIGGER = 2 + BOTTIN_PORT = 1389 + BOTTIN_SUFFIX = "dc=deuxfleurs,dc=fr" + BOTTIN_CONSUL = "consul.service.2.cluster.deuxfleurs.fr" + } + + resources { + memory = 100 + network { + port "ldap_port" { + static = "389" + } + } + } + + service { + tags = ["bottin"] + port = "ldap_port" + address_mode = "host" + name = "bottin" + check { + type = "tcp" + port = "ldap_port" + interval = "60s" + timeout = "5s" + check_restart { + limit = 3 + grace = "90s" + ignore_warnings = false + } + } + } + } + } +} + |