This repository contains a production-ready solution for deploying a 4-node Consul cluster with comprehensive monitoring capabilities. The solution is containerized using Docker Compose and includes additional monitoring and logging components for production-grade observability.
Solutions 1 and 2 are based on docker-compose, solution 3 is based on helm Solutions 1 and 3 contain only consul, while solution2 contains more broad observability deployment.
- 4-node Consul cluster for service discovery and health checking
- Each node runs in a separate container for isolation
- UI accessible via the leader node
- Service mesh capabilities enabled via Consul Connect
-
Prometheus for metrics collection
-
Grafana for visualization
-
Fluent-bit for log aggregation
-
Loki for log storage and querying
-
cAdvisor for container metrics
-
Node Exporter for host metrics
-
Port availability:
- 8500 (Consul UI)
- 3000 (Grafana)
- 9090 (Prometheus)
- 24224 (Fluent-bit)
-
Clone the repository
-
Update environment variables in
.envand.decrypted.secrets.env -
For docker compose: Start the cluster:
docker-compose up -dFor helm:
helm install consul ./consul
or
helm upgrade consul ./consul
- Compose: Verify the cluster status:
docker exec outbrain_consul_node1 consul members listfor helm:
minikube service consul-ui
consul/config-nodes/- Contains node-specific configurationsconsul/config-services/- Contains service definitions- Each node has its own configuration file (node1.json through node4.json)
prometheus/- Prometheus configuration and rulesgrafana/- Dashboards and data sourcesfluent-bit/- Log collection configurationloki/- Log aggregation settings
- Consul UI: http://localhost:8500
- Grafana: http://localhost:3000
- Prometheus: http://localhost:9090
- Check cluster status:
docker exec outbrain_consul_node1 consul operator raft list-peers- View logs:
docker-compose logs -f [service_name]- Check service health:
docker-compose ps