-
-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dockerized metrics local setup (#5173)
* Add dockerized metrics local setup * Review PR
- Loading branch information
Showing
9 changed files
with
97 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
cp -r ./dashboards docker/grafana_dev/dashboards | ||
|
||
docker-compose -f docker/docker-compose.local_dev.yml up --build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
version: "3.4" | ||
|
||
# Configuration to work with a local non-dockerized Lodestar node | ||
# For local testing and quick debugging | ||
# | ||
# HOW TO USE: Start a Lodestar node, then run | ||
# | ||
# ./docker/docker-compose.local_dev.sh | ||
|
||
services: | ||
prometheus: | ||
build: | ||
context: prometheus | ||
environment: | ||
# Linux: http://localhost:8008 | ||
# MacOSX: http://host.docker.internal:8008 | ||
BEACON_URL: localhost:8008 | ||
VC_URL: localhost:5064 | ||
restart: always | ||
network_mode: host | ||
volumes: | ||
- "prometheus:/prometheus" | ||
|
||
grafana: | ||
build: grafana_dev | ||
restart: always | ||
network_mode: host | ||
volumes: | ||
- "grafana:/var/lib/grafana" | ||
- "grafana-dashboards:/dashboards" | ||
environment: | ||
# Linux: http://localhost:9090 | ||
# MacOSX: http://host.docker.internal:9090 | ||
PROMETHEUS_URL: http://localhost:9090 | ||
|
||
volumes: | ||
prometheus: | ||
grafana: | ||
grafana-dashboards: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# syntax=docker/dockerfile:1.4 | ||
|
||
# Same version as our ansible deployments, to minimize the diff in the dashboard on export | ||
FROM grafana/grafana:8.5.16 | ||
|
||
# Datasource URL is configured with ENV variables | ||
COPY datasource.yml /etc/grafana/provisioning/datasources/datasource.yml | ||
# Note: Dashboard as linked via a bind volume | ||
COPY dashboard.yml /etc/grafana/provisioning/dashboards/dashboard.yml | ||
# copy over some reasonable default dashboards, user can mount a volume over top of it | ||
COPY dashboards /dashboards/ | ||
|
||
ENV GF_SECURITY_ADMIN_USER=admin | ||
ENV GF_SECURITY_ADMIN_PASSWORD=admin | ||
|
||
# Modified datasource to work with a network_mode: host | ||
ENV PROMETHEUS_URL=http://prometheus:9090 | ||
ENV DASHBOARDS_DIR=/dashboards | ||
|
||
CMD [ \ | ||
"--homepath=/usr/share/grafana", \ | ||
"--packaging=docker", \ | ||
"cfg:default.paths.data=/var/lib/grafana" \ | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
apiVersion: 1 | ||
|
||
providers: | ||
- name: lodestar_github | ||
type: file | ||
updateIntervalSeconds: 60 | ||
allowUiUpdates: true | ||
options: | ||
path: $DASHBOARDS_DIR | ||
foldersFromFilesStructure: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
apiVersion: 1 | ||
|
||
datasources: | ||
- name: prometheus | ||
type: prometheus | ||
access: proxy | ||
url: $PROMETHEUS_URL | ||
uid: prometheus | ||
isDefault: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters