Task: Creating/launching Applications using Terraform.

Task: Creating/launching Applications using Terraform.

Task Description

  1. Create the key and security group which allows 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. The developer has uploaded the code into the Github repo also the repo has some images.
  6. Copy the Github repo code into /var/www/html
  7. Create an 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 (which contains images) and use the CloudFront URL to update it into code in /var/www/html.

Prerequisite for this project

  • First of all install and setup terraform in your system.
  • Have some knowledge about some basic commands of the Linux Operating System.
  • Some basic commands of terraform:
terrafom validate:- Validates the Terraform files

terraform apply:- Builds or changes infrastructure


terraform destroy:-  Destroy Terraform-managed infrastructure



--auto-approve:- Skip interactive approval of plan before applying.

Start:-

First, you need to login to AWS by user account.

-login into AWS account

No alt text provided for this image

-Creating Security Groups that support port 80 and 22.

No alt text provided for this image
No alt text provided for this image

here the security group can be created.

-Creating the instance which will download the Php, Https require for launching the webserver.

No alt text provided for this image

Launch an EBS volume and attached it with the launched instance.

No alt text provided for this image
No alt text provided for this image

here the volume created.

-Mount the volume into /var/www/html and copy the Github code into it.

No alt text provided for this image

-Create an S3 bucket, copy and deploy the image from Github repo into the s3 bucket and change the permission to public readable.

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image

-Create a CloudFront using an S3 bucket (which contains the image) and use the CloudFront URL to update it into code in /var/www/html.

No alt text provided for this image
No alt text provided for this image

here the output comes.

No alt text provided for this image
No alt text provided for this image
No alt text provided for this image


























To view or add a comment, sign in

More articles by Atin Verma

  • Automation and Ansible Tower

    A great session was arranged by LinuxWorld Informatics Pvt Ltd for their students, where we heard 2 of the best…

  • TASK-4 HYBRID CLOUD

    Perform task-3 going to update with new additional feature NAT gateway to private internet access to the instance which…

  • Deploying WordPress on Kubernetes and AWS

    What is RDS? RDS stands for Relational database . Amazon Relational Database Service (Amazon RDS) makes it easy to set…

  • Task 3: Create a NAAS(VPC) Infrastructure in AWS Using Terraform

    Statement: We have to create a web portal for our company with all the security as much as possible. So, we use the…

  • Big Data Umbrella

    Well, We all use various social media applications like Facebook, Instagram, Snapchat, LinkedIn, YouTube, Twitter…

  • Hybrid multi-Cloud task 2 using Terraform.

    TASK DESCRIPTION:- Create/launch Application using Terraform 1. Create a Security group that allows the port 80.

  • Task_1 of the google cloud platform orkshop

    What is GCP? Google Cloud Platform (GCP), offered by Google, is a suite of cloud computing services that runs on the…

  • Flutter App Development - Create basic music player with Play, Pause button.

    What is flutter? Flutter is a free and opensource mobile UI framework created by Google and released in May 2017. It…

    1 Comment
  • Deploy WordPress on the top of EKS

    What is EKS? Amazon Elastic Kubernetes Service (Amazon EKS) is a managed service that makes it easy for you to run…

Others also viewed

Explore content categories