Profile
Back to NewsBack
GitHub Trending 14 min
Reader Mode
star3am/hashiqube: HashiQube - The Ultimate Hands on DevOps Lab running All the HashiCorp Products in a Github Codespace or a Docker Container using Vagrant or Docker Compose

star3am/hashiqube: HashiQube - The Ultimate Hands on DevOps Lab running All the HashiCorp Products in a Github Codespace or a Docker Container using Vagrant or Docker Compose

HashiQube - A DevOps Development Lab Using All the HashiCorp Products

!HashiQube

Open in GitHub Codespaces</a>

Overview

Hashiqube is the Ultimate Hands-on DevOps Lab in a Docker Container. It can run in a Github Codespace, locally using Vagrant or Docker Compose, or as a Virtual Machine VM on AWS, GCP and Azure.

Hashiqube has a Docker daemon inside, meaning we can run containers inside Hashiqube using Kubernetes (Minikube), Nomad, or Docker run. It runs all HashiCorp products: Vault, Terraform, Nomad, Consul, Waypoint, Boundary, Vagrant, Packer and Sentinel.

It also runs other popular Open Source DevOps/DevSecOps applications (Minikube, Ansible AWX Tower, Traefik, etc.) showcasing how simple integration with HashiCorp products can result in tangible learnings and benefits for all users.

Once Hashiqube is up, an internet connection is no longer needed, meaning sales pitches and demos for potential and existing customers are greatly aided.

Hashiqube has been created to help Engineers, Developers and anyone who wants to practice, learn or demo HashiCorp products to get started quickly with a local lab.

Please connect with me on LinkedIn (Riaan Nolan) or check out my Credly profile


Quik Start

Github Codespace

Open in GitHub Codespaces</a>

bash docker/docker.sh
bash consul/consul.sh
bash nomad/nomad.sh
bash vault/vault.sh
bash boundary/boundary.sh

Vagrant

vagrant up --provision-with basetools,docker,docsify,consul,nomad,vault,boundary

Docker Compose

docker compose exec hashiqube /bin/bash
bash hashiqube/basetools.sh
bash docker/docker.sh
bash consul/consul.sh
bash nomad/nomad.sh
bash vault/vault.sh
bash boundary/boundary.sh


Table of Contents

- Overview - Table of Contents - Running Hashiqube - Hashiqube Github Codespaces - AI Assistants and Shared Terminal Variables - Hashiqube Local Vagrant - Pre-requisites - Installation Instructions - Docker Compose - Documentation and Status - HashiQube Overview - HashiQube Diagrams - Draw.io Diagram - Links - Official Resources - Articles and Media - Hashiqube Integrations - HashiCorp Products - Infrastructure \& Orchestration - Databases - Monitoring \& Visualization - DevOps Tools - HashiQube's Purpose - Supported Architectures - HashiCorp product Versions - Components - Running Individual Components - Running Multiple Components Together - Docker Desktop - Configuration Requirements - Resource Allocation - Consul DNS - The HashiStack - Other - Service Ports - Vagrant Basic Usage - Docker Basic Usage - Errors you might encounter - Support \& Feedback - About Hashiqube - About Me - Contributors - Videos

Running Hashiqube

There are several ways to run Hashiqube depending on your needs. The easiest is using Github Codespaces:

| Method | Description | Requirements | |:-------|:------------|:------------| | Github Codespaces | Quick start in the cloud (1-minute setup) | Github account only | | Local Vagrant/Docker | Run locally on your machine | Docker, Vagrant (optional), VirtualBox (optional) | | Hyperscaler VMs | Run on AWS, GCP or Azure | Cloud account |

Hashiqube Github Codespaces

Open in GitHub Codespaces</a>

  1. Head over to
  2. Fork the Hashiqube repository
  3. In the forked Hashiqube repository in your Github account, launch a new Codespace
  4. Watch the video below for follow-along instructions
HashiQube on Github's Codespaces</a>

