So, here I am back with another great automation. This is the world of cloud and we all know how popular multi-cloud is?

What is Terraform?

Terraform is an open-source infrastructure as code software tool created. It supports the number of cloud infra providers such as AWS, Azure, Oracle Cloud, and Scaleway, many more.

Few common commands of Terraform are:

terraform init

terraform apply

terraform destroy

terraform plan

What is Jenkins?

Jenkins is a free and open-source automation server. It helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery.

Overview of the task to perform

Model Prototype

Step 1 {First choose the service provider as AWS}

Service Provider “AWS”

Step 2 {Generating key pair with access to port 80}

Step 3 {Launch EC2 Instance with provisioners }

EC2 instance with provisioned

Here we installed our requirement in our instance-

  1. First, we login to the instance using ssh.
  2. Then we installed, git, httpd, and enabled the httpd services.

Step 4 {create an EBS volume and attach with the instance}

  1. Here we launched an instance named “my_EBS”
  2. We attached the instance with the EC2 service.
  3. We mounted the volume to the container.
  4. We attached GitHub where the developer deployed the code.

Step 5 {Creating s3 bucket and making it public}

Bucket Created

Step 6 {Creating Cloud Front}

  1. Here we created cloud front distribution.
  2. Then we made it public.
  3. Finally, we inserted the image into the bucket.

Step 7 {Made a slave for a windows node}

Building Job
JENKINS RUNNING THE JOB
Window Slave Node

Step 8 {Outputs}

EC2 INSTANCE launched
Bucket formed and Cloud Front created
Final!! output of web deployment.

Code on GitHub!

https://github.com/utkarsh161099/terraform_practice

Thank You for your time!