Deploying to AWS CodeDeploy
Components
The deployment of an artifact to AWS CodeDeploy involves several major components as follows:
Application – A name that uniquely identifies the application that you want to deploy.
Application Revision – An archive file containing source content – such as source code, web pages, executable files, and deployment scripts – along with an Application Specification File (AppSpec file). Revisions are stored in Amazon S3 buckets or GitHub repositories.
Deployment Configuration – A set of deployment rules and deployment success and failure conditions that AWS CodeDeploy uses during a deployment.
Deployment Group – A set of individual instances. A deployment group contains individually-tagged Amazon EC2 instances, Amazon EC2 instances in Auto Scaling groups, or both.
On this page:
Related pages:
Workflow
The deployment workflow is illustrated by the following diagram:
The binding between those components is established indirectly and comprises the following activities:
(Optional) Create an application, if it hasn't been provisioned already (be it manually or via CloudFormation) – see the Create Application action of the AWS CodeDeploy Application task
(Optional) Create a deployment group – see the Create Deployment Group action of the AWS CodeDeploy Deployment Group task
the target instances can be provisioned with AWS CloudFormation for example – see the Create Stack action of the AWS CloudFormation Stack taskSpecify a deployment group
(Optional) Specify a deployment configuration
Commit or upload the application source code (the 'Revision') – see the Upload File(s) action of the Amazon S3 Object task
Deploy an application revision for that application – see the Create Deployment action of the AWS CodeDeploy Deployment task
the AWS CodeDeploy Agent on each participating instance pulls the revision from the specified Amazon S3 bucket or GitHub repository and starts deploying the contents to that instance, following the instructions in the AppSpec file that's provided
Alternative workflow via CloudFormation
As an alternative to using the AWS CodeDeploy tasks built into Tasks for AWS, it is also possible to provision the CodeDeploy components directly via the AWS CloudFormation Stack task and the corresponding CloudFormation resource types:
A typical workflow based on CloudFormation might look as follows:
Commit or upload the application source code (the 'Revision') – see the Upload File(s) action of the Amazon S3 Object task
Create/Update the CloudFormation stack that provisions the CodeDeploy application and deployment group – see the Create Stack action of the AWS CloudFormation Stack task
You can use the Update stack, if it already exists option to reuse the same Bamboo job for both actions
The deployment is not modeled as a resource of its own, rather as a property of the AWS::CodeDeploy::DeploymentGroup resource that specifies the AWS CodeDeploy application revision that will be deployed to the deployment group.
Frequently Asked Questions (FAQ)
Amazon Web Services™, AWS™ and the “Powered by Amazon Web Services” logo are trademarks of Amazon.com, Inc. or its affiliates in the United States and/or other countries.
Utoolity® is a registered trademark of Utoolity GmbH.
© 2024 Utoolity GmbH. All rights reserved.