diff --git a/cluster/prod/app/core/secrets.toml b/cluster/prod/app/core/secrets.toml index 736c9dd..8a6a7f2 100644 --- a/cluster/prod/app/core/secrets.toml +++ b/cluster/prod/app/core/secrets.toml @@ -3,3 +3,7 @@ type = 'user' description = 'LDAP base DN for everything' example = 'dc=example,dc=com' +[secrets."d53/gandi_api_key"] +type = 'user' +description = 'Gandi API key' + diff --git a/cluster/prod/app/guichet/deploy/directory.hcl b/cluster/prod/app/guichet/deploy/guichet.hcl similarity index 95% rename from cluster/prod/app/guichet/deploy/directory.hcl rename to cluster/prod/app/guichet/deploy/guichet.hcl index 397602f..4b2ff28 100644 --- a/cluster/prod/app/guichet/deploy/directory.hcl +++ b/cluster/prod/app/guichet/deploy/guichet.hcl @@ -14,7 +14,7 @@ job "guichet" { driver = "docker" config { image = "dxflrs/guichet:m1gzk1r00xp0kz566fwbpc87z7haq7xj" - args = [ "server", "-config", "/etc/config.json" ] + args = [ "server", "-config", "/etc/config.json" ] readonly_rootfs = true ports = [ "web_port" ] volumes = [ diff --git a/cluster/staging/app/directory/config/bottin/config.json.tpl b/cluster/staging/app/core/config/bottin/config.json.tpl similarity index 100% rename from cluster/staging/app/directory/config/bottin/config.json.tpl rename to cluster/staging/app/core/config/bottin/config.json.tpl diff --git a/cluster/staging/app/core/deploy/bottin.hcl b/cluster/staging/app/core/deploy/bottin.hcl new file mode 100644 index 0000000..1481fa8 --- /dev/null +++ b/cluster/staging/app/core/deploy/bottin.hcl @@ -0,0 +1,100 @@ +job "core-bottin" { + datacenters = ["neptune", "jupiter", "corrin", "bespin"] + type = "system" + priority = 90 + + update { + max_parallel = 1 + stagger = "1m" + } + + group "bottin" { + constraint { + distinct_property = "${meta.site}" + value = "1" + } + + network { + port "ldap_port" { + static = 389 + to = 389 + } + } + + task "bottin" { + driver = "docker" + config { + image = "dxflrs/bottin:7h18i30cckckaahv87d3c86pn4a7q41z" + network_mode = "host" + readonly_rootfs = true + ports = [ "ldap_port" ] + volumes = [ + "secrets/config.json:/config.json", + "secrets:/etc/bottin", + ] + } + + restart { + interval = "5m" + attempts = 10 + delay = "15s" + mode = "delay" + } + + resources { + memory = 100 + memory_max = 200 + } + + template { + data = file("../config/bottin/config.json.tpl") + destination = "secrets/config.json" + } + + template { + data = "{{ key \"secrets/consul/consul.crt\" }}" + destination = "secrets/consul.crt" + } + + template { + data = "{{ key \"secrets/consul/consul-client.crt\" }}" + destination = "secrets/consul-client.crt" + } + + template { + data = "{{ key \"secrets/consul/consul-client.key\" }}" + destination = "secrets/consul-client.key" + } + + template { + data = <