Git Product home page Git Product logo

acs-final-project-group-2's Introduction

### ACS730 Final Project (Two-tier Web Application Automation Using Terraform, Ansible and GitHub Actions)

###Deployment pre-requisites:
Create an S3 bucket with unique name. The bucket will store Terraform state.

Either create a bucket with same name as used in the config.tf files for each
environment (dev and prod) or create a new custom bucket name and update the new bucket name to the
config.tf files.

##Deployment Process
1. Upload the code to AWS Cloud9 environment or Start with the existing code or start from the scratch
```
2. Update the desired input varibles in dev/network and deploy dev/network with the commands below
```
   cd ~/webappproject/terraform/dev/network
   tf init
   tf plan
   tf apply 
```
3. Update the desired input varibles in prod/network and deploy prod/network with the commands below
```
   cd ~/webappproject/terraform/prod/network
   tf init
   tf plan
   tf apply --auto-approve 
```
4. Create a custom SSH key pair in dev/webservers for remote access to the dev VMs (Please use 'dev-keypair' as
the name to avoid having to update the code)
``` 
   cd ~/webappproject/terraform/dev/webservers
   ssh-keygen -t rsa -f dev-keypair
   
5. Deploy webserver VMs in dev/webservers
```
   tf init
   tf plan
   tf apply --auto-approve

6. Create a custom SSH key pair in prod/webservers for remote access to the prod VMs (Please use 'prod-keypair' as
the name to avoid having to update the code)
``` 
   cd ~/webappproject/terraform/prod/webservers
   ssh-keygen -t rsa -f prod-keypair
   
7. Deploy webserver VMs in prod/webservers
```
   tf init
   tf plan
   tf apply --auto-approve

###Clean Up process 

The cleanup process is a reverse of the deployment process,

1. Delete  instances in dev VPC
``` 
 cd ../../dev/webservers/
 tf destroy  -var my_private_ip=${PRIVATE_IP} -var my_public_ip=${PUBLIC_IP} --auto-approve
 ```
2. Delete  instances in prod VPC
``` 
 cd ../../prod/webservers/
 tf destroy  -var my_private_ip=${PRIVATE_IP} -var my_public_ip=${PUBLIC_IP} --auto-approve
 ```

acs-final-project-group-2's People

Contributors

baba-jyde avatar nick9613 avatar psdenedo avatar queenjennyfa 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.