From de53567a4b49fa8700cd774c66da8b179dca08cd Mon Sep 17 00:00:00 2001 From: Yurii Kovalchuk Date: Thu, 30 May 2024 12:57:38 +0300 Subject: [PATCH 1/3] ATOR-262 - fix volume name --- operations/deploy-stage.hcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operations/deploy-stage.hcl b/operations/deploy-stage.hcl index 9886648..423e7e5 100755 --- a/operations/deploy-stage.hcl +++ b/operations/deploy-stage.hcl @@ -15,10 +15,10 @@ job "api-service-stage" { } } - volume "api-service-live" { + volume "api-service-stage" { type = "host" read_only = false - source = "api-service-live" + source = "api-service-stage" } task "api-service-stage-task" { From fdf7db185ea25aa25b1197ff0fb50d9ed3566a90 Mon Sep 17 00:00:00 2001 From: Sergey Klimuk Date: Tue, 9 Jul 2024 13:00:27 +0300 Subject: [PATCH 2/3] enable logging to grafana --- operations/deploy-dev.hcl | 6 ++++++ operations/deploy-live.hcl | 6 ++++++ operations/deploy-stage.hcl | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/operations/deploy-dev.hcl b/operations/deploy-dev.hcl index 1b06c51..1ea91c2 100755 --- a/operations/deploy-dev.hcl +++ b/operations/deploy-dev.hcl @@ -48,6 +48,11 @@ job "api-service-dev" { read_only = false } + service { + name = "api-service-dev" + tags = [ "logging" ] + } + config { image = "svforte/api-service:latest-dev" force_pull = true @@ -85,6 +90,7 @@ job "api-service-dev" { name = "api-service-dev" port = "http-port" tags = [ + "logging", "traefik.enable=true", "traefik.http.routers.api-dev.rule=Host(`api-dev.dmz.ator.dev`)", "traefik.http.routers.api-dev.entrypoints=https", diff --git a/operations/deploy-live.hcl b/operations/deploy-live.hcl index 0da784c..cb03cf6 100755 --- a/operations/deploy-live.hcl +++ b/operations/deploy-live.hcl @@ -53,6 +53,11 @@ job "api-service-live" { force_pull = true } + service { + name = "api-service-live" + tags = [ "logging" ] + } + resources { cpu = 256 memory = 256 @@ -85,6 +90,7 @@ job "api-service-live" { name = "api-service-live" port = "http-port" tags = [ + "logging", "traefik.enable=true", "traefik.http.routers.api-live.rule=Host(`api-live.dmz.ator.dev`)", "traefik.http.routers.api-live.entrypoints=https", diff --git a/operations/deploy-stage.hcl b/operations/deploy-stage.hcl index 2e1ebfb..377402a 100755 --- a/operations/deploy-stage.hcl +++ b/operations/deploy-stage.hcl @@ -53,6 +53,11 @@ job "api-service-stage" { force_pull = true } + service { + name = "api-service-stage" + tags = [ "logging" ] + } + resources { cpu = 256 memory = 256 @@ -85,6 +90,7 @@ job "api-service-stage" { name = "api-service-stage" port = "http-port" tags = [ + "logging", "traefik.enable=true", "traefik.http.routers.api-stage.rule=Host(`api-stage.dmz.ator.dev`)", "traefik.http.routers.api-stage.entrypoints=https", From 4241c7dedab4dc11f370a92fef4c745de20a0b41 Mon Sep 17 00:00:00 2001 From: kanshi <46557+kanshi@users.noreply.github.com> Date: Mon, 26 Aug 2024 18:36:55 +0200 Subject: [PATCH 3/3] Register service in renamed domain schema --- README.md | 6 +++--- operations/deploy-dev.hcl | 9 +++++++++ operations/deploy-live.hcl | 9 +++++++++ operations/deploy-stage.hcl | 9 +++++++++ 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6201ac7..0a9890f 100755 --- a/README.md +++ b/README.md @@ -5,9 +5,9 @@ Not all metrics are available, only specific ones. There are 3 different instances of the service running for each environment: -- https://api-dev.dmz.ator.dev -- https://api-stage.dmz.ator.dev -- https://api-live.dmz.ator.dev +- https://api-dev.ec.anyone.tech +- https://api-stage.ec.anyone.tech +- https://api.ec.anyone.tech For now there are only three metrics endpoints on each environment available: diff --git a/operations/deploy-dev.hcl b/operations/deploy-dev.hcl index 1ea91c2..1d95405 100755 --- a/operations/deploy-dev.hcl +++ b/operations/deploy-dev.hcl @@ -99,6 +99,15 @@ job "api-service-dev" { "traefik.http.routers.api-dev.middlewares=api-dev-ratelimit", "traefik.http.middlewares.api-dev-ratelimit.ratelimit.average=30", "traefik.http.middlewares.api-dev-ratelimit.ratelimit.period=1m", + + "traefik-ec.enable=true", + "traefik-ec.http.routers.api-dev.rule=Host(`api-dev.ec.anyone.tech`)", + "traefik-ec.http.routers.api-dev.entrypoints=https", + "traefik-ec.http.routers.api-dev.tls=true", + "traefik-ec.http.routers.api-dev.tls.certresolver=anyoneresolver", + "traefik-ec.http.routers.api-dev.middlewares=api-dev-ratelimit", + "traefik-ec.http.middlewares.api-dev-ratelimit.ratelimit.average=30", + "traefik-ec.http.middlewares.api-dev-ratelimit.ratelimit.period=1m", ] check { name = "Api service check" diff --git a/operations/deploy-live.hcl b/operations/deploy-live.hcl index cb03cf6..28fccb4 100755 --- a/operations/deploy-live.hcl +++ b/operations/deploy-live.hcl @@ -99,6 +99,15 @@ job "api-service-live" { "traefik.http.routers.api-live.middlewares=api-live-ratelimit", "traefik.http.middlewares.api-live-ratelimit.ratelimit.average=300", "traefik.http.middlewares.api-live-ratelimit.ratelimit.period=1m", + + "traefik-ec.enable=true", + "traefik-ec.http.routers.api-live.rule=Host(`api.ec.anyone.tech`)", + "traefik-ec.http.routers.api-live.entrypoints=https", + "traefik-ec.http.routers.api-live.tls=true", + "traefik-ec.http.routers.api-live.tls.certresolver=anyoneresolver", + "traefik-ec.http.routers.api-live.middlewares=api-live-ratelimit", + "traefik-ec.http.middlewares.api-live-ratelimit.ratelimit.average=300", + "traefik-ec.http.middlewares.api-live-ratelimit.ratelimit.period=1m", ] check { name = "Api service check" diff --git a/operations/deploy-stage.hcl b/operations/deploy-stage.hcl index 377402a..03c69e4 100755 --- a/operations/deploy-stage.hcl +++ b/operations/deploy-stage.hcl @@ -99,6 +99,15 @@ job "api-service-stage" { "traefik.http.routers.api-stage.middlewares=api-stage-ratelimit", "traefik.http.middlewares.api-stage-ratelimit.ratelimit.average=300", "traefik.http.middlewares.api-stage-ratelimit.ratelimit.period=1m", + + "traefik-ec.enable=true", + "traefik-ec.http.routers.api-stage.rule=Host(`api-stage.ec.anyone.tech`)", + "traefik-ec.http.routers.api-stage.entrypoints=https", + "traefik-ec.http.routers.api-stage.tls=true", + "traefik-ec.http.routers.api-stage.tls.certresolver=anyoneresolver", + "traefik-ec.http.routers.api-stage.middlewares=api-stage-ratelimit", + "traefik-ec.http.middlewares.api-stage-ratelimit.ratelimit.average=300", + "traefik-ec.http.middlewares.api-stage-ratelimit.ratelimit.period=1m", ] check { name = "Api service check"