blob: 9a1bec7be35037c3356b07d8c1f5e0447812f700 [file] [log] [blame]
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +02001local mirko = import "../../kube/mirko.libsonnet";
2local kube = import "../../kube/kube.libsonnet";
3
Sergiusz Bazanskid0ec2c62019-11-21 00:08:52 +01004local smsgw = import "smsgw.libsonnet";
5local ldapweb = import "ldapweb.libsonnet";
Sergiusz Bazanskic315aac2020-01-02 16:43:39 +01006local teleimg = import "teleimg.libsonnet";
Sergiusz Bazanski64946962020-02-02 17:15:55 +01007local frab = import "frab.libsonnet";
Sergiusz Bazanski74818e12020-02-18 22:56:21 +01008local pretalx = import "pretalx.libsonnet";
Serge Bazanski95ba05d2021-05-12 21:28:10 +00009local cebulacamp = import "cebulacamp.libsonnet";
Serge Bazanskid0c9c412021-08-30 20:14:58 +000010local site = import "site.libsonnet";
Sergiusz Bazanskid0ec2c62019-11-21 00:08:52 +010011
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020012{
13 hswaw(name):: mirko.Environment(name) {
14 local env = self,
15 local cfg = self.cfg,
16
17 cfg+: {
Sergiusz Bazanskid0ec2c62019-11-21 00:08:52 +010018 smsgw: smsgw.cfg,
19 ldapweb: ldapweb.cfg,
Sergiusz Bazanskic315aac2020-01-02 16:43:39 +010020 teleimg: teleimg.cfg,
Sergiusz Bazanski64946962020-02-02 17:15:55 +010021 frab: frab.cfg,
Sergiusz Bazanski74818e12020-02-18 22:56:21 +010022 pretalx: pretalx.cfg,
Serge Bazanski95ba05d2021-05-12 21:28:10 +000023 cebulacamp: cebulacamp.cfg,
Serge Bazanskid0c9c412021-08-30 20:14:58 +000024 site: site.cfg,
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020025 },
26
27 components: {
Sergiusz Bazanskid0ec2c62019-11-21 00:08:52 +010028 smsgw: smsgw.component(cfg.smsgw, env),
29 ldapweb: ldapweb.component(cfg.ldapweb, env),
Sergiusz Bazanskia8854882020-01-05 00:34:38 +010030 teleimg: teleimg.teleimg(cfg.teleimg, env),
31 lelegram: teleimg.lelegram(cfg.teleimg, env),
Sergiusz Bazanski64946962020-02-02 17:15:55 +010032 frab: frab.component(cfg.frab, env),
Sergiusz Bazanski74818e12020-02-18 22:56:21 +010033 pretalx: pretalx.component(cfg.pretalx, env),
Serge Bazanski95ba05d2021-05-12 21:28:10 +000034 cebulacamp: cebulacamp.component(cfg.cebulacamp, env),
Serge Bazanskid0c9c412021-08-30 20:14:58 +000035 site: site.component(cfg.site, env),
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020036 },
37 },
38
39 prod: self.hswaw("hswaw-prod") {
40 cfg+: {
41 smsgw+: {
42 secret+: {
43 twilio_token: std.base64(std.split(importstr "secrets/plain/prod-twilio-token", "\n")[0]),
44 },
45 webhookFQDN: "smsgw-webhook-prod.hswaw.net",
Sergiusz Bazanski5b866622019-10-18 14:54:36 +020046 },
47 ldapweb+: {
Sergiusz Bazanski831a54a2019-10-20 17:38:22 +020048 webFQDN: "profile.hackerspace.pl",
Sergiusz Bazanski5b866622019-10-18 14:54:36 +020049 },
Sergiusz Bazanskic315aac2020-01-02 16:43:39 +010050 teleimg+: {
51 webFQDN: "teleimg.hswaw.net",
52 secret+: {
53 telegram_token: std.base64(std.split(importstr "secrets/plain/prod-telegram-token", "\n")[0]),
54 },
55 },
Sergiusz Bazanski64946962020-02-02 17:15:55 +010056 frab+: {
57 storageClassName: "waw-hdd-redundant-3",
58 webFQDN: "frab.hackerspace.pl",
59 secret+: {
60 secretKeyBase: std.base64(std.split(importstr "secrets/plain/prod-frab-smtp-password", "\n")[0]),
61 smtpPassword: std.base64(std.split(importstr "secrets/plain/prod-frab-secret-key-base", "\n")[0]),
62 },
63 },
Sergiusz Bazanski74818e12020-02-18 22:56:21 +010064 pretalx+: {
65 storageClassName: "waw-hdd-redundant-3",
66 webFQDN: "cfp.cebula.camp",
67 smtpPassword: std.base64(std.split(importstr "secrets/plain/prod-pretalx-smtp-password", "\n")[0]),
68 s3+: {
69 credsSecret: import "secrets/plain/prod-pretalx-s3.json",
70 },
71 },
Serge Bazanski95ba05d2021-05-12 21:28:10 +000072 cebulacamp+: {
73 webFQDN: "cebula.camp",
74 },
Serge Bazanskid0c9c412021-08-30 20:14:58 +000075 site+: {
76 webFQDN: "new.hackerspace.pl",
77 },
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020078 },
79 },
80}