Build and deploy automation - Containers on AWS

This whitepaper is for historical reference only. Some content might be outdated and some links might not be available.

Build and deploy automation

Containers have become a feature component of continuous integration (CI) and continuous deployment (CD) workflows. Because containers can be built programmatically using Dockerfiles, they can be automatically rebuilt anytime a new code revision is committed. Containers promote the idea of immutable deployments. Each build creates a new set of container images. Each deployment is a new set of containers, and it’s easy to roll back by deploying containers that reference older images.

AWS Code Services in AWS Developer Tools provide convenient AWS native stack options to automate build and deployment for your applications. They have native integrations with the AWS containter services and provide tooling to pull the source code from the source code repository, build the container image, push the container image to the container registry, and deploy the image as a running container in one of the container services. AWS CodeBuild uses Docker images to provision the build environments, which makes it flexible to adapt to the needs of the application you are building. A build environment represents a combination of operating system, programming language runtime, and tools that CodeBuild uses to run a build. For code not containerized already, consider using AWS App2Container. App2Container is a command-line tool that can analyze and build an inventory of all .NET and Java applications running in virtual machines, on-premises or in the cloud. App2Container packages the application artifact and identified dependencies into container images, configures the network ports, and generates a Dockerfile, Amazon ECS task definition, or Kubernetes deployment manifests by integrating with various AWS services.

Non-AWS tooling for CI/CD like GitHub, Jenkins, DockerHub and many others can also integrate with the AWS container services using the APIs and you can continue to use them. For Amazon EKS, GitOps provides a way to manage application and infrastructure deployment where the whole system is described declaratively in a Git repository. GitOps provides a set of best practices that unifies deployment, management, and monitoring for clusters and applications. Flux from Weaveworks and ArgoCD are two popular options for GitOps, although several other have started to emerge. All GitOps solutions integrate seamlessly with Amazon EKS and help you achieve CD through the declarative nature of Kubernetes manifests.