Support for life cycle hooks that map to different phases of software change – Rolling Out a CI/CD Pipeline

With support for several life cycle hooks, you can pin down the actions that you want to take when you reach a particular stage of the rollout process. This could beBeforeInstall, AfterInstall, upon ApplicationStart, or during ValidateService , among several others. Depending on the chosen compute platform, you can choose and implement all the hooks that you would like to automate against. For example, BeforeInstall could be used to send a Slack notification to your developers, stating that they should expect a change rollout soon. We will see some of these hooks in action during the hands-on exercises.

Monitoring events with CloudWatch

Depending on the type of event, you can build automation workflows to take some action when something expected or unexpected happens to your deployments. By creating rules for relevant EventBridge events, you can add triggers such as Lambda functions or forward the event payload to Kinesis streams for further processing. This allows you to create event-based workflows with fullymanaged AWS services, which makes the overall operations process very reliable.

AWS Systems Manager support for agent installation

You can make the agent available inside your compute instances in two ways – either bake it right into your AMI image during the build process or install it with the AWS Systems Manager service. The second approach has additional benefits since you always have the most recent version of the agent installed, and secondly, you don’t need to open ingress network traffic flows for your instances. With Systems Manager, it is more of a pull-based mechanism, where your instance can automatically get the agent file and deploy it. Once the agent is up and running, it’s available to respond to build commands from the service control plane.

At this point, we can discuss the AWS service that brings all the others together and offers a systematic workflow mechanism to the end user – CodePipeline.

Implementing end-to-end software delivery with CodePipeline

CodePipeline is a continuous software delivery service that can be used to design, operate, and automate all the stages of your software processes – that is, developing code, building and testing the artifacts, and performing the final rollout in productive environments. The entire sequence of activities is orchestrated by this service. It shares artifacts from one service to the other, checks their execution status, integrates with external tooling, and introduces a visual model around the steps you take to make the code available to the end user. However, you need to know about a few constructs when working with this service.

Key constructs used by CodePipeline

If you have used GitLab CI/CD or Jenkins in the past, you might have come across the concept of pipelines . These pipelines are formed by putting together blocks of actions that you would want toperform on your code artifacts. You often isolate them to map to different phases of the application release process. Similarly, CloudPipeline offers some constructs you can use as building blocks. This allows you to form a sequence of actions using which you can not only build, test, or deploy but also invoke Lambda functions, trigger step function executions, or call an external testing service to achieve a desired outcome.

Let’s see what is required to set up a pipeline.

Leave a Comment