Giter VIP home page Giter VIP logo

vpc-devops-project's Introduction

Lab diagram

This repository shows a test infrastructure in the AWS cloud.


Image diagram

Creating a VPC

We will create VPC, 4 Subnets and place the EC-2 instance inside the subnet.

We will also install a webserver on the EC-2 instance and access it using a web browser.

Quick Check

1. Create the VPC with the CIDR Block Range 10.0.0.0/16 (65000 Hosts)

2.Create an Internet Gateway and attach it to the newly created VPC

3.Create Public Subnet-1 in Availability Zone-1 with the CIDR 10.0.0.0/24

4.Create Private Subnet-1 in Availability Zone-1 with CIDR of 10.0.1.0/24

5.Create an Elastic IP.

6.Create a NAT Gateway using the Elastic IP and Public Subnet -1 as base

7.Create Public Subnet-2 in Availability Zone-2 with the CIDR 10.0.2.0/24

8.Create Private Subnet-2 in Availability Zone-2 with the CIDR 10.0.3.0/24

9.Update Route Configurations for present Route Table and name it Private Route Table

10.Create Public Route Table and update Route Configurations

11.Create VPC Security Group to allow inbound HTTP,HTTPS and SSH

12.Create EC-2 Instances using the VPC Created as base and the Public Subnet-1 as EC-2 Location.

13.Enable Public IP for the EC-2

14.Associate the VPC Security Group for the EC-2

15.Update User Data for the EC-2

16.Launch EC-2

17.Test Webserver running on EC-2 using a browser.

After completing the above steps, you can successfully complete this work using the following guide:

Step by Step Review

1. Create the VPC with the CIDR Block Range 10.0.0.0/16 (65000 Hosts).

DevOps-Project-photo

2. Create an Internet Gateway and attach it to the newly created VPC

DevOps-Project-photo

3. Create Public Subnet -1 in Availability zone -1 with the CIDR 10.0.0.0/24

DevOps-Project-photo

4. Create Private Subnet -1 in Availability Zone -1 with CIDR of 10.0.1.0/24

DevOps-Project-photo

5. Create an Elastic IP.

DevOps-Project-photo

6. Create a NAT Gateway using the Elastic IP using the Public Subnet -1 as base

DevOps-Project-photo

7. Create Public Subnet -2 in Availability zone -2 with the CIDR 10.0.2.0/24

DevOps-Project-photo

8. Create Private Subnet -2 in Availability Zone -2 with the CIDR 10.0.3.0/24

DevOps-Project-photo

DevOps-Project-photo

9. Update Route Configurations for present Route Table and name it Private Route Table

Update Private Route Table Route’s as follows

Destination Target
10.0.0.0/16 Local
0.0.0.0/0 NAT Gateway

DevOps-Project-photo

Create Public Route Table and update Route Configurations.

DevOps-Project-photo

10. Create Public Route Table and update Route Configurations.

DevOps-Project-photo

11. Create VPC Security Group to allow inbound HTTP,HTTPS and SSH

DevOps-Project-photo

  1. Create EC-2 Instances using the VPC Created as Base and the Public Subnet-1 as EC-2 Location.

  2. Enable Public IP for the EC-2

  3. Associate the VPC Security Group for the EC-2

  4. Update User Data for the EC-2 (Check paragraph 17)

DevOps-Project-photo

Doublececk our Public Routes:

DevOps-Project-photo

Doublececk our Private Routes:

DevOps-Project-photo

15. Launch EC-2

DevOps-Project-photo

  1. Connect by SSH:

DevOps-Project-photo

  1. Follow these commands after a successful connection:

(Or make a .sh file give chmod and run)((Or use like User data))

#!/bin/bash

sudo su

yum update

# Install Apache Web Server and PHP

yum install -y httpd

yum install -y mysql

yum install -y php

# Download Lab files

wget https://github.com/san-vivt/VPC-DevOps-project/raw/main/src/lab-app-san.zip

unzip lab-app-san.zip -d /var/www/html/

# Turn on web server

chkconfig httpd on

service httpd start

Enter to our WEB page:

http://<our_instance_ip>

DevOps-Project-photo

Enter the magic command in terminal, just for fun, to load our one CPU core of the instance to 100%

(# -- mean root user)((For remove this load make # killall yes ))

# yes > /dev/null &

Voila, BOOM!

DevOps-Project-photo

Congratulations!!!

vpc-devops-project's People

Contributors

san-vivt avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

ma3trix

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.