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

Added config and host network #6267

Merged
merged 2 commits into from
Aug 2, 2024
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
10 changes: 10 additions & 0 deletions grafana.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
services:
grafana:
image: grafana/grafana-oss:11.1.3
restart: always
volumes:
- grafana-storage:/var/lib/grafana
network_mode: host

volumes:
grafana-storage:
16 changes: 16 additions & 0 deletions prometheus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
services:
prometheus:
image: prom/prometheus:v2.53.1
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
restart: always
volumes:
- ./prometheus.yml:/etc/prometheus/prometheus.yml
- prometheus_data:/prometheus
network_mode: host

volumes:
prometheus_data:
7 changes: 7 additions & 0 deletions prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
global:
scrape_interval: 15s
evaluation_interval: 15s

rule_files:

scrape_configs:
5 changes: 3 additions & 2 deletions tools/alertmanager/compose.yaml.go-template
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ services:
command:
- '--storage.path=/alertmanager'
restart: always
ports:
- 9093:9093
volumes:
- /var/lib/alertmanager:/alertmanager
network_mode: host
2 changes: 1 addition & 1 deletion tools/blackbox-exporter/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ curl --silent --show-error --location --fail "https://github.com/prometheus/blac
"blackbox_exporter-${version}.linux-${alt_arch}/blackbox_exporter"
EOF
COPY compose.yaml.go-template /uniget_bootstrap/etc/docker-compose/blackbox-exporter/
COPY blackbox.yaml /uniget_bootstrap/etc/docker-compose/blackbox-exporter/config/
COPY blackbox.yaml /uniget_bootstrap/etc/blackbox/
5 changes: 2 additions & 3 deletions tools/blackbox-exporter/compose.yaml.go-template
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,5 @@ services:
command:
- --config.file=/etc/blackbox/blackbox.yaml
volumes:
- ./config/blackbox.yaml:/etc/blackbox/blackbox.yaml
ports:
- "127.0.0.1:9115:9115"
- /etc/blackbox/:/etc/blackbox/
network_mode: host
2 changes: 1 addition & 1 deletion tools/cadvisor/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ curl --silent --show-error --location --fail --output "${prefix}/bin/cadvisor" \
"https://github.com/google/cadvisor/releases/download/v${version}/cadvisor-v${version}-linux-${alt_arch}"
chmod +x "${prefix}/bin/cadvisor"
EOF
COPY compose.yaml.go-template /etc/docker-compose/cadvisor/
COPY compose.yaml.go-template /uniget_bootstrap/etc/docker-compose/cadvisor/
3 changes: 1 addition & 2 deletions tools/cadvisor/compose.yaml.go-template
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ services:
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
ports:
- 8080:8080
network_mode: host
1 change: 1 addition & 0 deletions tools/gitlab-ci-pipelines-exporter/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ mv "${prefix}/bin/helpers/manpages/gitlab-ci-pipelines-exporter.1.gz" "${prefix}
rm -rf "${prefix}/bin/helpers"
EOF
COPY compose.yaml.go-template /uniget_bootstrap/etc/docker-compose/gitlab-ci-pipelines-exporter/
COPY gitlab-ci-pipelines-exporter.yaml /uniget_bootstrap/etc/gitlab-ci-pipelines-exporter/
4 changes: 2 additions & 2 deletions tools/gitlab-ci-pipelines-exporter/compose.yaml.go-template
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ services:
gcpe:
image: quay.io/mvisonneau/gitlab-ci-pipelines-exporter:v{{ .Version }}
environment:
GCPE_CONFIG: /etc/gitlab-ci-pipelines-exporter.yml
GCPE_INTERNAL_MONITORING_LISTENER_ADDRESS: tcp://127.0.0.1:8082
ports:
- 8080:8080
network_mode: host
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
log:
level: debug

gitlab:
url: https://gitlab.com
token: <your_token>

# Pull jobs related metrics on all projects
project_defaults:
pull:
pipeline:
jobs:
enabled: true

# Example public projects to monitor
projects:
- name: gitlab-org/gitlab-runner
# Pull environments related metrics prefixed with 'stable' for this project
pull:
environments:
enabled: true
name_regexp: '^stable.*'

- name: gitlab-org/charts/auto-deploy-app
2 changes: 2 additions & 0 deletions tools/gitlab-runner/compose.yaml.go-template
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ services:
image: registry.gitlab.com/gitlab-org/gitlab-runner:v{{ .Version }}
volumes:
- /etc/gitlab-runner:/etc/gitlab-runner:z
network_mode: host

