From a23e08ce20887efb4e158a02ffee1f775a0db89f Mon Sep 17 00:00:00 2001 From: Quentin Date: Sat, 12 Sep 2020 20:17:07 +0200 Subject: Refactor 2 --- app/deployment/bottin2.hcl | 116 ++++++++++ app/deployment/core.hcl | 43 ++++ app/deployment/email.hcl | 475 ++++++++++++++++++++++++++++++++++++++ app/deployment/garage.hcl | 99 ++++++++ app/deployment/im.hcl | 361 +++++++++++++++++++++++++++++ app/deployment/jitsi.hcl | 258 +++++++++++++++++++++ app/deployment/mariadb.hcl | 69 ++++++ app/deployment/nextcloud.hcl | 67 ++++++ app/deployment/object_storage.hcl | 159 +++++++++++++ app/deployment/platoo.hcl | 64 +++++ app/deployment/postgres.hcl | 145 ++++++++++++ app/deployment/science.hcl | 58 +++++ app/deployment/seafile.hcl | 174 ++++++++++++++ app/deployment/traefik.hcl | 68 ++++++ app/deployment/web_static.hcl | 113 +++++++++ app/deployment/webcap.hcl | 56 +++++ 16 files changed, 2325 insertions(+) create mode 100644 app/deployment/bottin2.hcl create mode 100644 app/deployment/core.hcl create mode 100644 app/deployment/email.hcl create mode 100644 app/deployment/garage.hcl create mode 100644 app/deployment/im.hcl create mode 100644 app/deployment/jitsi.hcl create mode 100644 app/deployment/mariadb.hcl create mode 100644 app/deployment/nextcloud.hcl create mode 100644 app/deployment/object_storage.hcl create mode 100644 app/deployment/platoo.hcl create mode 100644 app/deployment/postgres.hcl create mode 100644 app/deployment/science.hcl create mode 100644 app/deployment/seafile.hcl create mode 100644 app/deployment/traefik.hcl create mode 100644 app/deployment/web_static.hcl create mode 100644 app/deployment/webcap.hcl (limited to 'app/deployment') diff --git a/app/deployment/bottin2.hcl b/app/deployment/bottin2.hcl new file mode 100644 index 0000000..85bda59 --- /dev/null +++ b/app/deployment/bottin2.hcl @@ -0,0 +1,116 @@ +job "directory2" { + datacenters = ["dc1"] + type = "service" + + constraint { + attribute = "${attr.cpu.arch}" + value = "amd64" + } + + group "bottin" { + count = 1 + task "bottin" { + driver = "docker" + config { + image = "lxpz/bottin_amd64:14" + readonly_rootfs = true + port_map { + ldap_port = 1389 + } + volumes = [ + "secrets/config.json:/config.json" + ] + } + + resources { + memory = 100 + network { + port "ldap_port" { + static = "389" + } + } + } + + template { + data = "{{ key \"configuration/directory/bottin/config.json\" }}" + destination = "secrets/config.json" + } + + service { + tags = ["bottin"] + port = "ldap_port" + address_mode = "host" + name = "bottin2" + check { + type = "tcp" + port = "ldap_port" + interval = "60s" + timeout = "5s" + check_restart { + limit = 3 + grace = "90s" + ignore_warnings = false + } + } + } + } + } + + group "guichet" { + count = 1 + task "guichet" { + driver = "docker" + config { + image = "lxpz/guichet_amd64:10" + readonly_rootfs = true + port_map { + web_port = 9991 + } + 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" + destination = "secrets/config.json" + } + + resources { + memory = 200 + network { + port "web_port" {} + } + } + + service { + name = "guichet" + tags = [ + "guichet", + "traefik.enable=true", + "traefik.frontend.entryPoints=https,http", + "traefik.frontend.rule=Host:guichet.deuxfleurs.fr", + ] + port = "web_port" + address_mode = "host" + check { + type = "tcp" + port = "web_port" + interval = "60s" + timeout = "5s" + check_restart { + limit = 3 + grace = "90s" + ignore_warnings = false + } + } + } + } + } +} + diff --git a/app/deployment/core.hcl b/app/deployment/core.hcl new file mode 100644 index 0000000..43774a6 --- /dev/null +++ b/app/deployment/core.hcl @@ -0,0 +1,43 @@ +job "core" { + datacenters = ["dc1"] + type = "system" + + constraint { + attribute = "${attr.cpu.arch}" + value = "amd64" + } + + update { + max_parallel = 1 + stagger = "1m" + } + + group "network" { + task "diplonat" { + driver = "docker" + + config { + image = "darkgallium/amd64_diplonat:v2" + network_mode = "host" + readonly_rootfs = true + privileged = true + } + + template { + data = < Date: Sat, 12 Sep 2020 22:18:30 +0200 Subject: Fix videobridge --- app/deployment/jitsi.hcl | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'app/deployment') diff --git a/app/deployment/jitsi.hcl b/app/deployment/jitsi.hcl index 4ef2f98..8f98d61 100644 --- a/app/deployment/jitsi.hcl +++ b/app/deployment/jitsi.hcl @@ -1,9 +1,3 @@ -/* - * WIP WIP WIP WIP - * - * + NEED TO SET ENV VARIABLES - */ - job "jitsi" { datacenters = ["dc1"] type = "service" @@ -17,7 +11,7 @@ job "jitsi" { task "xmpp" { driver = "docker" config { - image = "superboum/amd64_jitsi_xmpp:v1" + image = "superboum/amd64_jitsi_xmpp:v2" network_mode = "host" port_map { xmpp_port = 5222 @@ -93,7 +87,7 @@ job "jitsi" { task "front" { driver = "docker" config { - image = "superboum/amd64_jitsi_front:v5" + image = "superboum/amd64_jitsi_meet:v1" network_mode = "host" port_map { https_port = 443 @@ -157,7 +151,7 @@ job "jitsi" { task "jicofo" { driver = "docker" config { - image = "superboum/amd64_jitsi_conference_focus:v2" + image = "superboum/amd64_jitsi_conference_focus:v3" network_mode = "host" } @@ -189,7 +183,7 @@ job "jitsi" { task "videobridge" { driver = "docker" config { - image = "superboum/amd64_jitsi_videobridge:v9" + image = "superboum/amd64_jitsi_videobridge:v10" network_mode = "host" port_map { video1_port = 8080 -- cgit v1.2.3 From c40095d02c12c9bd2dd1e0f196eddb9d31343109 Mon Sep 17 00:00:00 2001 From: Quentin Date: Sat, 12 Sep 2020 23:18:02 +0200 Subject: WIP jitsi --- app/deployment/jitsi.hcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/deployment') diff --git a/app/deployment/jitsi.hcl b/app/deployment/jitsi.hcl index 8f98d61..2ab5b11 100644 --- a/app/deployment/jitsi.hcl +++ b/app/deployment/jitsi.hcl @@ -151,7 +151,7 @@ job "jitsi" { task "jicofo" { driver = "docker" config { - image = "superboum/amd64_jitsi_conference_focus:v3" + image = "superboum/amd64_jitsi_conference_focus:v4" network_mode = "host" } @@ -183,7 +183,7 @@ job "jitsi" { task "videobridge" { driver = "docker" config { - image = "superboum/amd64_jitsi_videobridge:v10" + image = "superboum/amd64_jitsi_videobridge:v13" network_mode = "host" port_map { video1_port = 8080 -- cgit v1.2.3 From d5bfc38fe826aa12f46de64790195cc8e76756de Mon Sep 17 00:00:00 2001 From: Quentin Date: Sun, 13 Sep 2020 12:00:48 +0200 Subject: Final step for jitsi --- app/deployment/jitsi.hcl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/deployment') diff --git a/app/deployment/jitsi.hcl b/app/deployment/jitsi.hcl index 2ab5b11..c1bee73 100644 --- a/app/deployment/jitsi.hcl +++ b/app/deployment/jitsi.hcl @@ -11,7 +11,7 @@ job "jitsi" { task "xmpp" { driver = "docker" config { - image = "superboum/amd64_jitsi_xmpp:v2" + image = "superboum/amd64_jitsi_xmpp:v4" network_mode = "host" port_map { xmpp_port = 5222 @@ -151,7 +151,7 @@ job "jitsi" { task "jicofo" { driver = "docker" config { - image = "superboum/amd64_jitsi_conference_focus:v4" + image = "superboum/amd64_jitsi_conference_focus:v5" network_mode = "host" } @@ -183,7 +183,7 @@ job "jitsi" { task "videobridge" { driver = "docker" config { - image = "superboum/amd64_jitsi_videobridge:v13" + image = "superboum/amd64_jitsi_videobridge:v15" network_mode = "host" port_map { video1_port = 8080 -- cgit v1.2.3