opensafely-core / sysadmin

Various scripts and tools for administering OpenSAFELY organisation and infrastructure
0 stars 0 forks source link

Add otel-gateway tests and deploy tooling, enable metrics processing along the way #79

Closed bloodearnest closed 1 year ago

bloodearnest commented 1 year ago

The change adds tooling for testing and deploying the otel-gateway service.

The above changes mean we no longer need any file mounts for the basic auth password, as it's just an env var now. As we copy the config into the image, we also don't need the config mount either. We can do this because a) we have a local test suite to try out config changes, so we don't need to do that in prod anymore and b) we use a lot more env vars so we can tweak things w/o a rebuild.

This change also means that deployment is just a simple dokku git:from-image ..., no need to copy config.

The tests are not ideal, as its currently impossible to test metrics from python. But there's a PR in the works, so hopefully soon. But its a good start.

This change also takes a new approach - having a service maintained from a subdirectory of a project. This is an experiment - it requires some finagling of github actions triggers. But if it works, I'm thinking to move the proxy and backends into this repo in the same way, and move the repoupdator and github management tool into there own subdirs.