AI Assistants and Shared Terminal Variables

The Codespace / Dev Container comes with Claude Code, Codex, the Vault MCP Server and the Terraform MCP Server set up. Use vexport instead of export to share a variable with every terminal and with Claude Code:

vexport AWS_ACCESS_KEY_ID=AKIA... AWS_SECRET_ACCESS_KEY=... KUBECONFIG=~/.kube/config
vunset AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY
[!WARNING]
Anything you vexport can be read by AI assistants in the container. Only share credentials you're happy for them to use.

See AI Assistants, MCP Servers and Shared Terminal Variables for details.

Hashiqube Local Vagrant

Follow the instructions below to run Hashiqube locally on your laptop or PC.

Pre-requisites

  • Hardware Requirements:
- 10GB of disk space - 4G RAM (Minimum) - 8G RAM Recommended
  • Software Requirements:
- Docker - Vagrant
:bulb: If you want to run Minikube and a workload like AWX Ansible Tower or Airflow, you need at least 8G RAM. For Gitlab, allocate at least 12G RAM to Docker.

Installation Instructions

:clock3: Duration: 15-30 minutes
:bulb: Docker is the default and preferred way to run Hashiqube
  1. Install Docker: Download from the Docker desktop installer
  2. Install Vagrant: Download from the Vagrant installer
  3. Clone the repo: git clone https://github.com/star3am/hashiqube.git - What is Git?
  4. Start Hashiqube: Inside the local repo folder, run:
vagrant up --provision

This will set up Vault, Nomad, Consul, Terraform, Localstack and Docker

  1. Access documentation: Visit

Docker Compose

Docker compose is also supported! To bring up Hashiqube with Docker Compose:

  1. Install Docker: Download from the Docker desktop installer
  2. Clone the repo: git clone https://github.com/star3am/hashiqube.git
  3. Start Hashiqube: Inside the local repo folder, run:
docker-compose up -d
  1. Initialize services:
# Access the container shell
   docker compose exec hashiqube /bin/bash

# Install dependencies bash hashiqube/basetools.sh

# Install Docker daemon bash docker/docker.sh

# Start HashiCorp Vault bash vault/vault.sh

To check status:

docker compose ls

Example output:

NAME                STATUS              CONFIG FILES
hashiqube           running(1)          /Users/riaan/workspace/personal/hashiqube/docker-compose.yml

Documentation and Status

After completing the installation steps:

  • :book: Documentation:
  • :vertical_traffic_light: Status of Integrations:

HashiQube Overview

HashiQube: A Jedi DevOps Lab Using All the HashiCorp Products</a>


HashiQube Diagrams

In essence, Hashiqube is a Docker Container (by default) or a Virtual Machine with a Docker Daemon inside, meaning we can run containers inside Hashiqube using Kubernetes, Nomad, or Docker run.

Hashiqube runs on your local machine or cloud instance and provides:

Hashiqube is a Training/Development Lab for practice, learning, and demos. It is not designed for production use.

!Diagram


Links

Official Resources

Articles and Media


Hashiqube Integrations

!HashiQube

HashiCorp Products

  • Vault - Secure, store and control access to tokens, passwords, and sensitive data
  • Terraform - Infrastructure as Code to provision and manage any cloud or service
  • Consul - Service Mesh connecting applications across environments
  • Nomad - Scheduler and orchestrator for containers and applications
  • Boundary - Secure remote access to any system from anywhere
  • Waypoint - Modern workflow for build, deploy, and release across platforms
  • Vagrant - Build and maintain portable development environments
  • Packer - Create identical machine images for multiple platforms
  • Sentinel - Embedded policy-as-code framework

Infrastructure & Orchestration

  • Docker - Container platform
  • Minikube - Local Kubernetes cluster
  • Traefik - Modern HTTP reverse proxy and load balancer
  • Fabio - HTTP/TCP reverse proxy with Consul integration
  • Localstack - Local AWS cloud stack

