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

2024/add/tempo #910

Draft
wants to merge 24 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
f0d8cf0
wip
mrnicegyu11 Sep 19, 2024
e906b41
Merge remote-tracking branch 'upstream/main' into main
mrnicegyu11 Oct 23, 2024
14c751d
Merge remote-tracking branch 'upstream/main' into main
mrnicegyu11 Oct 23, 2024
293f63c
Add csi-s3 and have portainer use it
mrnicegyu11 Oct 24, 2024
f7f72ec
Change request @hrytsuk 1GB max portainer volume size
mrnicegyu11 Oct 25, 2024
94cfb76
t push
mrnicegyu11 Oct 28, 2024
509c717
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Oct 29, 2024
1a65ecf
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Nov 13, 2024
77ee45e
Merge remote-tracking branch 'upstream/main'
mrnicegyu11 Nov 25, 2024
20569c7
Fix wrong filename
mrnicegyu11 Nov 26, 2024
b2d13b7
Fix registry local deploy
mrnicegyu11 Nov 27, 2024
28660ac
Traefik local deployment fixes
mrnicegyu11 Nov 27, 2024
65907fc
Fix local deployment graylog provisioning
mrnicegyu11 Nov 27, 2024
0961600
Fix j2, double venv
mrnicegyu11 Nov 28, 2024
541df1c
Add python version
mrnicegyu11 Nov 28, 2024
c92ac11
Idempotency for admin-panels
mrnicegyu11 Dec 2, 2024
b3b3ae1
Remove faulty command
mrnicegyu11 Dec 2, 2024
36b193b
Local deploy fixes
mrnicegyu11 Dec 2, 2024
cd22e09
Clean Up Local Minio
mrnicegyu11 Dec 3, 2024
1369e50
init work
mrnicegyu11 Dec 3, 2024
c2c0440
Remove unused code
mrnicegyu11 Dec 3, 2024
511dc0f
Update Minio
mrnicegyu11 Dec 3, 2024
3c2ff2b
Merge branch '2024/makeLocalDeployWorkAgain' into 2024/add/tempo
mrnicegyu11 Dec 3, 2024
c682845
Merge remote-tracking branch 'upstream/main' into 2024/add/tempo
mrnicegyu11 Dec 13, 2024
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ docs/_build
/services/monitoring/pgsql_query_exporter_config.yaml
/services/monitoring/docker-compose.yml
/services/monitoring/smokeping_prober_config.yaml

services/monitoring/tempo_config.yaml

# Simcore: Contains location of repo.config file on the machine and of the whole config directory
.config.location
Expand Down
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ down-maintenance: ## Stop the maintenance mode
fi \
,)


