aboutsummaryrefslogtreecommitdiff
path: root/cluster/prod/app/bagage/deploy
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2023-04-05 15:50:46 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2023-04-05 15:50:53 +0200
commit0e4c641db741c91dd95934b61e70a2f5268b3c7e (patch)
tree9357d448bec1f937c2ddac9dd605b8989978ccdb /cluster/prod/app/bagage/deploy
parentc9f122bcd38b0f7d775dbd197aac7dd192f0e653 (diff)
downloadnixcfg-0e4c641db741c91dd95934b61e70a2f5268b3c7e.tar.gz
nixcfg-0e4c641db741c91dd95934b61e70a2f5268b3c7e.zip
redeploy bagage
Diffstat (limited to 'cluster/prod/app/bagage/deploy')
-rw-r--r--cluster/prod/app/bagage/deploy/bagage.hcl86
1 files changed, 86 insertions, 0 deletions
diff --git a/cluster/prod/app/bagage/deploy/bagage.hcl b/cluster/prod/app/bagage/deploy/bagage.hcl
new file mode 100644
index 0000000..c9b7781
--- /dev/null
+++ b/cluster/prod/app/bagage/deploy/bagage.hcl
@@ -0,0 +1,86 @@
+job "bagage" {
+ datacenters = ["orion", "neptune"]
+ type = "service"
+ priority = 90
+
+ constraint {
+ attribute = "${attr.cpu.arch}"
+ value = "amd64"
+ }
+
+ group "main" {
+ count = 1
+
+ network {
+ port "web_port" {
+ static = 8080
+ to = 8080
+ }
+ port "ssh_port" {
+ static = 2222
+ to = 2222
+ }
+ }
+
+ task "server" {
+ driver = "docker"
+ config {
+ image = "superboum/amd64_bagage:v11"
+ readonly_rootfs = false
+ network_mode = "host"
+ volumes = [
+ "secrets/id_rsa:/id_rsa"
+ ]
+ ports = [ "web_port", "ssh_port" ]
+ }
+
+ env {
+ BAGAGE_LDAP_ENDPOINT = "bottin.service.prod.consul:389"
+ }
+
+ resources {
+ memory = 200
+ cpu = 100
+ }
+
+ template {
+ data = "{{ key \"secrets/bagage/id_rsa\" }}"
+ destination = "secrets/id_rsa"
+ }
+
+ service {
+ name = "bagage-ssh"
+ port = "ssh_port"
+ address_mode = "host"
+ tags = [
+ "bagage",
+ "(diplonat (tcp_port 2222))"
+ ]
+ }
+
+ service {
+ name = "bagage-webdav"
+ tags = [
+ "bagage",
+ "tricot bagage.deuxfleurs.fr",
+ "d53-cname bagage.deuxfleurs.fr",
+ ]
+ port = "web_port"
+ address_mode = "host"
+ check {
+ type = "tcp"
+ port = "web_port"
+ address_mode = "host"
+ interval = "60s"
+ timeout = "5s"
+ check_restart {
+ limit = 3
+ grace = "90s"
+ ignore_warnings = false
+ }
+ }
+ }
+ }
+ }
+}
+