1
0
Fork 0
Commit Graph

176 Commits (master)

Author SHA1 Message Date
q3k ec7e0a9dc2 app/matrix: add wellknown server
This is in preparation for spinning up a staging/QA matrix instance,
where the MXID domain is under control by hscloud machinery (and not a
top-level organizational domain).

Change-Id: I10505615ebb407b3b2eac0c1b87ad5625e2009c0
2020-11-05 20:47:04 +01:00
q3k 52e796606f app/matrix: add matrix.0x3c.pl
Change-Id: I1f1d41fd80c08cefd274141ca598526dd466ad24
2020-11-04 00:09:03 +01:00
q3k 21a9616583 app/matrix: finish parametrization, fix running as non-root
This should allow us to run matrix on our default podsecuritypolicy.

Change-Id: I054f527ebab2f499e7a6595e618281a58c82e283
2020-11-04 00:09:03 +01:00
q3k ace32c0360 app/matrix: parametrize configuration
This adds cfg.cas.enable, and parametrizes homeserver.yaml from jsonnet
configuration.

Change-Id: I37a9b27a7080248cdd70282b897bbf6d3f9ae5f6
2020-11-03 22:04:08 +01:00
q3k 60076c70f8 matrix: refactor synapse into library
This is in prepration for bringing up a Matrix server for hsp.sh.

Verified to cause no diff on prod.

Change-Id: Ied2de210692e3ddfdb1d3f37b12893b214c34b0b
2020-11-03 21:36:49 +01:00
informatic cf47f08481 app/covid-formity: enable redis password
This has already been deployed in production

Change-Id: I9c603a4985332d422d8875ecf6f8dca157f32f22
2020-10-10 18:40:45 +00:00
informatic 018d219dc9 Merge changes Ie974e7e8,I0bda7f6e
* changes:
  app/covid-formity: add kurjerzy integration
  app/covid-formity: image update, add /qr1, /manual, /video redirect
2020-10-10 17:13:53 +00:00
q3k c09d8fedcc Merge "app/onlyoffice: init" 2020-09-16 16:59:06 +00:00
q3k 5533ce9075 matrix: bump synapse to 1.19.2
This has already been deployed to production.

Change-Id: I0ebf818193bd161d6565a9ec4eddc785e79d9077
2020-09-16 14:20:09 +00:00
q3k 06b61d4d47 app/onlyoffice: init
This deploys office.hackerspace.pl. It's a collaborative document
editing server that works with Nextcloud.

This is already live, and can be tested with owncloud.hackerspace.pl
(new -> document).

Change-Id: Ic8055a8a6679e7a0695ebb9e41108074d8f789af
2020-09-15 18:23:08 +00:00
q3k 1230ac38b5 matrix: enable metrics
Change-Id: Ia916cb1311ab079153ba37818455170e85e437bc
2020-09-12 22:26:12 +00:00
q3k 1db03c32b6 matrix: fix iOS signup issues by specifying public_baseurl
WHITE
WHALE
HOLY
GRAIL

Complex systems are complex. Let me tell you a story about that.

Matrix clients perform their last stage of login by performing a POST to
/_matrix/client/r0/login on the Matrix homeserver they log in to. How
they reach the Homeserver is specified earlier - either by using
discovery via SRV or .well-known, or by the client manually specifying
the Matrix homeserver URL.

Regardless of how they reach this endpoint in the first place, this POST
endpoint, as per the Matrix Client-Server API Specification (r0.6.1),
MAY return a `well_known` key, which MUST contain a `homeserver`
address, pointing to the address of the homeserver which the client
should talk to. If present, the client SHOULD use that instead of
whatever it connected to so far.

Issue the first: the iOS client requires `well_known` in that response,
and doesn't work otherwise. https://github.com/vector-im/element-ios/issues/3448

Issue the second: Synapse will return `well_known` accordingly, but only
if `public_baseurl` is set in its configuration. It is not required to
be set. If not set, it will simply not return this key.

Shrek the third: we never set `public_baseurl` in Synapse, and the first
issue (iOS needing `well_known`) only became a regression in
https://github.com/vector-im/element-ios/issues/2715 . As such, it was
difficult to troubleshoot this issue, and we kept getting on some red
herrings: is it the SSO? Is our server broken? Is the iOS implementation
broken?

But now we know - https://github.com/vector-im/element-ios/issues/2715
seems to be the true culprit.

Change-Id: I913792e31e3c6813d4e51d4befdba720cad3f532
2020-08-26 18:10:36 +00:00
q3k de6275101b matrix: add Telegram bridge appservice.
Configuring this one is a bit different from appservice-irc. Notably,
there's no way to give it a registration.yaml to overlay on top of a
config, se we end up using an init container with yq to do that for us.

