Giter VIP home page Giter VIP logo

aws-ansible-vpc's Introduction

Complete ansible automation setup

Cloud Architecture

Prerequisite

Launch a control machine provision ansible playbook (Manual) requirement:

  • ansible
  • awscli
  • iam user role with admin access attached into ec2
  • clone this repo

What will we have in this setup.

We have set up two private running web servers in separate availability zones (AZs) within our own Virtual Private Cloud (VPC). These servers are located in private subnets and are not directly accessible from the internet. Instead, we have a bastion/frontend server that acts as a gateway and is exposed to the internet.

To enable load balancing and distribute traffic evenly between the two web servers, we have configured an Elastic Load Balancer (ELB) using the round-robin method. The ELB sits in the public subnet and forwards incoming requests to the web servers in the private subnets.

Overall, our setup ensures that our web servers are kept safe within the private subnets while still allowing controlled access via the bastion/frontend server and load balancing through the ELB.

Flow of execution

  • Install ansible

  • goto repo folder and run the main.yml

    #######This playbook will setup

    • Complete Own VPC with NAT GW
    • Security groups for public and private ec2 instances
    • key-pair for our ec2 instances
    • launch 1 public(bastion) instance & 2 private Instance(web server's)
    • Create varible file which will execute on next step and copied into bastion home directory.
  • Login into bastion server

  • You will get the repo folder on your home directory

  • move to provision-ec2 folder and run the main.yml after instaling ansible on this server.

    #######This playbook will setup

    • Install requied pakages for web server
    • download dependency from the internet
    • setup and start the web server

Flow of Plan

Devops-VPC (ansible)

  • vpc
  • subnetting
    • 2 pubsub
    • 2 privpub
  • IGW
  • route Tables
  • attached igw into 2 pubsub
  • NAT GW in public subnet
    • attached 2 priv subnet into NATGW

Security Groups (ansible)

  • ELB-SG and Bastion Host-SG
  • private server security groups

Create key pairs for ec2 intances

  • bastion host
  • 2 private servers

Ec2 (ansible)

  • bastion host in public subnet
  • 2 web server on each subnet

provision (ansible)

  • write playbook to setup web server

aws-ansible-vpc's People

Contributors

gitpit-ak avatar

Watchers

 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.