Databases

Monitoring & Visualization

DevOps Tools

Once the stack is up, you will have many services running and available on localhost. For documentation, open in your browser.

!Hashiqube Integrations


HashiQube's Purpose

Hashiqube enables anyone interested in secure automation pipelines to run a suite of 'best in class' tools locally with minimal system resources.

It empowers users to deploy these tools in a way that covers multiple use cases, providing a 'concept to completion' test bed using open-source HashiCorp products.

The original use case was to demystify DevSecOps using Terraform, Vault, Consul, Sentinel, and Nomad along with other open-source CI/CD tools, demonstrating the value of secret and credential management in software development pipelines.

Thanks to HashiCorp's flexibility, there's no need to wonder how to achieve secure and timely software delivery - just Vagrant up!


Supported Architectures

| Name | Docker | Virtualbox | Hyper-V | |:--------- |:------:|:----------:|:-------:| | amd64 | ✓ | ✓ | ✘ | | arm64 | ✓ | ✘ | ✘ | | linux | ✓ | ✓ | ✘ | | windows | ✓ | ✘ | ✘ | | mac intel | ✓ | ✓ | ✘ | | mac apple | ✓ | ✘ | ✘ |


HashiCorp product Versions

By default, Hashiqube installs community editions of HashiCorp products, but you can also test and demo Enterprise versions. You can request a trial license from HashiCorp's website.

To use Enterprise editions, copy the license.hclic into the corresponding product folder and run:

vagrant up --provision-with basetools,vault,consul,nomad,boundary

| Name | Community | Enterprise | |:--------- |:---------:|:----------:| | Vault | ✓ | ✓ | | Consul | ✓ | ✓ | | Nomad | ✓ | ✓ | | Boundary | ✓ | ✓ | | Terraform | ✓ | ✘ |

Directory structure example:

tree -L 1 boundary consul nomad vault

boundary ├── README.md ├── boundary.sh ├── images └── license.hclic consul ├── README.md ├── consul.sh ├── images └── license.hclic nomad ├── README.md ├── images ├── license.hclic ├── nomad └── nomad.sh vault ├── README.md ├── images ├── license.hclic └── vault.sh


Components

Hashiqube is modular - components can be run separately or together.

Running Individual Components

vagrant up --provision-with basetools
vagrant up --provision-with docker
vagrant up --provision-with docsify
vagrant up --provision-with vault
vagrant up --provision-with consul
vagrant up --provision-with nomad
vagrant up --provision-with minikube

Running Multiple Components Together

vagrant up --provision-with basetools,docker,minikube,postgresql,dbt,apache-airflow

Docker Desktop

Docker Desktop is an application for Mac/Windows that enables building and sharing containerized applications. It provides a graphical interface for the Docker service.

  1. Download Docker Desktop and install it
  2. Verify installation by opening the Docker Desktop application
!Docker Desktop

Configuration Requirements

Resource Allocation

:bulb: While Hashiqube runs with 4GB (minimum) or 8GB (recommended) RAM, running multiple services simultaneously (Vault, Nomad, Consul, Waypoint, Boundary, Minikube, AWX) requires more resources to avoid contention errors.

!Docker Desktop Resources

  • Allocate at least 8GB RAM to your Docker daemon
  • Ensure sufficient disk space is available

Consul DNS

To enable local DNS resolution via Consul, create a file at /etc/resolver/consul with:

nameserver 10.9.99.10
port 8600

This enables DNS names like nomad.service.consul:9999 and vault.service.consul:9999 via Fabio Load Balancer.


The HashiStack

| Dimension | Products | | | |:------------------ |:-------- |:---------------- |:---------------- | | Applications | !Nomad
Nomad
Scheduler and workload orchestrator | !Waypoint
Waypoint
Build, deploy, release workflow | | | Networking | !Consul
Consul
Service Mesh across any cloud | | | | Security | !Boundary
Boundary
Secure remote access | !Vault
Vault
Secrets management | | | Infrastructure | !Packer
Packer
Machine image automation | !Vagrant
Vagrant
Development environments | !Terraform
Terraform
Infrastructure automation |


