Overview

HashiBox is a local environment to simulate a highly-available cloud with Consul, Nomad, and Vault. OSS and Enterprise versions of each product are supported.

Waypoint can be added but is optional. It also installs Docker for running Nomad's jobs inside containers.

It leverages Vagrant for virtualization, and Bolt for maintenance automation across nodes.

The main goal of HashiBox is to provide a local setup respecting environment parity for simulating a Cloud Platform from end-to-end before going in production.

Infrastructure

This repository simulates a region called us in which there are 3 datacenters:

  • us-west-1 with IP address 192.168.x.10.
  • us-west-2 with IP address 192.168.x.20.
  • us-east-1 with IP address 192.168.x.30.

In each datacenter we install 2 nodes:

  • One acting as a server for Consul, Nomad, and Vault with IP address 192.168.60.x.
  • One acting as a client for Consul and Nomad with IP address 192.168.61.x. Docker is also installed for running Nomad jobs inside containers.

Here is a summary schema to better understand how this works:

HashiBox

Cloning the repository

You can clone the repository with:

$ git clone https://github.com/nunchistudio/hashibox

Directory structure

Before continuing and installing the setup, it's important to take a look at the directory structure to better understand how it works:

  • Vagrantfile: This is the file to setup the required nodes using Vagrant. This also takes care of exposing the private network for each node with the IP addresses given earlier.
  • Makefile: This file allows to populate environment variables and automate every tasks within the environment.
  • bolt.yaml: Required file to leverage the Bolt command-line within this directory.
  • inventory.yaml: This file is used by Bolt and allows us to organize our nodes per groups so we can then run tasks on different groups of nodes such as every nodes acting as clients, or every nodes in the us-west-1 datacenter.
  • modules/: This contains Bolt tasks and plans to execute on the remote nodes.
  • uploads/: This directory is used to upload files for each node, in each datacenter, for each region.
    • us/: Applied for the us region.
      • _defaults/: This directory contains the default configuration files that will be applied to all nodes present in the us region.
      • us-west-1/: This directory contains the specific configuration files for the us-west-1 datacenter only.
      • us-west-2/: This directory contains the specific configuration files for the us-west-2 datacenter only.
      • us-east-1/: This directory contains the specific configuration files for the us-east-1 datacenter only.

Is something missing?

If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the repository. Once we merge it, the changes will be reflected on the website the next time it is deployed. Thank you for your contributions!
Built by
Nunchi