September 15, 2024
Voiced by Polly

In the present day, we’re launching a new reference architecture and a set of reference implementations for enterprise-grade deployment pipelines. A deployment pipeline automates the constructing, testing, and deploying of purposes or infrastructures into your AWS environments. Whenever you deploy your workloads to the cloud, having deployment pipelines is essential to gaining agility and decreasing time to market.

Once I discuss with you at conferences or on social media, I often hear that our documentation and tutorials are good assets to get began with a brand new service or a brand new idea. Nonetheless, whenever you wish to scale your utilization or when you may have complicated or enterprise-grade use instances, you typically lack assets to dive deeper.

That is why now we have created through the years a whole bunch of reference architectures based mostly on real-life use instances and in addition the safety reference structure. In the present day, we’re including a brand new reference structure to this assortment.

We used the perfect practices and classes realized at Amazon and with a whole bunch of buyer initiatives to create this deployment pipeline reference structure and implementations. They go effectively past the everyday “Hey World” instance: They doc the way to architect and the way to implement complicated deployment pipelines with a number of environments, a number of AWS accounts, a number of Areas, handbook approval, automated testing, automated code evaluation, and so forth. Whenever you wish to enhance the velocity at which you ship software program to your clients via DevOps and steady supply, this new reference structure reveals you the way to mix AWS providers to work collectively. They doc the obligatory and optionally available parts of the structure.

Having an structure doc and diagram is nice, however having an implementation is even higher. Every pipeline kind within the reference structure has at the least one reference implementation. One of many reference implementations makes use of an AWS Cloud Improvement Package (AWS CDK) utility to deploy the reference structure in your accounts. It’s a good place to begin to review or customise the reference structure to suit your particular necessities.

You’ll find this reference structure and its implementations at https://pipelines.devops.aws.dev.

Deployment pipeline reference architecture

Let’s Deploy a Reference Implementation
The brand new deployment pipeline reference structure demonstrates the way to construct a pipeline to deploy a Java containerized application and a database. It comes with two reference implementations. We’re engaged on extra pipeline varieties to deploy Amazon EC2 AMIs, handle a fleet of accounts, and handle dynamic configuration on your purposes.

The pattern utility is developed with SpringBoot. It runs on high of Corretto, the Amazon-provided distribution of the OpenJDK. The applying is packaged with the CDK and is deployed on AWS Fargate. However the utility isn’t essential right here; you may substitute your personal utility. The essential components are the infrastructure parts and the pipeline to deploy an utility. For this pipeline kind, we offer two reference implementations. One deploys the applying utilizing Amazon CodeCatalyst, the brand new service that we introduced at re:Invent 2022, and one makes use of AWS CodePipeline. That is the one I select to deploy for this weblog put up.

The pipeline begins constructing the purposes with AWS CodeBuild. It runs the unit exams and in addition runs Amazon CodeGuru to assessment code high quality and safety. Lastly, it runs Trivy to detect extra safety considerations, resembling identified vulnerabilities within the utility dependencies. When the construct is profitable, the pipeline deploys the applying in three environments: beta, gamma, and manufacturing. It deploys the applying within the beta atmosphere in a single Area. The pipeline runs end-to-end exams within the beta atmosphere. All of the exams should succeed earlier than the deployment continues to the gamma atmosphere. The gamma atmosphere makes use of two Areas to host the applying. After deployment within the gamma atmosphere, the deployment into manufacturing is topic to handbook approval. Lastly, the pipeline deploys the applying within the manufacturing atmosphere in six Areas, with three waves of deployments made from two Areas every.

Deployment Pipelines Reference Architecture

I want 4 AWS accounts to deploy this reference implementation: one to deploy the pipeline and tooling and one for every atmosphere (beta, gamma, and manufacturing). At a excessive stage, there are two deployment steps: first, I bootstrap the CDK for all 4 accounts, after which I create the pipeline itself within the toolchain account. You need to plan for 2-3 hours of your time to organize your accounts, create the pipeline, and undergo a primary deployment.

As soon as the pipeline is created, it builds, exams, and deploys the pattern utility from its supply in AWS CodeCommit. You’ll be able to commit and push modifications to the applying supply code and see it going via the pipeline steps once more.

My colleague Irshad Buch helped me attempt the pipeline on my account. He wrote a detailed README with step-by-step instructions to allow you to do the identical in your aspect. The reference architecture that describes this implementation in detail is on the market on this new web page. The applying supply code, the AWS CDK scripts to deploy the applying, and the AWS CDK scripts to create the pipeline itself are all available on AWS’s GitHub. Be at liberty to contribute, report issues or suggest improvements.

Out there Now
The deployment pipeline reference structure and its reference implementations can be found right now, freed from cost. In case you resolve to deploy a reference implementation, we’ll cost you for the assets it creates in your accounts. You should utilize the provided AWS CDK code and the detailed instructions to deploy this pipeline in your AWS accounts. Try them today!

— seb