Skip to content

Commit

Permalink
deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ezrizhu committed Nov 28, 2024
1 parent 1e0aae7 commit d0b1995
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 0 deletions.
10 changes: 10 additions & 0 deletions deploying.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Copying the docker-compose.yml to your system, ensure the user directives is set
to a non-root user ID.

Create /srv/dockerdata or change the mountpoint for the prom and grafana
containers.

Copy prometheus.yml over to the mointpoint declared in the prometheus
container's volume settings, by default it's `/srv/dockerdata/prometheus.yml`

Start via `docker compose up -d`
51 changes: 51 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
services:
peeringmon_exporter:
image: ghcr.io/peeringtestbed/peeringmon_exporter:latest
user: "1001" # change this to a nonroot user
container_name: peeringmon_exporter
command: ["/peeringmon_exporter", "-appid", "PEERINGMON-DEV"]
ports:
- 2112:2112
networks:
- monitoring

# peeringmon_controller:
# image: ghcr.io/peeringtestbed/peeringmon_controller
# user: "1001"
# container_name: peeringmon_controller
# command: ["/peeringmon_controller", "-i", "60"]
# ports:
# - 2113:2113
# networks:
# - monitoring

prometheus:
image: prom/prometheus:latest
user: "1001"
container_name: prometheus
volumes:
- /srv/dockerdata/promdata:/prometheus
- /srv/dockerdata/prometheus.yml:/etc/prometheus/prometheus.yml
command:
- '--config.file=/etc/prometheus/prometheus.yml'
- '--storage.tsdb.path=/prometheus'
ports:
- 9090:9090
networks:
- monitoring

grafana:
image: grafana/grafana:latest
user: "1001" # change this to a nonroot user
container_name: grafana
environment:
GF_AUTH_ANONYMOUS_ENABLED: true
volumes:
- /srv/dockerdata/grafana:/var/lib/grafana
ports:
- 3000:3000
networks:
- monitoring

networks:
monitoring:
16 changes: 16 additions & 0 deletions prometheus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
global:
scrape_interval: 1m
evaluation_interval: 15s

scrape_configs:
- job_name: 'peering_exporter'
scrape_interval: 15s
scrape_timeout: 15s
static_configs:
- targets: ['peeringmon_exporter:2112']

- job_name: 'peering_controller'
scrape_interval: 30s
scrape_timeout: 30s
static_configs:
- targets: ['150.164.213.243:51871']

0 comments on commit d0b1995

Please sign in to comment.