register-runner:
restart: 'no'
Expand All @@ -23,3 +24,4 @@ services:
REGISTRATION_TOKEN: ${REGISTRATION_TOKEN}
volumes:
- ./config:/etc/gitlab-runner:z
network_mode: host
2 changes: 1 addition & 1 deletion tools/grafana-agent/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ mv "${prefix}/bin/grafana-agentctl-linux-${alt_arch}" "${prefix}/bin/grafana-age
"${prefix}/bin/grafana-agentctl" completion zsh >"${prefix}/share/zsh/vendor-completions/_grafana-agentctl"
EOF
COPY compose.yaml.go-template /uniget_bootstrap/etc/docker-compose/grafana-agent/
COPY agent.yaml /uniget_bootstrap/etc/docker-compose/grafana-agent/config/
COPY agent.yaml /uniget_bootstrap/etc/grafana-agent/
7 changes: 3 additions & 4 deletions tools/grafana-agent/compose.yaml.go-template
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ services:
entrypoint:
- /bin/grafana-agent
- -server.http.address=0.0.0.0:12345
- -config.file=/etc/agent-config/agent.yaml
- -config.file=/etc/grafana-agent/agent.yaml
- -metrics.wal-directory=/tmp/agent/wal
- -enable-features=integrations-next
- -config.expand-env
Expand All @@ -15,6 +15,5 @@ services:
LOKI_HOST: loki:3100
TEMPO_HOST: tempo:4317
volumes:
- ./config:/etc/agent-config
ports:
- "127.0.0.1:12345:12345"
- /etc/grafana-agent/:/etc/grafana-agent/
network_mode: host
12 changes: 3 additions & 9 deletions tools/grafana/compose.yaml.go-template
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
services:
grafana:
image: grafana/grafana-oss:{{ .Version }}
command: -H unix:///var/run/docker.sock
restart: always
ports:
- "127.0.0.1:3000:3000"
restart: always
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- grafana-storage:/var/lib/grafana

volumes:
grafana-storage:
- /var/lib/grafana:/var/lib/grafana
network_mode: host
3 changes: 1 addition & 2 deletions tools/json-exporter/compose.yaml.go-template
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
services:
json_exporter:
image: quay.io/prometheuscommunity/json-exporter:v{{ .Version }}
ports:
- "127.0.0.1:7979:7979"
network_mode: host
2 changes: 1 addition & 1 deletion tools/loki/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@ unzip -q -o -d "${prefix}/bin" "${filename}"
mv "${prefix}/bin/loki-linux-${alt_arch}" "${prefix}/bin/loki"
EOF
COPY compose.yaml.go-template /uniget_bootstrap/etc/docker-compose/loki/
COPY loki.yaml /uniget_bootstrap/etc/docker-compose/loki/config/
COPY loki.yaml /uniget_bootstrap/etc/loki/config.yaml
5 changes: 2 additions & 3 deletions tools/loki/compose.yaml.go-template
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ services:
image: grafana/loki:{{ .Version }}
command: -config.file=/etc/loki/local-config.yaml
volumes:
- ./config/loki.yaml:/etc/loki/config.yaml
ports:
- "127.0.0.1:3100:3100"
- /etc/loki/config.yaml:/etc/loki/config.yaml
network_mode: host
4 changes: 2 additions & 2 deletions tools/mimir/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ curl --silent --show-error --location --fail --output "${prefix}/bin/mimir" \
chmod +x "${prefix}/bin/mimir"
EOF
COPY compose.yaml.go-template /uniget_bootstrap/etc/docker-compose/mimir/
COPY mimir.yaml /uniget_bootstrap/etc/docker-compose/mimir/config/
COPY nginx.conf /uniget_bootstrap/etc/docker-compose/mimir/config/
COPY mimir.yaml /uniget_bootstrap/etc/mimir/
COPY nginx.conf /uniget_bootstrap/etc/mimir/
25 changes: 8 additions & 17 deletions tools/mimir/compose.yaml.go-template
Original file line number Diff line number Diff line change
Expand Up @@ -2,42 +2,33 @@ services:
load-balancer:
image: nginx:latest
volumes:
- ./config/nginx.conf:/etc/nginx/nginx.conf:ro
- /etc/mimir/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- "mimir-1"
- "mimir-2"
- "mimir-3"
ports:
- "127.0.0.1:9009:9009"
network_mode: host

mimir-1:
image: grafana/mimir:{{ .Version }}
command: ["-config.file=/etc/mimir.yaml"]
hostname: mimir-1
volumes:
- ./config/mimir.yaml:/etc/mimir.yaml
- ./config/alertmanager-fallback-config.yaml:/etc/alertmanager-fallback-config.yaml
- mimir-1-data:/data
- /etc/mimir/mimir.yaml:/etc/mimir.yaml
- /var/lib/mimir/data1:/data

mimir-2:
image: grafana/mimir:{{ .Version }}
command: ["-config.file=/etc/mimir.yaml"]
hostname: mimir-2
volumes:
- ./config/mimir.yaml:/etc/mimir.yaml
- ./config/alertmanager-fallback-config.yaml:/etc/alertmanager-fallback-config.yaml
- mimir-2-data:/data
- /etc/mimir/mimir.yaml:/etc/mimir.yaml
- /var/lib/mimir/data2:/data

