Creativa - Fotolia
Automation is one of DevOps' core components. It enables enterprise development teams to adopt a more standardized, error-resistant approach to software delivery. Although there are a range of automation tools on the market, native AWS development services can help teams work together to quickly ship quality software.
But before teams adopt these services, which include CodeCommit, CodeBuild and CodeDeploy, it's important to understand how they work together in an AWS deployment pipeline. In a traditional build-and-release process, code checks into a source control repository, where developers perform actions -- such as compiling it into an installer or creating a package -- on that code before it deploys. Then, they test the output and typically deploy the result of that build to a test environment, where they might test it again. This end-to-end process is commonly called a build pipeline.
So, how does AWS fit into this? CodeCommit, CodeBuild and CodeDeploy work in unison to automate these processes, and CodePipeline glues all of them together. Let's walk through an example build pipeline with these AWS development services.
Kick it off with CodeCommit
In step one of this example, a developer will work on some code. When she believes it's stable enough to commit, she will check that code into a source control repository, such as AWS CodeCommit. Similar to GitHub, CodeCommit works from Git repositories and brings them into the cloud.
CodeCommit, like other source control repositories, is typically the unsung hero in an AWS deployment pipeline. While it's just a place to store version-controlled text files and various other artifacts, developers must rely on these to revert any changes if they find a problem with the current code base and need to go back to a previous one.
Compile, convert code
After you store the code, another one of AWS' development services, CodeBuild, takes the committed code and converts it to something that end users can consume. At this stage, development teams also perform unit tests and integration tests, as well as create build artifacts, such as software installers, packages and file copies.
With CodeBuild, you choose an environment for your code. For example, if your organization builds software for Go or PHP, you'll need to set up those language runtime environments on your build servers. CodeBuild provides these environmental options.
Once CodeBuild converts the code, it produces software that an end user can use immediately, rather than a bunch of text files full of code.
Push code to deployment
Now, it's time to deploy that build artifact with CodeDeploy, which mimics what might happen when an end user interacts with the software. CodeDeploy takes artifacts delivered by CodeBuild then deploys or installs them in environments of various states.
CodeDeploy enables developers or separate quality assurance teams to test what happens when they deploy their end products in different situations. Organizations can create different deployment groups to split up environments, for example, to provide a starting point for acceptance testing and production deployments.
This is the last mile of the build pipeline, as developers can then point the application to a production environment or opt to test the application again.
Fuse together the pipeline
CodeCommit, CodeBuild and CodeDeploy are all entirely separate AWS development services, though each has options to link one to the others. For example, CodeBuild can set a CodeCommit repository as its build source. But to build a holistic, complete build pipeline, you need something that links them all together.
This is where CodePipeline comes in. The service enables you to manage the flow of the deployment process with a single dashboard that provides an end-to-end view from code through AWS development services to end-user product performance. Use CodePipeline to define various environments to which your application deploys. You can also set actions to perform from code triggers automatically, which helps create a completely automated continuous delivery pipeline.