Giter Club home page Giter Club logo

tf-aws-vpc-docker-hello-world's Introduction

tf-aws-vpc-docker-hello-world

A tool to provision a Scenario 2 VPC in AWS that will run N number of instances, all running the Docker "Hello World" image.

This tool uses Terraform to create a Scenario 2 VPC and based on the requested parameters 'N'; creates N instances in the VPC each running Docker. The hello-world image is installed and its output is returned to an output.txt file at run time.

Notes

  • Created using the AWS free tier
  • Uses EC2 t2.micro instances running Amazon Linux AMI 2017.09.1 (HVM), SSD Volume Type (AMI ID as on 1/28/2018: ami-f63b1193)
  • Default Region and Availability zone: us-east-2a
  • Scenario 2 VPC created using terraform-aws-modules/vpc/aws

The Scenario 2 VPC has the following configuration (defined in the vpc.tf file)

  • Main CIDR block: 10.0.0.0/16
  • Public CIDR block: 10.0.1.0/24
  • Private CIDR block: 10.0.2.0/24
  • A NAT gateway

Steps

  1. Copy this repository

  2. Initialize Terraform

terraform init
  1. Use the following single line command to run the tool
terraform apply \
-var 'access_key=<your_access_key>' \
-var 'secret_key=<your_secret_key>' \
-var 'n=<no_of_instances>'

Arguments

  • access_key: your AWS access key
  • secret_key: your AWS secret key
  • N: number of instances to be provisioned
  1. Destroy the infrastructure
terraform destroy  \
-var 'access_key=<your_access_key>' \
-var 'secret_key=<your_secret_key>'

DO remember to run terraform destroy to remove all created resources so as to not incur any charges on your AWS account

tf-aws-vpc-docker-hello-world's People

Contributors

snghshb 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.