Day 71: CI/CD pipeline on AWS: Part-4

Day 71: CI/CD pipeline on AWS: Part-4

CodePipeline

What is CodePipeline & what are its features?

AWS CodePipeline is a fully managed continuous integration and continuous delivery (CI/CD) service. Here are its main features briefly:

  1. End-to-End Automation: Orchestrates and automates the entire software release process.

  2. Integration: Seamlessly integrates with various AWS services and third-party tools.

  3. Visual Workflow: Provides a visual representation of your CI/CD pipeline for easy management.

  4. Customizable Stages: Allows you to define custom stages and actions in your pipeline.

  5. Parallel and Sequential Execution: Supports both parallel and sequential execution of pipeline actions.

  6. Artifact Handling: Manages the flow of source code and build artifacts through the pipeline.

  7. Integration with Source Control: Connects with source code repositories for automatic trigger events.

  8. Approval and Manual Steps: Supports manual approvals and custom manual steps in the pipeline.

  9. Versioning and History: Tracks and logs pipeline executions for auditing and versioning.

  10. Security: Offers fine-grained IAM permissions to control access to pipelines and resources.


Task-01 :

Create a Deployment group of EC2 Instance.

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

In the previous blogs (Links added below), we have gone through step by step from committing to building to deploying of application.

AWS CodeCommit

AWS CodeBuild

AWS CodeDeploy

We will now delve into the concept of a Pipeline where everything will work seamlessly

To create a CodePipeline, Go to CodePipeline and click on "Create pipeline"

Enter the Pipeline name and Select Service role. A service role is a role used by a service to communicate with other services.
Click "Next"

Select the source provided. Previously, we used CodeCommit and enter all the relevant details such as repository name and the branch name.

Change detection options--> AWS CodePipeline (Any changes made to the code will rerun the pipeline)

Output artifact format --> CodePipeline default

Click "Next"

Under build stage enter all the relevant information such as AWS CodeBuild that we have used previously to build code, default region, and the name of the project.

Click "Next"

In the same way, complete all the information that we have previously used on AWS CodeDeploy.

Click "Next"

Review the stages:

Step 1:

Step 2:

Step 3:

Step 4:

Once reviewed, we can now proceed to create the pipeline

The pipeline has been created starting with the Source- AWS CodeCommit

Build- AWS CodeBuild

Deploy- AWS CodeDeploy

The pipeline: demo-pipeline has been created.


Experimenting with AWS CodePipeline

You can now make changes in the CodeCommit repository in HTML and then rerun the pipeline to see the beauty of automation.

First access the EC2's public IP on the web browser and you will find the below output:

Make the changes in the CodeCommit by adding a few more lines and commit the changes.

Go to CodePipeline and click on "Release change"

The Pipeline will rerun as mentioned below:

Once done, you can refresh your browser and see the new changes.

Congratulations! You've successfully achieved the milestone. Celebrate by posting it on LinkedIn, Hashnode, etc.


Conclusion:

AWS CodePipeline simplifies and streamlines the software release process by providing a fully managed CI/CD service with powerful features. From source code to deployment, it offers automation, integration, and customization. In this blog, we've demonstrated how to create a complete pipeline that automates the build and deployment of an application. With AWS CodePipeline, you have a reliable tool to enhance your CI/CD workflows and accelerate software releases."

Hope you like my post. Don't forget to like, comment, and share.