AWS Terraform

TASK DESCRIPTION






 

Have to create/launch Application using Terraform

 

1. Create the key and security group which allow the port 80.

2. Launch EC2 instance.

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

4. Launch one Volume (EBS) and 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.

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

 

*Optional*

1) Those who are familiar with jenkins or are in devops AL have to integrate jenkins in this task wherever you feel can be integrated

2) create snapshot of ebs

 

Above task should be done using terraform

 


Terraform Apply -

First of all we apply terraform on our code, to launch our instance.











PUTTY KEY GENERATE

    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


 





TERRAFORM VALIDATE

we apply terraform to validate our terraform code.



KEY PAIR GENERATED

As we can see that new key pair is genrated by our terraform code.



VOLUME CREATION WITH TERRAFORM

We write a terraform code to create a volum in AWS, and apply terraform.




SHOW IN WEBUI

 As we can see in WEBUI a new volume is created by our terraform code.




INSTANCE LAUNCH

After this we launch our instance.


Installing HTTPD
Taking CODE from GITHUB REPO

Now we write a terraform code to install httpd and code from github repo.






















S3 CREATION -

    Now we create a new S3 bucket.




 CODE copied in S3 BUCKET -

We copy our code in this created s3 bucket.



Project Team:

                      1.  TUSHAR SHARMA

                      2.    VISHAL KUMAR


Comments