blob: 7918043e9a17347ca4940c1f3027792715c461e9 [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";
Serge Bazanski0aa29102023-04-01 23:18:05 +000011local capacifier = import "capacifier.libsonnet";
Sergiusz Bazanskid0ec2c62019-11-21 00:08:52 +010012
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020013{
14 hswaw(name):: mirko.Environment(name) {
15 local env = self,
16 local cfg = self.cfg,
17
18 cfg+: {
Sergiusz Bazanskid0ec2c62019-11-21 00:08:52 +010019 smsgw: smsgw.cfg,
20 ldapweb: ldapweb.cfg,
Sergiusz Bazanskic315aac2020-01-02 16:43:39 +010021 teleimg: teleimg.cfg,
Sergiusz Bazanski64946962020-02-02 17:15:55 +010022 frab: frab.cfg,
Sergiusz Bazanski74818e12020-02-18 22:56:21 +010023 pretalx: pretalx.cfg,
Serge Bazanski95ba05d2021-05-12 21:28:10 +000024 cebulacamp: cebulacamp.cfg,
Serge Bazanskid0c9c412021-08-30 20:14:58 +000025 site: site.cfg,
Serge Bazanski0aa29102023-04-01 23:18:05 +000026 capacifier: capacifier.cfg,
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020027 },
28
29 components: {
Sergiusz Bazanskid0ec2c62019-11-21 00:08:52 +010030 smsgw: smsgw.component(cfg.smsgw, env),
31 ldapweb: ldapweb.component(cfg.ldapweb, env),
Sergiusz Bazanskia8854882020-01-05 00:34:38 +010032 teleimg: teleimg.teleimg(cfg.teleimg, env),
33 lelegram: teleimg.lelegram(cfg.teleimg, env),
Sergiusz Bazanski64946962020-02-02 17:15:55 +010034 frab: frab.component(cfg.frab, env),
Sergiusz Bazanski74818e12020-02-18 22:56:21 +010035 pretalx: pretalx.component(cfg.pretalx, env),
Serge Bazanski95ba05d2021-05-12 21:28:10 +000036 cebulacamp: cebulacamp.component(cfg.cebulacamp, env),
Serge Bazanskid0c9c412021-08-30 20:14:58 +000037 site: site.component(cfg.site, env),
Serge Bazanski0aa29102023-04-01 23:18:05 +000038 capacifier: capacifier.component(cfg.capacifier, env),
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020039 },
40 },
41
42 prod: self.hswaw("hswaw-prod") {
43 cfg+: {
44 smsgw+: {
45 secret+: {
46 twilio_token: std.base64(std.split(importstr "secrets/plain/prod-twilio-token", "\n")[0]),
47 },
48 webhookFQDN: "smsgw-webhook-prod.hswaw.net",
Sergiusz Bazanski5b866622019-10-18 14:54:36 +020049 },
50 ldapweb+: {
Sergiusz Bazanski831a54a2019-10-20 17:38:22 +020051 webFQDN: "profile.hackerspace.pl",
Sergiusz Bazanski5b866622019-10-18 14:54:36 +020052 },
Sergiusz Bazanskic315aac2020-01-02 16:43:39 +010053 teleimg+: {
54 webFQDN: "teleimg.hswaw.net",
55 secret+: {
56 telegram_token: std.base64(std.split(importstr "secrets/plain/prod-telegram-token", "\n")[0]),
57 },
58 },
Sergiusz Bazanski64946962020-02-02 17:15:55 +010059 frab+: {
60 storageClassName: "waw-hdd-redundant-3",
61 webFQDN: "frab.hackerspace.pl",
62 secret+: {
63 secretKeyBase: std.base64(std.split(importstr "secrets/plain/prod-frab-smtp-password", "\n")[0]),
64 smtpPassword: std.base64(std.split(importstr "secrets/plain/prod-frab-secret-key-base", "\n")[0]),
65 },
66 },
Sergiusz Bazanski74818e12020-02-18 22:56:21 +010067 pretalx+: {
68 storageClassName: "waw-hdd-redundant-3",
69 webFQDN: "cfp.cebula.camp",
70 smtpPassword: std.base64(std.split(importstr "secrets/plain/prod-pretalx-smtp-password", "\n")[0]),
71 s3+: {
72 credsSecret: import "secrets/plain/prod-pretalx-s3.json",
73 },
74 },
Serge Bazanski95ba05d2021-05-12 21:28:10 +000075 cebulacamp+: {
76 webFQDN: "cebula.camp",
77 },
Serge Bazanskid0c9c412021-08-30 20:14:58 +000078 site+: {
79 webFQDN: "new.hackerspace.pl",
80 },
Serge Bazanski0aa29102023-04-01 23:18:05 +000081 capacifier+: {
82 ldapBindPassword: std.base64(std.split(importstr "secrets/plain/prod-capacifier-password", "\n")[0]),
83 },
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020084 },
85 },
86}