-
Notifications
You must be signed in to change notification settings - Fork 79
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
Adjust monitor-net settings #118
base: master
Are you sure you want to change the base?
Conversation
@@ -20,8 +20,8 @@ services: | |||
- "{{.RocketPoolDirectory}}/grafana-prometheus-datasource.yml:/etc/grafana/provisioning/datasources/prometheus.yml" | |||
- "grafana-storage:/var/lib/grafana" | |||
networks: | |||
- net | |||
- monitor-net |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Run Grafana service in monitor-net for better network isolation.
@@ -28,16 +28,7 @@ services: | |||
extra_hosts: | |||
- "host.docker.internal:host-gateway" | |||
networks: | |||
# Bridge so node-exporter can get the real NIC details | |||
# See https://stackoverflow.com/a/66689508 for more info |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The stackoverflow solution refered in the comment is obselete by now. Adding "host.docker.internal:host-gateway" as an extra host is enough alone. The stackoverflow answer was updated to reflect that.
ipam: | ||
driver: default | ||
config: | ||
- subnet: 172.23.0.0/16 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The RocketPool docs don't assume any particular network address for monitoring, so docker compose can assign network address for monitor-net by itself. The network address should not change later during RP node operation, since the networks are not recreated on starting/stopping RocketPool services. For current node operators the address will also not change.
ca89d7a
to
e446d95
Compare
Assigning a static address for monitor-net can lead to an issue. User can run other compose projects and create custom networks. By default docker will assign random network addresses automatically. When user already has a docker network with the same address as monitor-net address, rocketpool services are not starting:
Moreover, Grafana service can be isolated from containers in rocketpool_net and connected to monitor-net with Prometheus service.
More details in the pull request comments.