Also, I had to manually copy the regsitration.yaml in synapse, from
/appservices/telegram-prod/registration.yaml to
/data/appservices/telegram-prod.jsonnet, in order to make it work with
the synapse docker start magic. :/

Otherwise, this is deployed and seems to be working.

Change-Id: Id747a0e310221855556c1d280439376f0c4e5ed6
2020-08-24 21:20:39 +00:00
q3k cdba291e7d matrix: split up appservice to separate file
This is in preparation for adding a Telegram bridge appservice. The main
jsonnet file was getting quite chonky.

This does not affect production, and is just a refactor.

Change-Id: I7cdee2bd71aedb40a9f6c3e5148f829023171dcb
2020-08-24 19:14:04 +00:00
q3k c0c037aad9 app/matrix: migrate postgres and data to waw3
The way this was migrated is not to be spoken of.

(hint: it involved downtime, and mounting two volumes at once)

appservice-irc has some storage, we should migrate that to waw3, too. But
it's not as critical.

The new storage (waw3) is _much_ faster.

Change-Id: I4b4bd32e4fedc514753d25bac35d001e8a9c5f00
2020-08-24 19:12:08 +00:00
q3k 1b15dc46ea app/matrix: move appservice-irc to bc01n03
When deploying https://gerrit.hackerspace.pl/c/hscloud/+/401 we manually
re-pinned appservice-irc to run on bc01n03 (to prevent reschedule as
bc01n02 was updated while bc01n03 was already done). This change makes
git reflect production.

Change-Id: I2518a8a227bfacefd9f1905ded5a1d65e379845f
2020-08-23 01:03:00 +02:00
q3k 03c9a5ed86 app/matrix: add q3k to OWNERS
(apparently these don't get inherited?)

Change-Id: Ie0052677585863da6dade8c184e25b8c15ddf42c
2020-08-05 23:04:29 +02:00
q3k 5618a63278 app/matrix: disable password login in synapse
This should, according to a GH issue thread [1] fix some flows (like
session delete) with our CAS configuration.

Not deployed, untested.

[1] - https://github.com/matrix-org/synapse/issues/5667#issuecomment-632040218

Change-Id: Iaf041f07e26d1abfb92caba451ebfbbf899e9964
2020-07-17 11:12:57 +00:00
q3k ec221a0b85 app/matrix: bump synapse, riot-web
This has already been bumped in production, and this change makes it
reflect that.

This was supposed to fix iOS sign-in, but that didn't seem to have
worked.

Change-Id: I9278490e40b332a8439fdf1361f27df770b8cd9e
2020-07-17 12:50:53 +02:00
q3k 735ac9cc7f app/matrix: reflect current production status
At some point someone bumped appservice-irc to 0.17.1 without commiting
this to git. This fixes that, and also drive-by refactors the
appservice-irc image version to live next to all the other version
strings.

`kubecfg diff --diff-strategy=subset prod.jsonnet` now shows no diff.

Change-Id: I90a64d05cc72669de41fa68195672adca2eb37e8
2020-07-17 12:12:38 +02:00
informatic e60250c4eb app/covid-formity: add kurjerzy integration
Change-Id: Ie974e7e83849a0886cd51ba14fe76da10ce8718e
2020-05-21 19:12:19 +02:00
informatic 1be143c3ae app/covid-formity: image update, add /qr1, /manual, /video redirect
Change-Id: I0bda7f6e219404aeb47ea0712e06b974723e5341
2020-04-13 15:16:53 +02:00
q3k 006c1bf8f3 *: add more OWNERS
Change-Id: If2740a0aaee845160b38b8ea0b23fea7bab3bded
2020-04-13 01:46:15 +02:00
q3k 9b50a69c11 Merge "app/matrix: upgrade and migrate to official appservice-irc image" 2020-04-12 12:50:31 +00:00
q3k ddd5c8e6e0 Merge "app/matrix: upgrade and migrate to official riot-web container image" 2020-04-12 12:50:27 +00:00
q3k adb72ccdec Merge "app/matrix: synapse upgrade" 2020-04-12 12:38:09 +00:00
informatic 973076c0fb app/covid-formity: covid19 hackerspace relief form
Change-Id: I952ca040e85e6305d5241816c3afa8ae69031d5f
2020-03-26 21:40:01 +01:00
informatic 57349d2a76 app/matrix: upgrade and migrate to official appservice-irc image
Change-Id: I9104974bd0906739f08239146737c56efde36cfe
2020-03-21 23:35:11 +01:00
informatic aca7e28f69 app/matrix: upgrade and migrate to official riot-web container image
Change-Id: I438e5b6e1bfb4a20bb6613904497e1e8a6d86fc5
2020-03-21 23:35:03 +01:00
informatic 8ebfc1d338 app/matrix: synapse upgrade
Change-Id: Ice5f70be190126da5eecfc1d5ec5c1f746679ec9
2020-03-03 21:01:18 +01:00
q3k 92b48d6216 {matrix,lelegram}: pin to bc01n0{1,2}.hswaw.net
Only these nodes (and bc01n03( are #blesed by freenode.

In the future we should fix this by having custom node labels for
blessed nodes. But this will do for now.

Change-Id: Ia5d7cfcb9329da0de8d596ed40b20b0e0f286f43
2020-01-08 13:59:04 +01:00
q3k 6781f62ec4 Merge "app/radio: add support for following relays" 2019-09-25 12:06:17 +00:00
q3k 2d81427410 app/radio: add support for following relays
Change-Id: Ib079d657239b1bf5294ad8457370d56a0093dd6d
2019-09-25 13:59:08 +02:00
q3k 5f3a5e0310 cluster/kube: emergency fixes after evition
Some pods got evicted. Some of them broke.

  - postgres in matrix and nginx in internet because of the new policies
    (chown issues)
  - cas proxy in matrix because apparently the image was not reuploaded
    to the regsitry after ceph-waw1 died, and another node didn't have it
  - registry because it had a weak image pin an downgraded to some
    broken version on another node

Change-Id: I836036872629843c8ede1b7f67982112c90d71f0
2019-09-25 02:58:15 +02:00
informatic eabbe8a11e app/matrix: update software components, refactor config handling
Dynamic config generation based on environment variables in Synapse is
no longer supported. To pass secrets to container we use a patch that
implements configuration overrides via environment variables directly.
(to be upstreamed...)

Due to Synapse update, appservice configuration ConfigMaps don't need to
be copied into Synapse /data volume anymore.

Change-Id: I70e6480983bfb997362739c6ce0ec3c313320836
2019-08-30 23:21:53 +02:00
informatic b20b366092 app/matrix: change storageclass to waw-hdd-paranoid-2
Change-Id: I757942409f4ef4da69d4cf1925d26dc758c65311
2019-08-30 23:21:53 +02:00
q3k d07861b7df ceph-waw1 -> ceph-waw2
Change-Id: I03d6244b9697a9efc06492114ef90cdb01e17601
2019-08-08 17:49:31 +02:00
q3k f774f2f31d Merge "app/registry: integrate into cluster/kube" 2019-08-02 00:28:10 +00:00
q3k 7fb4acb690 app/factorio -> personal/q3k/factorio
Change-Id: I92be6a726aef306f6f4de4e5a91defa86cda81fc
2019-07-21 15:07:07 +00:00
q3k c4e653ad46 app/internet -> bgpwtf/internet
Change-Id: I66740f68ebfb508d866c742d7849447a3aca45be
2019-07-21 15:06:52 +00:00
q3k 4d61d20aec app/registry: integrate into cluster/kube
This makes a registry be automatically part of the cluster
infrastructure.

Tested by running kubecfg diff, no diffs (apart from out-of-date ACLs)
found.

Change-Id: Ic0635e789cf3fb851f410bcf2865326f1fa87545
2019-07-21 16:56:41 +02:00
q3k 57efce6b02 app/{gerrit,bazel-cache} -> devtools/
Change-Id: I2a98f33c76a59392e644579a1f7064a7c8eaec7c
2019-07-21 16:40:33 +02:00
q3k 9b5359d0f4 app/gerrit: fix advertised address
This should get rid of some :29418 ports publically visible.

Change-Id: Ied3114888ccfdea494580d19e04d88a847d96cfe
2019-07-21 15:38:21 +02:00
q3k b4f6fb3c3b app/registry: allow inf and q3k to push to app/* and go/svc/*
We have quite a bit of them at this point, and we're likely going to use
app/* and go/svc/* for 'core' services only anyway.

Change-Id: Ic315fbd2d672e525439992bfcd9ead730d1a1b71
2019-07-13 17:13:09 +02:00
q3k 4343e9289e Merge "app/internet: initialize with landing page" 2019-07-09 11:24:28 +00:00
q3k 94f8dbf347 app/internet: initialize with landing page
This is already rolled out at https://internet.hackerspace.pl/.

Change-Id: Ibebaeb830a4b58cecfc1ecbf63d07cc63ded7e2b
2019-07-09 13:03:30 +02:00
q3k 0ef497e461 Merge "app/registry: abstract away pushers" 2019-07-09 10:39:40 +00:00
q3k c292410d15 app/factorio: update to 0.17.52
Change-Id: I70230b1f83a40cc70015e135e25319116c6e15e8
2019-06-30 17:35:57 +02:00
q3k 1c825949c4 app/registry: abstract away pushers
Another change I lost somewhere in the process of remembering how to
gerrit.

I rewrote it (lost the original commit), and also added the (upcoming)
egressifier service.

Change-Id: I1647bc3b1e504a192150ab76f4c6d1709e608f0a
2019-06-30 00:37:34 +02:00
q3k a7e26ccfe1 app/gerrit/kube: implement
This change impelements the k8s machinery for Gerrit.

This might look somewhat complex at first, but the gist of it is:

 - k8s mounts etc, git, cache, db, index as RW PVs
 - k8s mounts a configmap containing gerrit.conf into an external
   directory
 - k8s mounts a secret containing secure.conf into an external directory
 - on startup, gerrit's entrypoint will copy over {gerrit,secure}.conf
   and start a small updater script that copies over gerrit.conf if
   there's any change. This should, in theory, make gerrit reload its
   config.

This is already running on production. You're probably looking at this
change through the instance deployed by itself :)

Change-Id: Ida9dff721c17cf4da7fb6ccbb54d2c4024672572
2019-06-21 20:47:53 +02:00
q3k 573da78859 app/gerrit: import OAuth provider and add SSO support
This change:

 - imports gerrit-oauth-provider from upstream
 - adds sso.hackerspae.pl support to it

Change-Id: I92e7053614a9297bf1ced3aac044c0002acd836a
2019-06-21 20:09:01 +02:00
q3k 9d6929f7c0 app/radio: fix fallback mounts, fix admin login 2019-06-20 12:52:38 +02:00
q3k c807f86b6a app/radio: lower resource requests and limits 2019-06-19 16:18:28 +02:00
q3k f9281d844f app/radio: add standby 2019-06-19 14:55:11 +02:00
q3k 610bec40a2 app/radio: init 2019-06-19 14:31:19 +02:00
q3k 4b1d4ca257 app/registry: allow app/radio to q3k 2019-06-19 14:09:31 +02:00
informatic 77c0162a6f Merge branch 'feature/matrix' 2019-05-23 16:35:42 +02:00
informatic 3ea979dab5 app/matrix: forward IP to synapse 2019-05-23 16:11:52 +02:00
q3k cb5c321f80 app/factorio: implement kube 2019-05-19 03:10:17 +02:00
q3k 644f9ff57e app/factorio: multiple versions 2019-05-19 03:09:47 +02:00
q3k 6586533bb3 app/factorio: build docker image 2019-05-18 16:23:45 +02:00
q3k 36cc4fb61a bazel-cache: deploy, add waw-hdd-yolo-1 ceph pool 2019-05-17 18:09:39 +02:00
informatic aa0e755389 app/matrix: bump oauth2-cas-proxy for service_url security 2019-05-17 12:55:48 +02:00
informatic 9ab9f61a67 app/matrix: bump riot-web version to fix broken SSO 2019-05-17 09:53:13 +02:00
informatic c39fb04451 app/matrix: initial oauth2/casproxy setup 2019-05-17 09:13:56 +02:00
informatic fef4c12ca1 app/matrix: appservice-irc 2019-05-16 21:05:02 +02:00
informatic ffbb47c2b3 app/matrix: svc usage cleanup 2019-05-16 12:18:39 +02:00
informatic 4b4231d900 app/matrix: disable piwik & 3pid auth, allow guest login, fix roomDirectory 2019-05-15 11:41:32 +02:00
informatic a222691ca5 app/matrix: initial matrix test deployment WIP 2019-05-14 18:49:29 +02:00
q3k b245865087 app/registry: allow anonymous pull access and temporary vms/ push access 2019-04-19 14:41:10 +02:00
informatic 7adc0eb998 app/registry: migrate to ceph object storage 2019-04-09 22:39:42 +02:00
informatic 6da3b288dc WIP: app/registry: ceph object storage 2019-04-09 13:48:21 +02:00
q3k 6916f7e244 app/toot: start implementing redis 2019-04-04 16:54:00 +02:00
informatic ac38d5aeb1 app/registry: oauth2 authentication 2019-04-03 08:41:20 +02:00
informatic 6dc4839d74 app/registry: initial docker registry setup 2019-04-02 18:59:37 +02:00
q3k 5f2dc8530d toot: wip 2019-04-02 02:36:22 +02:00