From d0c9c414cfdd5f78e13730f4db2ff313a53d7e19 Mon Sep 17 00:00:00 2001 From: Serge Bazanski Date: Mon, 30 Aug 2021 20:14:58 +0000 Subject: [PATCH] hswaw/site: deploy Change-Id: I2ea68f07c81859ffea99ad5b107b14876422288b --- hswaw/kube/hswaw.jsonnet | 6 ++++++ hswaw/kube/site.libsonnet | 26 ++++++++++++++++++++++++++ hswaw/site/BUILD.bazel | 2 +- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 hswaw/kube/site.libsonnet diff --git a/hswaw/kube/hswaw.jsonnet b/hswaw/kube/hswaw.jsonnet index 41ff73d9..9a1bec7b 100644 --- a/hswaw/kube/hswaw.jsonnet +++ b/hswaw/kube/hswaw.jsonnet @@ -7,6 +7,7 @@ local teleimg = import "teleimg.libsonnet"; local frab = import "frab.libsonnet"; local pretalx = import "pretalx.libsonnet"; local cebulacamp = import "cebulacamp.libsonnet"; +local site = import "site.libsonnet"; { hswaw(name):: mirko.Environment(name) { @@ -20,6 +21,7 @@ local cebulacamp = import "cebulacamp.libsonnet"; frab: frab.cfg, pretalx: pretalx.cfg, cebulacamp: cebulacamp.cfg, + site: site.cfg, }, components: { @@ -30,6 +32,7 @@ local cebulacamp = import "cebulacamp.libsonnet"; frab: frab.component(cfg.frab, env), pretalx: pretalx.component(cfg.pretalx, env), cebulacamp: cebulacamp.component(cfg.cebulacamp, env), + site: site.component(cfg.site, env), }, }, @@ -69,6 +72,9 @@ local cebulacamp = import "cebulacamp.libsonnet"; cebulacamp+: { webFQDN: "cebula.camp", }, + site+: { + webFQDN: "new.hackerspace.pl", + }, }, }, } diff --git a/hswaw/kube/site.libsonnet b/hswaw/kube/site.libsonnet new file mode 100644 index 00000000..5054ceb2 --- /dev/null +++ b/hswaw/kube/site.libsonnet @@ -0,0 +1,26 @@ +local mirko = import "../../kube/mirko.libsonnet"; +local kube = import "../../kube/kube.libsonnet"; + +{ + cfg:: { + image: "registry.k0.hswaw.net/q3k/hswaw-site:1630354516-e2bbf5901bcc2c3c260455017fafa1728568d1c2", + webFQDN: error "webFQDN must be set", + }, + + component(cfg, env):: mirko.Component(env, "site") { + local site = self, + cfg+: { + image: cfg.image, + container: site.GoContainer("main", "/hswaw/site/site") { + }, + ports+: { + publicHTTP: { + web: { + port: 8080, + dns: cfg.webFQDN, + } + }, + }, + }, + }, +} diff --git a/hswaw/site/BUILD.bazel b/hswaw/site/BUILD.bazel index fa2769e0..6218defc 100644 --- a/hswaw/site/BUILD.bazel +++ b/hswaw/site/BUILD.bazel @@ -42,5 +42,5 @@ container_push( format = "Docker", registry = "registry.k0.hswaw.net", repository = "q3k/hswaw-site", - tag = "1626124964-{STABLE_GIT_COMMIT}", + tag = "1630354516-{STABLE_GIT_COMMIT}", )