mimir-3:
image: grafana/mimir:{{ .Version }}
command: ["-config.file=/etc/mimir.yaml"]
hostname: mimir-3
volumes:
- ./config/mimir.yaml:/etc/mimir.yaml
- ./config/alertmanager-fallback-config.yaml:/etc/alertmanager-fallback-config.yaml
- mimir-3-data:/data

volumes:
mimir-1-data:
mimir-2-data:
mimir-3-data:
- /etc/mimir/mimir.yaml:/etc/mimir.yaml
- /var/lib/mimir/data3:/data
4 changes: 1 addition & 3 deletions tools/mitmproxy/compose.yaml.go-template
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ services:
mitmweb:
image: mitmproxy/mitmproxy:{{ .Version }}
command: mitmweb --web-iface 0.0.0.0
ports:
- "127.0.0.1:8080:8080"
- "127.0.0.1"8081:8081"
network_mode: host
5 changes: 2 additions & 3 deletions tools/node-exporter/compose.yaml.go-template
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@ services:
- '--path.sysfs=/host/sys'
- --collector.filesystem.ignored-mount-points
- "^/(sys|proc|dev|host|etc|rootfs/var/lib/docker/containers|rootfs/var/lib/docker/overlay2|rootfs/run/docker/netns|rootfs/var/lib/docker/aufs)($$|/)"
ports:
- "127.0.0.1:9100:9100"
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
- /:/host:ro,rslave
- /:/host:ro,rslave
network_mode: host
8 changes: 2 additions & 6 deletions tools/portainer/compose.yaml.go-template
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ services:
image: portainer/portainer-ce:{{ .Version }}
command: -H unix:///var/run/docker.sock
restart: always
ports:
- "127.0.0.1:9000:9000"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
- "portainer_data:/data"

volumes:
portainer_data:
- /var/lib/portainer:/data"
network_mode: host
3 changes: 2 additions & 1 deletion tools/prometheus/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ curl --silent --show-error --location --fail "https://github.com/prometheus/prom
| tar --extract --gzip --directory="${prefix}/bin/" --strip-components=1 --no-same-owner \
"prometheus-${version}.linux-${alt_arch}/prometheus"
EOF
COPY compose.yaml.go-template /uniget_bootstrap/etc/docker-compose/prometheus/
COPY compose.yaml.go-template /uniget_bootstrap/etc/docker-compose/prometheus/
COPY prometheus.yaml /uniget_bootstrap/etc/prometheus/
10 changes: 4 additions & 6 deletions tools/prometheus/compose.yaml.go-template
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,12 @@ services:
prometheus:
image: prom/prometheus:v{{ .Version }}
command:
- '--config.file=/etc/prometheus/prometheus.yaml'
- '--storage.tsdb.path=/prometheus'
- '--web.console.libraries=/usr/share/prometheus/console_libraries'
- '--web.console.templates=/usr/share/prometheus/consoles'
restart: always
ports:
- 9090:9090
volumes:
- prometheus_data:/prometheus

volumes:
prometheus_data:
- /etc/prometheus/:/etc/prometheus/
- /var/lib/prometheus:/prometheus
network_mode: host
7 changes: 7 additions & 0 deletions tools/prometheus/prometheus.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
global:
scrape_interval: 15s
evaluation_interval: 15s

rule_files:

scrape_configs:
1 change: 1 addition & 0 deletions tools/promtail/compose.yaml.go-template
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ services:
command: -config.file=/etc/promtail/config.yml
volumes:
- /var/log:/var/log
network_mode: host
3 changes: 1 addition & 2 deletions tools/pushgateway/compose.yaml.go-template
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ services:
pushgateway:
image: prom/pushgateway:v{{ .Version }}
restart: always
ports:
- "127.0.0.1:9091:9091"
network_mode: host
1 change: 1 addition & 0 deletions tools/tempo/Dockerfile.template
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ curl --silent --show-error --location --fail "https://github.com/grafana/tempo/r
tempo-query
EOF
COPY compose.yaml.go-template /uniget_bootstrap/etc/docker-compose/tempo/
COPY tempo.yaml /uniget_bootstrap/etc/tempo/
14 changes: 4 additions & 10 deletions tools/tempo/compose.yaml.go-template
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,10 @@ services:

tempo:
image: grafana/tempo:{{ .Version }}
command: [ "-config.file=/etc/tempo.yaml" ]
command: [ "-config.file=/etc/tempo/tempo.yaml" ]
depends_on:
- init
volumes:
- ../shared/tempo.yaml:/etc/tempo.yaml
- ./tempo-data:/var/tempo
ports:
- "127.0.0.1:14268:14268" # jaeger ingest
- "127.0.0.1:3200:3200" # tempo
- "127.0.0.1:9095:9095" # tempo grpc
- "127.0.0.1:4317:4317" # otlp grpc
- "127.0.0.1:4318:4318" # otlp http
- "127.0.0.1:9411:9411" # zipkin
- /etc/tempo/:/etc/tempo/
- /var/tempo:/var/tempo
network_mode: host
Loading
Loading