Amazon Web Services (AWS) provides CI/CD tools designed to accelerate the software development cycle. The term “CI/CD” encompasses the following aspects:
CI helps developers discover code issues early in the development process. Early discovery enables developers to improve the quality of their code and reduce the time spent validating and releasing software updates. CD helps developers ensure they always have a deployment-ready build artifact that has passed testing standards.
Continuous delivery vs. continuous deployment
The acronym CD is often used to refer interchangeably to continuous delivery and continuous deployment. However, there are key differences between the two processes, including:
In this article:
AWS CodePipeline offers a continuous delivery (CD) service for quick and reliable application updates. Based on predefined release process models, the service can build, test, and deploy your code. You can leverage AWS CodePipeline to increase the speed of updates delivery while maintaining reliability.
AWS CodePipeline lets you easily build an end-to-end solution using plugins built for popular third-party services, such as GitHub. Alternatively, you can integrate custom plugins into various stages of the release process. AWS CodePipeline bills you only for what you use, without charging any upfront fees or asking for long-term commitments.
AWS CodeDeploy automates the deployment of code to Amazon EC2 instances, Amazon ECS tasks, AWS Fargate, AWS Lambda, as well as machines running on-premises. You can use AWS CodeDeploy to release new features and avoid downtime during application deployment. Additionally, the service can automatically update applications without the risks associated with error-prone manual deployments.
Amazon EC2 offers the use of cloud-based virtualized servers, commonly known as instances. EC2 lets you configure and scale compute capacity easily to meet changing demand and requirements. The service is seamlessly integrated with other AWS offerings.
AWS CodeCommit offers fully-managed source control. The service lets you host highly scalable and secure private Git repositories within the AWS cloud. CodeCommit offers secure cloud storage for source code and binaries.
These instructions are abbreviated from the AWS CodePipeline official tutorial. The tutorial shows how to use CodePipeline to deploy code changes to an Amazon EC2 instance. It shows how to create an Amazon CodeCommit repository to store your code and uses CodeDeploy to deploy the changes.
Let’s see how to create a CodeCommit repository and push code to it from your local repository:
git clone <SSH access URL>
Amazon CodeDeploy uses the concept of an application—this represents the application you are developing and need to deploy. Let’s create a sample application in CodeDeploy:
AWS lets you install a CodeDeploy agent that can use an IAM role to deploy your application. Here is how to create an instance role:
We now have a repo and an application. Let’s put it all together by creating a pipeline that accepts code changes and automatically deploys the application:
mainunder Branch name. Click Next.
Image Source: AWS
That’s it! Your automated CI/CD pipeline immediately starts running. To test it, commit the sample code you added to your local repository. Here is what happens next:
Image Source: AWS
Continuous Delivery has entered a new phase as more and more applications are migrating to microservices, with Kubernetes as the container orchestrator of choice for many. Kubernetes enables agility and faster software development cycles, but as release frequency increases, supporting delivery at large-scale becomes complex and inefficient.
Spot by NetApp introduced Ocean CD as part of the Ocean suite for Kubernetes to address the specific challenges of modern delivery release cycles. Ocean CD provides complete deployment and verification automation in one fully-managed solution, making it easy for users to execute deployments with high confidence. Key features of Ocean CD include:
Out-of-the-box progressive delivery strategies
Canary and blue/green strategies are easy to define, automate and customize. Developers commit code, use any CI tool and Ocean CD detects the deployments, automatically initiating the assigned rollout strategy.
Continuous verification automation
Ensure stability and quality of deployments even as release frequency increases. Routine verifications of deployments are conducted automatically and based on metrics from monitoring tools like DataDog and New Relic.
When issues are detected, Ocean CD initiates safe rollbacks and automatically tunes infrastructure to meet changing requirements of workloads. Continuous improvements are made to application deployments based on metrics collected during verification processes.
for up to 20 instances