Skip to content
This repository was archived by the owner on Apr 2, 2024. It is now read-only.
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: 1 addition & 1 deletion docker-compose/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ services:
PROMSCALE_WEB_TELEMETRY_PATH: /metrics-text
PROMSCALE_DB_URI: postgres://postgres:password@db:5432/postgres?sslmode=allow
PROMSCALE_TRACING_OTLP_SERVER_ADDRESS: ":9202"
PROMSCALE_TELEMETRY_TRACE_JAEGER_ENDPOINT: "http://otel-collector:14268/api/traces"
PROMSCALE_TELEMETRY_TRACE_OTEL_ENDPOINT: "otel-collector:4317"
PROMSCALE_TELEMETRY_TRACE_SAMPLING_RATIO: "0.1"
PROMSCALE_METRICS_RULES_CONFIG_FILE: /prometheus.yml

Expand Down
8 changes: 4 additions & 4 deletions docker-compose/otel-collector-config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
receivers:
jaeger:
otlp:
protocols:
thrift_http:
endpoint: "0.0.0.0:14268"
grpc:
http:

exporters:
logging:
Expand All @@ -21,7 +21,7 @@ service:

pipelines:
traces:
receivers: [jaeger]
receivers: [otlp]
exporters: [otlp, logging]
processors: [batch]

152 changes: 152 additions & 0 deletions docker-compose/promscale-demo/docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
version: '3.0'

services:
timescaledb:
image: timescale/timescaledb-ha:pg14-latest
ports:
- 5432:5432/tcp
volumes:
- timescaledb-data:/var/lib/postgresql/data
environment:
POSTGRES_PASSWORD: password
POSTGRES_USER: postgres
POSTGRES_DB: otel_demo
POSTGRES_HOST_AUTH_METHOD: trust

prometheus:
image: prom/prometheus:latest
depends_on:
- promscale
ports:
- 9090:9090/tcp
volumes:
- ${PWD}/../prometheus.yml:/etc/prometheus/prometheus.yml

alertmanager:
image: prom/alertmanager:latest
ports:
- 9093:9093/tcp

promscale:
image: timescale/promscale:latest
ports:
- 9201:9201/tcp
- 9202:9202/tcp
restart: on-failure
depends_on:
- timescaledb
volumes:
- ${PWD}/../promscale_prometheus.yml:/prometheus.yml
- ${PWD}/../rules.yml:/rules.yml
- ${PWD}/../alerts.yml:/alerts.yml
environment:
PROMSCALE_WEB_TELEMETRY_PATH: /metrics-text
PROMSCALE_DB_URI: postgres://postgres:password@timescaledb:5432/otel_demo?sslmode=allow
PROMSCALE_TELEMETRY_TRACE_OTEL_ENDPOINT: "collector:4317"
PROMSCALE_TELEMETRY_TRACE_SAMPLING_RATIO: "0.1"
PROMSCALE_METRICS_RULES_CONFIG_FILE: /prometheus.yml
TOBS_PROMSCALE_QUICK_START: "true"

collector:
image: "otel/opentelemetry-collector:0.50.0"
command: [ "--config=/etc/otel-collector-config.yml" ]
depends_on:
- promscale
ports:
- 14268:14268/tcp # jaeger http
- 4317:4317/tcp
- 4318:4318/tcp
volumes:
- ${PWD}/../otel-collector-config.yml:/etc/otel-collector-config.yml

jaeger:
image: jaegertracing/jaeger-query:1.35.0
environment:
SPAN_STORAGE_TYPE: grpc-plugin
command: [
"--grpc-storage.server=promscale:9202",
]
ports:
- "16686:16686"

grafana:
image: vineeth97/promscale-demo-grafana
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I will update this image to timescale repo. At the moment we do not have credentials for the repo.

I will create a follow-up PR to update the repo, once the image is published.

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.

Who will manage this image in the long run?

Is the team fine with creation of tech-debt in form of such image and if so is there a plan to switch back to "official" grafana image in the long run? If there is such plan, can we have an issue referenced in the code comment?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

My plan is to publish my image as timescale/promscale-demo-grafana. As this image will contain all the required dashboards and data sources pre-configured. The same is added to the otel-demo repo here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

@paulfantom I have created an issue and assigned it to myself to track this as a backlog.

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.

This is still in the repo as vineeth97/promscale-demo-grafana it's not a good look specially if we want customers to run this on their machines.

volumes:
- grafana-data:/var/lib/grafana
ports:
- 3000:3000/tcp
restart: on-failure
depends_on:
- timescaledb
- jaeger

node_exporter:
image: quay.io/prometheus/node-exporter
ports:
- "9100:9100"

upper:
image: timescale/promscale-demo-upper
restart: on-failure
depends_on:
- collector
ports:
- 5054:5000/tcp
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=collector:4317

lower:
image: timescale/promscale-demo-lower
restart: on-failure
depends_on:
- collector
ports:
- 5053:5000/tcp
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=http://collector:4318

special:
image: timescale/promscale-demo-special
restart: on-failure
depends_on:
- collector
ports:
- 5052:5000/tcp
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=collector:4317

digit:
image: timescale/promscale-demo-digit
restart: on-failure
depends_on:
- collector
ports:
- 5051:5000/tcp
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=collector:4317

generator:
image: timescale/promscale-demo-generator
restart: on-failure
depends_on:
- upper
- lower
- special
- digit
ports:
- 5050:5000/tcp
environment:
- OTEL_EXPORTER_OTLP_ENDPOINT=collector:4317

load:
image: timescale/promscale-demo-load
restart: on-failure
depends_on:
- generator
deploy:
mode: replicated
replicas: 3

volumes:
timescaledb-data:
grafana-data: