Coder Social home page Coder Social logo

musical-spork's Introduction

Overview

This contains HashiCorp code to do the following:

  1. Packer template to build an Ubuntu 18.04 image consisting of 'HashiStack', which is Consul, Nomad and Vault
  2. Terraform code to provision the HashiStack in 2-3 separate AWS regions with peering
  3. Automated cluster formation of Consul and Nomad in each region
  4. Automated cluster formation of Vault in each region
  5. Automated WAN joining of Consul and Nomad
  6. Automated replication configuration of Vault clusters in each region

Assumptions

  • Packer and Terraform are available on local machine
  • Vault Enterprise linux binary available locally (Consul Enterprise and Nomad Enterpise are optional)
  • User possesses AWS account and credentials

Packer Usage

  1. Download Consul, Nomad, and Vault binaries locally (Vault enterprise required, Consul and Nomad Enterprise )
  2. Copy packer/vars.json.example to packer/vars.json
  3. Configure variables local path to those binaries in packer/vars.json
  4. Ensure AWS credentials are exposed as environment variables
  5. Execute Packer build
cd packer
packer build -var-file=vars.json -only=amazon-ebs-rhel-7.3-systemd  packer.json   

Terraform usage

Configure Terraform variables

cp terraform.tfvars.example terraform.tfvars
# edit terraform.tfvars

Initialize Terraform

cd terraform
terraform init

Terraform plan execution with summary of changes

terraform plan

Terraform apply to create infrastructure

terraform apply 

# apply execution without prompt
# terraform apply -auto-approve

Tear down infrastructure using Terraform destroy

terraform destroy -force

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.