blob: adb10a81a405f58358c4adcc9b489ea91d18ca93 [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),
Piotr Dobrowolski8e22f6c2023-05-10 22:20:13 +020035 pretalx: pretalx.component(cfg.pretalx, env) {
36 cronjob: null,
37 },
Serge Bazanski95ba05d2021-05-12 21:28:10 +000038 cebulacamp: cebulacamp.component(cfg.cebulacamp, env),
Serge Bazanskid0c9c412021-08-30 20:14:58 +000039 site: site.component(cfg.site, env),
Serge Bazanski0aa29102023-04-01 23:18:05 +000040 capacifier: capacifier.component(cfg.capacifier, env),
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020041 },
42 },
43
44 prod: self.hswaw("hswaw-prod") {
45 cfg+: {
46 smsgw+: {
47 secret+: {
48 twilio_token: std.base64(std.split(importstr "secrets/plain/prod-twilio-token", "\n")[0]),
49 },
50 webhookFQDN: "smsgw-webhook-prod.hswaw.net",
Sergiusz Bazanski5b866622019-10-18 14:54:36 +020051 },
52 ldapweb+: {
Sergiusz Bazanski831a54a2019-10-20 17:38:22 +020053 webFQDN: "profile.hackerspace.pl",
Sergiusz Bazanski5b866622019-10-18 14:54:36 +020054 },
Sergiusz Bazanskic315aac2020-01-02 16:43:39 +010055 teleimg+: {
56 webFQDN: "teleimg.hswaw.net",
57 secret+: {
58 telegram_token: std.base64(std.split(importstr "secrets/plain/prod-telegram-token", "\n")[0]),
59 },
60 },
Sergiusz Bazanski64946962020-02-02 17:15:55 +010061 frab+: {
62 storageClassName: "waw-hdd-redundant-3",
63 webFQDN: "frab.hackerspace.pl",
64 secret+: {
65 secretKeyBase: std.base64(std.split(importstr "secrets/plain/prod-frab-smtp-password", "\n")[0]),
66 smtpPassword: std.base64(std.split(importstr "secrets/plain/prod-frab-secret-key-base", "\n")[0]),
67 },
68 },
Sergiusz Bazanski74818e12020-02-18 22:56:21 +010069 pretalx+: {
70 storageClassName: "waw-hdd-redundant-3",
71 webFQDN: "cfp.cebula.camp",
72 smtpPassword: std.base64(std.split(importstr "secrets/plain/prod-pretalx-smtp-password", "\n")[0]),
73 s3+: {
74 credsSecret: import "secrets/plain/prod-pretalx-s3.json",
75 },
76 },
Serge Bazanski95ba05d2021-05-12 21:28:10 +000077 cebulacamp+: {
78 webFQDN: "cebula.camp",
79 },
Serge Bazanskid0c9c412021-08-30 20:14:58 +000080 site+: {
81 webFQDN: "new.hackerspace.pl",
82 },
Serge Bazanski0aa29102023-04-01 23:18:05 +000083 capacifier+: {
84 ldapBindPassword: std.base64(std.split(importstr "secrets/plain/prod-capacifier-password", "\n")[0]),
85 },
Sergiusz Bazanski6f773e02019-10-02 20:46:48 +020086 },
87 },
88}