From 619e8662e26d578b5625fd4144ddd6bc4d593c0f Mon Sep 17 00:00:00 2001 From: Josh Lee Date: Fri, 14 Oct 2022 12:47:48 -0400 Subject: [PATCH 1/3] Add documentation for creating a fork --- README.md | 2 ++ docs/forking.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 docs/forking.md diff --git a/README.md b/README.md index 95b9daa721..d23612e080 100644 --- a/README.md +++ b/README.md @@ -163,6 +163,8 @@ In case you need to run a specific suite of tests you can execute - [Lightstep](https://github.com/lightstep/opentelemetry-demo) - [New Relic](https://github.com/newrelic/opentelemetry-demo) +See [Forking](./docs/forking.md) for more information about creating your own fork. + ## Contributing See [CONTRIBUTING.md](CONTRIBUTING.md) diff --git a/docs/forking.md b/docs/forking.md new file mode 100644 index 0000000000..c42401da5c --- /dev/null +++ b/docs/forking.md @@ -0,0 +1,70 @@ +# Forking this Repository + +This repository is designed to be forked and used as a tool to show off what you +are doing with OpenTelemetry. + +Setting up a fork or a demo usually only requires overriding some environment +variables and possibly replacing some container images. + +## Building Custom Images + +Docker Compose uses `IMAGE_VERSION` and `IMAGE_NAME` from `.env` to tag all +images. Modify these values in order to push or pull custom images from your +container registry of choice. + +## Configuring the Collector + +The collector is configured to export traces to jaeger and metrics to prometheus +in +[otelcol-config.yml](https://github.com/open-telemetry/opentelemetry-demo/blob/main/src/otelcollector/otelcol-config.yml) + +You may wish to make a copy of +[otelcol-config-extras.yml](https://github.com/open-telemetry/opentelemetry-demo/blob/main/src/otelcollector/otelcol-config-extras.yml) +for your fork and to modify the relevant volume mounts for the collector in +[docker-compose.yaml](https://github.com/open-telemetry/opentelemetry-demo/blob/main/docker-compose.yml) + +## Configuring the Collector [Helm/Kubernetes] + +The [helm +charts](https://github.com/open-telemetry/opentelemetry-helm-charts/tree/main/charts/opentelemetry-demo) +allow for easy customization of collector configuration using a custom values +file: + +```yaml +opentelemetry-collector: + config: + exporters: + otlp: + endpoint: "your-otlp-endpoint.com:4317" + headers: + "x-vendor-api-key": "YOUR_API_KEY" + service: + pipelines: + metrics: + exporters: + - otlp + traces: + exporters: + - otlp + - jaeger +``` + +Save this file and pass it into helm:``helm install opentelemetry-demo +open-telemetry/opentelemetry-demo --values opentelemetry-demo-values.yaml` + +Values provided in this way will be merged with the default values. + +## Image Overrides [Helm/Kubernetes] + +Each service has a key `imageOverride` which accepts a map of image override +options, for example: + +```yaml +components: + adService: + imageOverride: + repository: "my-repo" + tag: "my-tag" + pullSecrets: {} + pullPolicy: Always +``` From 5cf0dafb29d65b12fd2c3dc1f2117fb7865ff00a Mon Sep 17 00:00:00 2001 From: Josh Lee Date: Fri, 14 Oct 2022 14:53:33 -0400 Subject: [PATCH 2/3] add link back to readme from forking docs --- docs/forking.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/forking.md b/docs/forking.md index c42401da5c..d7939f09ac 100644 --- a/docs/forking.md +++ b/docs/forking.md @@ -6,6 +6,8 @@ are doing with OpenTelemetry. Setting up a fork or a demo usually only requires overriding some environment variables and possibly replacing some container images. +Live demos can be added to the [README](https://github.com/open-telemetry/opentelemetry-demo/blob/main/README.md?plain=1#L186) + ## Building Custom Images Docker Compose uses `IMAGE_VERSION` and `IMAGE_NAME` from `.env` to tag all From 7b49e5cadcdac9a0f13bd4ad232b3444c7a20210 Mon Sep 17 00:00:00 2001 From: Josh Lee Date: Fri, 14 Oct 2022 15:19:07 -0400 Subject: [PATCH 3/3] fix formatting for helm command in fork docs --- docs/forking.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/forking.md b/docs/forking.md index d7939f09ac..820b22190d 100644 --- a/docs/forking.md +++ b/docs/forking.md @@ -51,8 +51,12 @@ opentelemetry-collector: - jaeger ``` -Save this file and pass it into helm:``helm install opentelemetry-demo -open-telemetry/opentelemetry-demo --values opentelemetry-demo-values.yaml` +Save this file and pass it into helm: + +```shell +helm install opentelemetry-demo +open-telemetry/opentelemetry-demo --values opentelemetry-demo-values.yaml +``` Values provided in this way will be merged with the default values.