Day 53: Your CI/CD pipeline on AWS - Part 4 🚀 ☁

Day 53: Your CI/CD pipeline on AWS - Part 4 🚀 ☁

What is CodePipeline?

CodePipeline builds, tests, and deploys your code every time there is a code change, based on the release process models you define. Think of it as a CI/CD Pipeline service.

Task-01 :

Create a Deployment group of EC2 Instance.

Create a CodeDeploy application:

In CodeDeploy, go to Applications and click on 'Create application'.

Select compute platform ‘EC2/on premises’ and click on ‘Create application’.

Application is successfully created.

Create 'service role' for enabling communication between code deploy and other aws services. Create 'code-deploy-service-role' with below permissions.

Create an ubuntu EC2 instance:

Create a deployment group:

Add deployment group name and choose 'Service role'.

Add instance name.

Deployment group is created.

Install the CodeDeploy agent in ec2 insatnce:

You can install the CodeDeploy agent by running the following script on your EC2 instance:

Code agent is running.

2. Create a CodePipeline that gets the code from CodeCommit, Builds the code using CodeBuild and deploys it to a Deployment Group.

Go to the CodePipeline console. Click "Create pipeline."

Enter a name for your pipeline.

Under "Source provider," choose "AWS CodeCommit."

Select the repository and branch you want to deploy.

Click "Next."

Under "Build provider," choose "AWS CodeBuild."

Select "build project name."

Click "Next.

Under "Deploy provider," choose "AWS CodeDeploy."

Select the deployment group you created earlier.

Click "Next."

Review the pipeline settings and click "Create pipeline."

The pipeline will automatically trigger a build and deploy the new code to the EC2 instance.

Successfully created a CodePipeline that automates the deployment process.

Browse your instance public-ip address, you can see final output of index.html

Thank you for reading!! I hope you find this article helpful!!

Happy Learning!!

Sayali✨

Did you find this article valuable?

Support Sayali Jadhav by becoming a sponsor. Any amount is appreciated!