Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for creating a fork #447

Merged
merged 4 commits into from
Oct 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
joshleecreates marked this conversation as resolved.
Show resolved Hide resolved

## Contributing

See [CONTRIBUTING.md](CONTRIBUTING.md)
Expand Down
76 changes: 76 additions & 0 deletions docs/forking.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
# 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.

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
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:

```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.

## 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
```