Code Monkey home page Code Monkey logo

nomad-aws-minilab's Introduction

Nomad AWS Mini-Lab

Small-scale HashiCorp Nomad running across AWS EC2 instances for quick testing and tear down.

What's In Here?

The Nomad AWS Mini-Lab is comprised of:

  • Set up new VPC
  • Create 3 public subnets
  • Create Security Groups for ingress and egress
  • Create an Internet Gateway
  • Create a Routing Table and Subnet Associations
  • 3 EC2 instances by default spread across 3 availability zones (adjustable)

Nomad AWS Mini Lab

Small-scale HashiCorp Nomad running across AWS EC2 instances for quick testing and tear down.

Why does this exist?

Setting up Nomad for occasional use on AWS does have some different deploument patterns. Using the official CloudFormation template is robust (and pricey for a temporary lab). What is needed is a way of making sure you have all the dependencies, policies, networks, and more. It's also easy to leave behind a lot of remnants in AWS which are either costly or confusing (e.g. empty policies, unused subnets)

Requirements

You will need:

  • AWS IAM credentials - currently using root credentials (which is not ideal)
  • Terraform Cloud our Terraform Enterprise account

About the Lab Code

Terraform configuration built for Terraform 0.13.4 or higher

What Does the Nomad Mini-Lab Build?

The lab does the following which is also completely removed when you do a deprovision/destroy so you have no unnecessary remnants left behind:

  • Set up new VPC
  • Create 3 public subnets
  • Create Security Groups for ingress and egress
  • Create an Internet Gateway
  • Create a Routing Table and Subnet Associations
  • Create a 3-node Consul Cluster
  • Add Nomad to the 3-node Cluster

Variables Needed for Terraform

You will need to have the following defined in your Terraform configuration. This was built using Terraform Cloud and Terraform Enterprise so the description

Variable Type Content
aws_access_key sensitive Your AWS programmatic API key
aws_secret_key sensitive Your AWS API secret key
aws_region standard Region to launch in (e.g. us-east-2)
aws_key_name text Display name of your SSH key in AWS
aws_key_fingerprint text SSH key fingerprint (hex format) from AWS
nomad_node_instance_size text AWS instance family type (e.g. t3.small)
allowed_ip_network HCL Ingress networks for http/https/ssh using HCL format (e.g. ["0.0.0.0/0","10.0.0.0/16"]
nomad_node_count numeric How many nodes do you want in the cluster

Terraform Cloud Settings / Preferences

This was built using a VCS-backed configuration using GitHub using the very repository you're forking this from.

What's Missing?

This is work in progress. Code contributions or ideas alwasy welcome via Issues or PR!

nomad-aws-minilab's People

Contributors

discoposse avatar

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.