Other

Service Ports

| Service | URL/Port | |:--------|:---------| | LDAP | ldap://localhost:389 | | Localstack web | | | DBT web | | | Apache Airflow | | | Ansible provisioning Apache2 | | | Ansible AWX Tower | | | Jenkins | | | Oracle MySQL | localhost:3306 | | Microsoft SQL | localhost:1433 | | Minikube | | | Traefik | | | Fabio | |


Vagrant Basic Usage

# Initial setup with provisioning
vagrant up --provision

Selective provisioning

vagrant up --provision-with bootstrap|nomad|consul|vault|docker|ldap

Check VM status

vagrant global-status vagrant global-status --prune # Remove stale VMs from cache vagrant status

Other common commands

vagrant reload vagrant up vagrant destroy vagrant provision vagrant plugin list

Docker Basic Usage

docker image ls
docker ps
docker stop

Errors you might encounter

Error: Shell provisioner path does not exist

If you see this error when running vagrant destroy:

hashiqube0: Are you sure you want to destroy the 'hashiqube0' VM? [y/N] y
There are errors in the configuration of this machine. Please fix
the following errors and try again:

shell provisioner:

  • path for shell provisioner does not exist on the host system: /users/username/workspace/personal/hashiqube/vault/vault.sh
Command to check: docker ps

CONTAINER ID IMAGE COMMAND CREATED STATUS  PORTS NAMES
1d835d757279   15f77507dce7   "/usr/sbin/init"   38 hours ago   Up 38 hours   0.0.0.0:1433->1433/tcp, 0.0.0.0:3000->3000/tcp, 0.0.0.0:3306->3306/tcp, 0.0.0.0:3333->3333/tcp, 0.0.0.0:4566->4566/tcp, 0.0.0.0:4646-4648->4646-4648/tcp, 0.0.0.0:5001-5002->5001-5002/tcp, 0.0.0.0:5432->5432/tcp, 0.0.0.0:5580->5580/tcp, 0.0.0.0:5601-5602->5601-5602/tcp, 0.0.0.0:7777->7777/tcp, 0.0.0.0:8000->8000/tcp, 0.0.0.0:8043->8043/tcp, 0.0.0.0:8080->8080/tcp, 0.0.0.0:8088->8088/tcp, 0.0.0.0:8181->8181/tcp, 0.0.0.0:8200-8201->8200-8201/tcp, 0.0.0.0:8300-8302->8300-8302/tcp, 0.0.0.0:8500-8502->8500-8502/tcp, 0.0.0.0:8888-8889->8888-8889/tcp, 0.0.0.0:9001-9002->9001-9002/tcp, 0.0.0.0:9011->9011/tcp, 0.0.0.0:9022->9022/tcp, 0.0.0.0:9090->9090/tcp, 0.0.0.0:9093->9093/tcp, 0.0.0.0:9200->9200/tcp, 0.0.0.0:9333->9333/tcp, 0.0.0.0:9701-9702->9701-9702/tcp, 0.0.0.0:9998-9999->9998-9999/tcp, 0.0.0.0:10888->10888/tcp, 0.0.0.0:11888->11888/tcp, 0.0.0.0:18080->18080/tcp, 0.0.0.0:18181->18181/tcp, 0.0.0.0:18888-18889->18888-18889/tcp, 0.0.0.0:19200->19200/tcp, 0.0.0.0:19701-19702->19701-19702/tcp, 0.0.0.0:28080->28080/tcp, 0.0.0.0:31506->31506/tcp, 0.0.0.0:32022->32022/tcp, 0.0.0.0:8600->8600/udp, 0.0.0.0:2255->22/tcp, 0.0.0.0:33389->389/tcp   hashiqube_hashiqube0_1689246032

