Git Product home page Git Product logo

iac-manager's Introduction

IaC: Manager Node (Jump Server)

This terraform script will setup an infrastructure for management in AWS and will create following resources:

  • Manager Node (CentOS)
  • VPC
  • Management subnet
  • Internet gateway
  • An IAM role attached to the Manager node which has the following access.
    • ec2
    • elasticloadbalancing
    • cloudwatch
    • autoscaling
    • lambda
    • logs
    • s3
    • elasticache
    • ecr
    • route53
    • route53domains
    • apigateway
    • es
    • iam
    • events

Pre-requisites

  • An IAM account with the following access:

    • AmazonEC2FullAccess
    • IAMFullAccess
    • AmazonVPCFullAccess
  • Install terraform on your machine.

  • Public Key Access with Agent support/ Agent Forwarding:

    ssh-add <key_pair_name>.pem

Steps for installation

  • Clone this repo.
  • cp terraform.dummy terraform.tfvars
  • Modify params in terraform.tfvars
  • Modify params in variable.tf to change subnet or add AMI accordingly to your aws region
  • Export AWS credentials as bash variables (e.g. ap-northeast-1 for Tokyo and ap-southeast-1 for Singapore region):
export AWS_ACCESS_KEY_ID="anaccesskey" 
export AWS_SECRET_ACCESS_KEY="asecretkey"
export TF_VAR_AWS_DEFAULT_REGION="ap-northeast-1"
  • Run terraform plan to see the plan to execute.
  • Run terraform apply to run the scripts.
  • You may have prod/dev/stage configurations in terraform.tfvars.{prod/dev/stage} files (already ignored by .gitignore).

Test

ssh -A centos@<manager_public_ip>

Generate Docs

Generate terraform documentation by running bash generate-docs.sh

Notes

  • SSH into the manager node and check whether terraform.out in home/centos contains: a record of the VPC, Subnet, Security Group and Nat gateway ID.
  • More details on terraform-docs.

iac-manager's People

Contributors

kamoljan avatar qburst-amal avatar qb-neethug avatar qbvysakh avatar alexraju avatar

Watchers

James Cloos 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.