The change adds tooling for testing and deploying the otel-gateway
service.
config.yaml refactoring
use more env vars in the collector config.yaml.
use inline config with basic auth, supplied via env vars. Avoids
needing files mounted in.
add metrics pipeline now we have pro Honeycomb.
Custom docker image:
lightly customised from base image
copy the config.yaml into the image
supply default values for env vars
updates to latest collector in the process
already published to ghcr.io/opensafely-core/otel-gateway
basic test suite
just test-ci will test, using another collector instances as
a fake honeycomb in CI.
just test-integration runs the same tests, but send the data to
honeycomb, if you have HONEYCOMB_KEY set to a valid token.
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.
The change adds tooling for testing and deploying the otel-gateway service.
inline
config with basic auth, supplied via env vars. Avoids needing files mounted in.just test-ci
will test, using another collector instances as a fake honeycomb in CI.just test-integration
runs the same tests, but send the data to honeycomb, if you have HONEYCOMB_KEY set to a valid token.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.