From 155a9f7e4d96072c9a9afe35433b16156d5ddcb9 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 28 Feb 2020 20:08:37 +0100 Subject: Initial Easybridge setup --- nomad/chat.hcl | 102 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 102 insertions(+) (limited to 'nomad') diff --git a/nomad/chat.hcl b/nomad/chat.hcl index 70bacbf..83cc141 100644 --- a/nomad/chat.hcl +++ b/nomad/chat.hcl @@ -38,6 +38,16 @@ job "chat" { destination = "secrets/conf/homeserver.yaml" } + artifact { + source = "http://127.0.0.1:8500/v1/kv/configuration/chat/easybridge/registration.yaml.tpl?raw" + destination = "secrets/tpl/easybridge_registration.yaml.tpl" + mode = "file" + } + template { + source = "secrets/tpl/easybridge_registration.yaml.tpl" + destination = "secrets/conf/easybridge_registration.yaml" + } + artifact { source = "http://127.0.0.1:8500/v1/kv/configuration/chat/fb2mx/registration.yaml?raw" destination = "secrets/tpl/fb2mx_registration.yaml.tpl" @@ -178,6 +188,98 @@ job "chat" { } } */ + + + group "easybridge" { + count = 1 + task "easybridge" { + driver = "docker" + config { + image = "lxpz/easybridge_amd64:5" + port_map { + api_port = 8321 + web_port = 8281 + } + volumes = [ + "secrets/conf:/data" + ] + args = [ "-config", "/data/config.json" ] + } + + artifact { + source = "http://127.0.0.1:8500/v1/kv/configuration/chat/easybridge/registration.yaml.tpl?raw" + destination = "secrets/tpl/registration.yaml.tpl" + mode = "file" + } + template { + source = "secrets/tpl/registration.yaml.tpl" + destination = "secrets/conf/registration.yaml" + } + + artifact { + source = "http://127.0.0.1:8500/v1/kv/configuration/chat/easybridge/config.json.tpl?raw" + destination = "secrets/tpl/config.json.tpl" + mode = "file" + } + template { + source = "secrets/tpl/config.json.tpl" + destination = "secrets/conf/config.json" + } + + resources { + memory = 50 + network { + port "api_port" { + static = "8321" + } + port "web_port" {} + } + } + + service { + name = "easybridge-api" + tags = ["easybridge-api"] + port = "api_port" + address_mode = "host" + check { + type = "tcp" + port = "api_port" + interval = "60s" + timeout = "5s" + check_restart { + limit = 3 + grace = "90s" + ignore_warnings = false + } + } + } + + service { + name = "easybridge-web" + tags = [ + "easybridge-web", + "traefik.enable=true", + "traefik.frontend.entryPoints=https,http", + "traefik.frontend.rule=Host:easybridge.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 + } + } + } + } + } + + group "riotweb" { count = 1 -- cgit v1.2.3 From f0a527ac7fc95bbe5102ddf709a5c4b95d03609c Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Fri, 28 Feb 2020 22:40:31 +0100 Subject: Fix configuration --- nomad/chat.hcl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'nomad') diff --git a/nomad/chat.hcl b/nomad/chat.hcl index 83cc141..ddbb825 100644 --- a/nomad/chat.hcl +++ b/nomad/chat.hcl @@ -195,7 +195,7 @@ job "chat" { task "easybridge" { driver = "docker" config { - image = "lxpz/easybridge_amd64:5" + image = "lxpz/easybridge_amd64:8" port_map { api_port = 8321 web_port = 8281 @@ -227,7 +227,8 @@ job "chat" { } resources { - memory = 50 + memory = 500 + cpu = 1000 network { port "api_port" { static = "8321" -- cgit v1.2.3 From e7a1a16884b774004fc2385b8c67cfa53699547b Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Sat, 29 Feb 2020 15:24:39 +0100 Subject: Reconfigure so that user IDs are as prefixes and not suffixes --- nomad/chat.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nomad') diff --git a/nomad/chat.hcl b/nomad/chat.hcl index ddbb825..c2defd7 100644 --- a/nomad/chat.hcl +++ b/nomad/chat.hcl @@ -195,7 +195,7 @@ job "chat" { task "easybridge" { driver = "docker" config { - image = "lxpz/easybridge_amd64:8" + image = "lxpz/easybridge_amd64:9" port_map { api_port = 8321 web_port = 8281 -- cgit v1.2.3 From 1667c4c5ce4aeec06530e4179e198d8650c5d92a Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Mon, 2 Mar 2020 21:56:45 +0100 Subject: Update easybridge --- nomad/chat.hcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'nomad') diff --git a/nomad/chat.hcl b/nomad/chat.hcl index c2defd7..0b63eca 100644 --- a/nomad/chat.hcl +++ b/nomad/chat.hcl @@ -195,7 +195,7 @@ job "chat" { task "easybridge" { driver = "docker" config { - image = "lxpz/easybridge_amd64:9" + image = "lxpz/easybridge_amd64:14" port_map { api_port = 8321 web_port = 8281 @@ -203,7 +203,7 @@ job "chat" { volumes = [ "secrets/conf:/data" ] - args = [ "-config", "/data/config.json" ] + args = [ "./easybridge", "-config", "/data/config.json" ] } artifact { -- cgit v1.2.3