Task 2- AWS

Task Description 

Perform the task-1 using EFS instead of EBS service on the AWS as,
Create/launch Application using Terraform

 

1.  Create Security group which allow the port 80.


2.   Launch EC2 instance.

 

3.  In this Ec2 instance use the existing key or provided key and security group which we have created in step 1.

 

4.   Launch one Volume using the EFS service and attach it in your vpc, then mount that volume into /var/www/html

 

5.  Developer have uploded the code into github repo also the repo has some images.

 

6.   Copy the github repo code into /var/www/html

 

7. Create S3 bucket, and copy/deploy the images from github repo into the s3 bucket and change the permission to public readable.

 

Create a Cloudfront using s3 bucket(which contains images) and use the Cloudfront URL to  update in code in /var/www/html

 

Optional

 Integrate this task with the Jenkins.

 

Building the task - 


Initializing the terraform and terraform code - 

    We write a terraform code to launch a instance on AWS and after  it apply terraform with this code file.
















VPC Creation - 

    We create a VPC in AWS...we will attach EFS service with this VPC.




Using Putty to generate key in PPK format - 

    The Key's generated from AWS are in Pem format...we need the key in .ppk format to be accesed by putty.
we can change this format by software puttygen














EBS storage -

We create a EBS storage in  AWS. here EBS stands for Elastic Block Storage. We need EBS because here we need to store our files.





AWS Instance -

This was my AWS instance list before applying terraform.




Running code via terraform













terraform successful 




New  instance launched

After appying terraform here are more instance launched...as we wrote in our terraform-code.








EFS(Elastic file system)  - 
Now finally we create EFS ( also known as Elastic File Service) and attach it to our VPC.







                 


Project Team:

                            1. Tushar sharma
                             2. Vishal kumar





Comments