# Misc: info & clean
.PHONY: info info-vars info-local
info: ## Displays some important info
Expand Down
4 changes: 4 additions & 0 deletions services/minio/template.env
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,7 @@
MINIO_ACCESS_KEY=${S3_ACCESS_KEY}
MINIO_SECRET_KEY=${S3_SECRET_KEY}
STORAGE_DOMAIN=${STORAGE_DOMAIN}
TEMPO_S3_BUCKET=${TEMPO_S3_BUCKET}
MONITORING_DOMAIN=${MONITORING_DOMAIN}
PUBLIC_NETWORK=${PUBLIC_NETWORK}
MONITORED_NETWORK=${MONITORED_NETWORK}
19 changes: 11 additions & 8 deletions services/monitoring/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,28 +49,28 @@ up-master: .init .env config.monitoring config.prometheus.ceph.simcore ${TEMP_C
@docker stack deploy --with-registry-auth --prune --compose-file ${TEMP_COMPOSE}-master ${STACK_NAME}
$(MAKE) grafana-import

${TEMP_COMPOSE}: docker-compose.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml
${TEMP_COMPOSE}: docker-compose.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml tempo_config.yaml
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< > $@

${TEMP_COMPOSE}-letsencrypt-http: docker-compose.yml docker-compose.letsencrypt.http.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml
${TEMP_COMPOSE}-letsencrypt-http: docker-compose.yml docker-compose.letsencrypt.http.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml tempo_config.yaml
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.letsencrypt.http.yml > $@

${TEMP_COMPOSE}-letsencrypt-dns: docker-compose.yml docker-compose.letsencrypt.dns.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml
${TEMP_COMPOSE}-letsencrypt-dns: docker-compose.yml docker-compose.letsencrypt.dns.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml tempo_config.yaml
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.letsencrypt.dns.yml > $@

${TEMP_COMPOSE}-dalco: docker-compose.yml docker-compose.dalco.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml
${TEMP_COMPOSE}-dalco: docker-compose.yml docker-compose.dalco.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml tempo_config.yaml
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.dalco.yml > $@

${TEMP_COMPOSE}-public: docker-compose.yml docker-compose.public.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml
${TEMP_COMPOSE}-public: docker-compose.yml docker-compose.public.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml tempo_config.yaml
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.public.yml > $@

${TEMP_COMPOSE}-aws: docker-compose.yml docker-compose.aws.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml
${TEMP_COMPOSE}-aws: docker-compose.yml docker-compose.aws.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml tempo_config.yaml
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.aws.yml > $@

${TEMP_COMPOSE}-master: docker-compose.yml docker-compose.master.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml
${TEMP_COMPOSE}-master: docker-compose.yml docker-compose.master.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml tempo_config.yaml
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.master.yml > $@

${TEMP_COMPOSE}-local: docker-compose.yml docker-compose.letsencrypt.dns.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml
${TEMP_COMPOSE}-local: docker-compose.yml docker-compose.letsencrypt.dns.yml config.monitoring .env pgsql_query_exporter_config.yaml smokeping_prober_config.yaml tempo_config.yaml
@${REPO_BASE_DIR}/scripts/docker-stack-config.bash -e .env $< docker-compose.letsencrypt.dns.yml > $@

docker-compose.yml: docker-compose.yml.j2 .env .venv pgsql_query_exporter_config.yaml
Expand Down Expand Up @@ -153,6 +153,9 @@ pgsql_query_exporter_config.yaml: pgsql_query_exporter_config.yaml.j2 ${REPO_CON
smokeping_prober_config.yaml: smokeping_prober_config.yaml.j2 ${REPO_CONFIG_LOCATION} .env .venv
$(call jinja, $<, $@);

tempo_config.yaml: tempo_config.yaml.j2 ${REPO_CONFIG_LOCATION} .env .venv
$(call jinja, $<, $@);

.PHONY: grafana/assets
grafana/assets: ${REPO_CONFIG_LOCATION}
@if [ ! -d "$(shell dirname ${REPO_CONFIG_LOCATION})/assets/grafana" ]; then \
Expand Down
74 changes: 74 additions & 0 deletions services/monitoring/docker-compose.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ networks:
configs:
alertmanager_config:
file: ./alertmanager/config.yml
tempo_config:
file: ./tempo_config.yaml
node_exporter_entrypoint:
file: ./node-exporter/docker-entrypoint.sh
prometheus_config:
Expand Down Expand Up @@ -396,3 +398,75 @@ services:
reservations:
memory: 32M
cpus: "0.1"{% endfor %}
tempo1:
image: grafana/tempo:2.6.1
command: "-target=scalable-single-binary -config.file=/etc/tempo.yaml"
configs:
- source: tempo_config
target: /etc/tempo.yaml
networks:
- monitored
deploy:
labels:
- traefik.enable=true
- traefik.docker.network=${PUBLIC_NETWORK}
- traefik.http.services.tempo.loadbalancer.server.port=9095
- traefik.http.routers.tempo.rule=Host(`${MONITORING_DOMAIN}`) && PathPrefix(`/tempo`)
- traefik.http.routers.tempo.priority=10
- traefik.http.routers.tempo.entrypoints=https
- traefik.http.routers.tempo.tls=true
- traefik.http.middlewares.tempo_replace_regex.replacepathregex.regex=^/tempo/?(.*)$$
- traefik.http.middlewares.tempo_replace_regex.replacepathregex.replacement=/$${1}
- traefik.http.routers.tempo.middlewares=ops_whitelist_ips@swarm, ops_gzip@swarm, tempo_replace_regex
resources:
limits:
memory: 2000M
cpus: "2.0"
tempo2:
image: grafana/tempo:2.6.1
command: "-target=scalable-single-binary -config.file=/etc/tempo.yaml"
configs:
- source: tempo_config
target: /etc/tempo.yaml
networks:
- monitored
deploy:
labels:
- traefik.enable=true
- traefik.docker.network=${PUBLIC_NETWORK}
- traefik.http.services.tempo.loadbalancer.server.port=9095
- traefik.http.routers.tempo.rule=Host(`${MONITORING_DOMAIN}`) && PathPrefix(`/tempo`)
- traefik.http.routers.tempo.priority=10
- traefik.http.routers.tempo.entrypoints=https
- traefik.http.routers.tempo.tls=true
- traefik.http.middlewares.tempo_replace_regex.replacepathregex.regex=^/tempo/?(.*)$$
- traefik.http.middlewares.tempo_replace_regex.replacepathregex.replacement=/$${1}
- traefik.http.routers.tempo.middlewares=ops_whitelist_ips@swarm, ops_gzip@swarm, tempo_replace_regex
resources:
limits:
memory: 2000M
cpus: "2.0"
tempo3:
image: grafana/tempo:2.6.1
command: "-target=scalable-single-binary -config.file=/etc/tempo.yaml"
configs:
- source: tempo_config
target: /etc/tempo.yaml
networks:
- monitored
deploy:
labels:
- traefik.enable=true
- traefik.docker.network=${PUBLIC_NETWORK}
- traefik.http.services.tempo.loadbalancer.server.port=9095
- traefik.http.routers.tempo.rule=Host(`${MONITORING_DOMAIN}`) && PathPrefix(`/tempo`)
- traefik.http.routers.tempo.priority=10
- traefik.http.routers.tempo.entrypoints=https
- traefik.http.routers.tempo.tls=true
- traefik.http.middlewares.tempo_replace_regex.replacepathregex.regex=^/tempo/?(.*)$$
- traefik.http.middlewares.tempo_replace_regex.replacepathregex.replacement=/$${1}
- traefik.http.routers.tempo.middlewares=ops_whitelist_ips@swarm, ops_gzip@swarm, tempo_replace_regex
resources:
limits:
memory: 2000M
cpus: "2.0"
5 changes: 5 additions & 0 deletions services/monitoring/template.env
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,8 @@ MONITORING_PROMETHEUS_PGSQL_GID_MONITORED=${MONITORING_PROMETHEUS_PGSQL_GID_MONI
MONITORING_PROMETHEUS_SMOKEPING_TARGETS=${MONITORING_PROMETHEUS_SMOKEPING_TARGETS}
PUBLIC_NETWORK=${PUBLIC_NETWORK}
MONITORED_NETWORK=${MONITORED_NETWORK}
TEMPO_S3_BUCKET=${TEMPO_S3_BUCKET}
STORAGE_DOMAIN=${STORAGE_DOMAIN}
S3_REGION=${S3_REGION}
S3_ACCESS_KEY=${S3_ACCESS_KEY}
S3_SECRET_KEY=${S3_SECRET_KEY}
60 changes: 60 additions & 0 deletions services/monitoring/tempo_config.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
server:
http_listen_port: 3200

distributor:
receivers: # this configuration will listen on all ports and protocols that tempo is capable of.
otlp:
protocols:
http:
grpc:

#ingester:
# max_block_duration: 5m # cut the headblock when this much time passes. this should probably be left alone normally

compactor:
compaction:
block_retention: 96h # overall Tempo trace retention.

memberlist:
abort_if_cluster_join_fails: false
bind_port: 7946
join_members:
- tempo1:7946
- tempo2:7946
- tempo3:7946

metrics_generator:
registry:
external_labels:
source: tempo
cluster: {{ MACHINE_FQDN }}
storage:
path: /var/tempo/generator/wal
remote_write:
- url: http://prometheuscatchall:9090/api/v1/write

storage:
trace:
backend: s3 # backend configuration to use
wal:
path: /var/tempo/wal # where to store the wal locally
s3:
bucket: {{ TEMPO_S3_BUCKET }} # how to store data in s3
endpoint: {{STORAGE_DOMAIN}}
region: {{S3_REGION}}
access_key: {{S3_ACCESS_KEY}}
secret_key: {{S3_SECRET_KEY}}
insecure: false
tls_insecure_skip_verify: true
# For using AWS, select the appropriate regional endpoint and region
# endpoint: s3.dualstack.us-west-2.amazonaws.com
# region: us-west-2

#querier:
# frontend_worker:
# frontend_address: {{MONITORING_DOMAIN}}/tempo:9095

overrides:
defaults:
metrics_generator:
processors: ['service-graphs', 'span-metrics']
2 changes: 2 additions & 0 deletions services/registry/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ define create-s3-bucket
source .env; \
echo Creating bucket "$${S3_BUCKET}";\
${REPO_BASE_DIR}/scripts/create-s3-bucket.bash "$${S3_BUCKET}" && \
echo Creating bucket "$${TEMPO_S3_BUCKET}";\
${REPO_BASE_DIR}/scripts/create-s3-bucket.bash "$${TEMPO_S3_BUCKET}" && \
set +o allexport; \
# bucket is available in S3
endef
Expand Down
1 change: 1 addition & 0 deletions services/traefik/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
docker-compose.letsencrypt.dns.yml
docker-compose.yml
traefik_dynamic_config.yml
tempo_config.yaml
Loading