sourcegraph/docker-images
Robert Lin 7d91894a01
chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171)
Thread:
https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1717797870638299

One problem caused by this upgrade is that the [deprecated
`jaegerexporter`](https://github.com/open-telemetry/opentelemetry-specification/pull/2858)
no longer builds at all with the last published version, so for the
upgrade to go through it must be removed. I've updated local `sg start`
to work with this change, but some Release team support is needed for
deployment configuration + customer-facing docs changes:
https://sourcegraph.slack.com/archives/C1JH2BEHZ/p1718143249191349?thread_ts=1717797870.638299&cid=C1JH2BEHZ,
since current guidance asks customers to configure `jaegerexporter`.

Part of https://linear.app/sourcegraph/issue/SEC-1680

Closes https://linear.app/sourcegraph/issue/CORE-177

## Test plan

Followed steps shared in
https://sourcegraph.slack.com/archives/C04MYFW01NV/p1718136211292469 to
run locally, since `sg run jaeger otel-collector` alone is insufficient
to get updated images:

```diff
diff --git a/wolfi-images/opentelemetry-collector.yaml b/wolfi-images/opentelemetry-collector.yaml
index b995a3d531b..76de80d4f84 100644
--- a/wolfi-images/opentelemetry-collector.yaml
+++ b/wolfi-images/opentelemetry-collector.yaml
@@ -7,7 +7,11 @@ contents:
     - mailcap
 
     ## opentelemetry-collector packages
-    - opentelemetry-collector@sourcegraph
+    - opentelemetry-collector@branch
+  keyring:
+    - https://packages.sgdev.org/sourcegraph-melange-dev.rsa.pub
+  repositories:
+    - '@branch https://packages.sgdev.org/branches/otel-collector-upgrade'
 
 paths:
   - path: /otel-collector
```

plus `sg wolfi lock opentelemetry-collector` will make `sg run
otel-collector` use the correct image.

**The above diffs SHOULD NOT be committed. The lock should happen
post-merge.**

Spot-checked some traces locally with:

```
sg run jaeger otel-collector
sg start
```


![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/dff88d5a-db9a-4039-b7ba-682e120bdc41)


![image](https://github.com/sourcegraph/sourcegraph/assets/23356519/7e553894-0026-47de-ae38-ba5502b94c63)


## Changelog 

- OpenTelemetry Collector: Upgraded OpenTelemetry Collector to v0.103.0
- OpenTelemetry Collector: The [deprecated `jaegerexporter` has been
removed](https://github.com/open-telemetry/opentelemetry-specification/pull/2858).
Users of `exporter: { jaeger: ... }` in the OpenTelemetry Collector
should use `exporter: { otlp/jaeger: ... }` to send traces directly to
Jaeger via its OTLP receiver.
- Users of the default Jaeger configurations now need to provide
`JAEGER_OTLP_GRPC_PORT` as well as the existing `JAEGER_HOST`
configuration.

---------

Co-authored-by: Anish Lakhwara <anish+github@lakhwara.com>
Co-authored-by: Anish Lakhwara <anish+git@lakhwara.com>
2024-07-10 09:01:41 -07:00
..
alpine-3.14 bazel: use transitions to apply cross-compile platform automatically to oci_image (#60569) 2024-02-20 13:57:56 +00:00
blobstore bazel: Add container test for s3proxy (#62893) 2024-05-24 14:02:37 +01:00
caddy chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
cadvisor chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
codeinsights-db bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
codeintel-db bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
dind Reapply "bazel: migrate dind dockerfile to rules_oci" (#61790) (#61824) 2024-04-12 15:52:44 +00:00
executor-vm Publish sourcegraph-base image (#62002) 2024-04-19 14:44:06 +01:00
grafana chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
indexed-searcher chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
initcontainer chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
jaeger-agent chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
jaeger-all-in-one chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) 2024-07-10 09:01:41 -07:00
node-exporter chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
opentelemetry-collector chore/otel-collector: upgrade to v0.103.0, remove jaegerexporter (#63171) 2024-07-10 09:01:41 -07:00
postgres_exporter chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
postgres-12-alpine chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
prometheus chore/deps: upgrade alertmanager package dependency, improve logs and tests (#63329) 2024-06-19 13:46:30 -07:00
redis_exporter chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
redis-cache chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
redis-store chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
search-indexer chore(bazel): update ownership tags to increase coverage (#63001) 2024-05-31 14:10:29 +00:00
sg bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
syntax-highlighter Syntactic indexing produce scip files (#63580) 2024-07-09 13:49:55 +02:00
README.md enterprise: Move last directory out (#57392) 2023-10-05 20:15:40 +00:00

Sourcegraph derivative Docker images

This directory contains Sourcegraph docker images which are derivatives of an existing Docker image, but with better defaults for our use cases. For example:

  • sourcegraph/alpine handles setting up a sourcegraph user account, installing common packages.
  • sourcegraph/postgres-11.4 is postgres-11.4 but with some Sourcegraph defaults.

If you are looking for our non-derivative Docker images, see e.g. /cmd/.../Dockerfile instead.

Building

All images in this directory are built and published automatically on CI:

Adding a new image

  1. Create a build.sh and add your publishing script to it - the script should end with docker tag ... "$IMAGE". See the scripts in this directory for examples.
  2. Ensure your new script is executable with chmod +x build.sh (you can try it via e.g. IMAGE=fake-repo/cadvisor:latest docker-images/$SERVICE/build.sh, or by building a test image)
  3. Add an image to the automated builds pipeline by adding it to SourcegraphDockerImages.