Skip to content
This repository was archived by the owner on Jul 28, 2026. It is now read-only.

Clean up the docker compose example environment - #1456

Merged
rfratto merged 1 commit into
grafana-cold-storage:mainfrom
rfratto:clean-docker-compose
Mar 3, 2022
Merged

Clean up the docker compose example environment#1456
rfratto merged 1 commit into
grafana-cold-storage:mainfrom
rfratto:clean-docker-compose

Conversation

@rfratto

@rfratto rfratto commented Mar 3, 2022

Copy link
Copy Markdown
Contributor

This PR replaces the various docker-compose.*.yaml files with a single docker-compose.yaml file.

By default, this file will spawn and expose ports for Loki, Grafana, Tempo, and Cortex so telemetry data can be stored and visualized. This allows developers to bring up dependencies needed for testing a local Grafana Agent process, useful for validating code changes.

Version 3 of Docker Compose is used for profile support, allowing docker-compose.yaml to optionally run extra services:

  • The agent profile will also run a Grafana Agent that collects metrics from itself and sends them to Cortex.

  • The integrations profile will run example services that integrations can target, such as MySQL and Consul. Each of these integrations services can also be enabled independently by using the profile name matching the relevant integration name (i.e., the mysqld_exporter profile enables the MySQL service). All integration services will expose their ports for a local agent to connect to.

You can pass a comma-delimited list of profiles to Docker Compose at the command line:
docker compose --profile=agent,mysqld_exporter,consul_exporter up -d

The various docker-compose.*.yaml files have been replaced with a single
docker-compose.yaml file.

By default, this file will spawn and expose ports for Loki, Grafana,
Tempo, and Cortex so telemetry data can be stored and visualized. This
allows developers to bring up dependencies needed for testing a local
Grafana Agent process, useful for validating code changes.

Version 3 of Docker Compose is used for profile support, allowing
docker-compose.yaml to optionally run extra services:

* The `agent` profile will also run a Grafana Agent that collects
  metrics from itself and sends them to Cortex.

* The `integrations` profile will run example services that integrations
  can target, such as MySQL and Consul. Each of these `integrations`
  services can also be enabled independently by using the profile name
  matching the relevant integration name (i.e., the `mysqld_exporter`
  profile enables the MySQL service). All integration services will
  expose their ports for a local agent to connect to.
@rfratto
rfratto requested a review from rlankfo March 3, 2022 03:09
@rfratto

rfratto commented Mar 3, 2022

Copy link
Copy Markdown
Contributor Author

At some point I suggested that we might want to replace Docker Compose completely with k3d, but I'm starting to question whether that's the right idea.

Sometimes I want to quickly spin up just Loki/Cortex/Tempo/Grafana for testing things, which would be pretty hard to do with k3d, but is pretty simple with Docker Compose 3 and its profiles support.

@rlankfo rlankfo left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rfratto
rfratto merged commit 5fa5831 into grafana-cold-storage:main Mar 3, 2022
@rfratto
rfratto deleted the clean-docker-compose branch March 3, 2022 17:20
@github-actions github-actions Bot added the frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed. label Apr 3, 2024
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age Locked due to a period of inactivity. Please open new issues or PRs if more discussion is needed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants