HashiQube - DevOps Lab
Youtube Channel Medium Posts Riaan Nolan Linkedin Riaan Nolan Hashicorp Ambassador

.

HashiCorp Consul

HashiCorp Consul Logo

Connect and secure services across any runtime platform and cloud

🚀 About

In this HashiQube DevOps lab, you'll get hands-on experience with HashiCorp Consul, a service networking solution that connects, configures, and secures services in dynamic infrastructure environments.

Introduction to HashiCorp Consul

Click the image to watch an introduction to Consul by Armon Dadgar, HashiCorp Co-Founder and CTO

For hands-on interactive labs with Consul, visit HashiCorp Learn.

📰 Latest News

📋 Provision

Open in GitHub Codespaces

bash docker/docker.sh
bash consul/consul.sh
vagrant up --provision-with basetools,docker,docsify,consul
docker compose exec hashiqube /bin/bash
bash hashiqube/basetools.sh
bash docker/docker.sh
bash docsify/docsify.sh
bash consul/consul.sh

🖥️ Web UI

After provisioning, you can access the Consul web interface through your browser.

Consul Web UI

Consul web interface showing services and health status

🔍 Key Features

  • Service Discovery - Register services and discover others with DNS or HTTP
  • Health Checking - Monitor the health of services to ensure availability
  • Key/Value Store - Store dynamic configuration in a distributed key-value store
  • Service Mesh - Secure service-to-service communication with automatic TLS
  • Multi-Datacenter - Federate multiple Consul clusters across datacenters
  • Service Configuration - Distribute configuration data to services dynamically

🧩 Consul DNS

To use Consul as a DNS resolver from your laptop, create the following file:

File: /etc/resolver/consul

nameserver 10.9.99.10
port 8600

With this configuration, you can resolve service names like nomad.service.consul and fabio.service.consul directly from your machine.

📊 Monitoring Consul

HashiQube includes Prometheus and Grafana for monitoring Consul.

For detailed information, see the Monitoring HashiCorp Consul guide.

🛠️ Provisioner Script

The script below automates the setup of Consul in your HashiQube environment:

filename

🔗 Additional Resources