Solution: Run docker stop 1d835d757279 (using your container ID)

Error: IP address not within allowed ranges

The IP address configured for the host-only network is not within the
allowed ranges. Please update the address used to be within the allowed
ranges and run the command again.

Address: 10.9.99.10 Ranges: 192.168.56.0/21

Valid ranges can be modified in the /etc/vbox/networks.conf file. For more information including valid format see:

https://www.virtualbox.org/manual/ch06.html#network_hostonly

Solution: Create file /etc/vbox/networks.conf with:

* 10.0.0.0/8 192.168.0.0/16
  • 2001::/64
Then re-run vagrant up --provision

Error: Cannot stop container

When running vagrant destroy:

hashiqube0.service.consul: Are you sure you want to destroy the 'hashiqube0.service.consul' VM? [y/N] y
==> hashiqube0.service.consul: Stopping container...
A Docker command executed by Vagrant didn't complete successfully!
The command run along with the output from the command is shown
below.

Command: ["docker", "stop", "-t", "1", "6c0c8135620ff47efe12df417a0df0e57d7a81a7f7ca06d011323fbb52e573db", {:notify=>[:stdout, :stderr]}]

Stderr: Error response from daemon: cannot stop container: 6c0c8135620ff47efe12df417a0df0e57d7a81a7f7ca06d011323fbb52e573db: tried to kill container, but did not receive an exit event

Solution: Run vagrant destroy again

Error: Port collision

Vagrant cannot forward the specified ports on this VM, since they would collide with some other application that is already listening on these ports. The forwarded port to 9200 is already in use on the host machine.

To fix this, modify your current project's Vagrantfile to use another port. For example, where '1234' would be replaced by a unique host port:

config.vm.network :forwarded_port, guest: 9200, host: 1234

Sometimes, Vagrant will attempt to auto-correct this for you. In this case, Vagrant was unable to. This is usually because the guest machine is in a state which doesn't allow modifying port forwarding. You could try 'vagrant reload' (the equivalent of running a halt followed by an up) so vagrant can attempt to auto-correct this upon booting. Be warned that any unsaved work might be lost.

Solution: Either stop the conflicting service (e.g., Elasticsearch) or modify the Vagrantfile to use a different port:

# config.vm.network "forwarded_port", guest: 9200, host: 9200 # elasticsearch


Support & Feedback

For suggestions, feedback, and queries, please submit a Pull Request or contact Riaan Nolan, creator of HashiQube via GitHub.

About Hashiqube

Hashiqube runs all HashiCorp products and many popular open-source tools used in the industry today.

After running vagrant up --provision, you'll have access to:

| Service | URL | Setup Command | |:--------|:----|:--------------| | Vault | | vagrant up --provision-with basetools,vault | | Nomad | | vagrant up --provision-with basetools,docker,nomad | | Consul | | vagrant up --provision-with basetools,consul | | Waypoint on Nomad | | vagrant up --provision-with basetools,docker,waypoint | | Waypoint on Minikube | | vagrant up --provision-with basetools,docker,waypoint-kubernetes-minikube | | Boundary | | vagrant up --provision-with basetools,boundary | | Docsify | | vagrant up --provision-with basetools,docsify |

!Hashiqube Integrations


About Me

My name is Riaan Nolan and I was born in South Africa. I started as a Web Developer in 2000 and progressed into Systems Administration with a strong focus on Automation, Infrastructure and Configuration as Code.

I have worked for multinational companies in Portugal, Germany, China, South Africa, United States, and Australia.

Please connect with me on LinkedIn or check out my Credly profile

!My Hashicorp Badges


Contributors

A very special mention to HashiQube's contributors. Thank you all for your help, suggestions, and contributions, no matter how small! ❤️


Videos

Videos were made with asciinema

asciinema rec -i 1
asciicast2gif -S 1 -s 2 tmp

google ads

Chat with me