AWS CodeDeploy Concepts: Difference between revisions
(Created page with "=Internal= * AWS CodeDeploy") |
|||
(19 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
* [[AWS CodeDeploy#Subjects|AWS CodeDeploy]] | * [[AWS CodeDeploy#Subjects|AWS CodeDeploy]] | ||
=Overview= | |||
<font color=darkgray>I started to look into AWS CodeDeploy for a standard way to trigger a new ECS deployment when a new container image shows up in ECR. Based on what I've read so far, ASW CodeDeploy is not what I need, or at least, it's not the preferred way of doing it. Apparently, [[AWS CodePipeline]] is. An ECS service, when configured with blue/green deployments, automatically creates a backing AWS CodeDeploy infrastructure, consisting of [[#Application|CodeDeploy application]] and [[#Deployment_Group|CodeDeploy deployment group]]. The deployments are triggered by actual [[#Deployment|CodeDeploy deployments]], but they are not publicly exposed and cannot be accessed, at least from the console.</font> | |||
=Application= | |||
== Application Types== | |||
===ECS Application === | |||
An ECS application is a collection of [[#ECS_Deployment_Group|deployment groups]] and [[#ECS_Revision|revisions]]. The deployments use the ECS compute platform. | |||
===Lambda Application === | |||
===EC2 Application=== | |||
=Deployment Group= | |||
{{External|[https://docs.aws.amazon.com/codedeploy/latest/userguide/deployment-groups.html Working with Deployment Groups in CodeDeploy]}} | |||
==Deployment Group Types== | |||
===ECS Deployment Group=== | |||
An ECS Deployment Group specifies the [[Amazon_ECS_Concepts#Service|ECS service]] with the containerized application to deploy as a task set, a production and optional test listener used to serve traffic to the deployed application, when to reroute traffic and terminate the deployed application's original task set, and optional trigger, alarm, and rollback settings. | |||
===Lambda Deployment Group=== | |||
===EC2 Deployment Group=== | |||
==Target Group== | |||
In the context of a [[#DeploymentGroup|deployment group]], a load balancer target groups routes traffic during your deployment. CodeDeploy binds one target group to the Amazon ECS service's original task set and the other to its replacement task set. For more details, see: {{Internal|AWS_Elastic_Load_Balancing_Concepts#Target_Group|AWS Elastic Load Balancing Concepts - Target Groups}} | |||
==Service Role== | |||
=Deployment= | |||
==Deployment Types== | |||
===ECS Deployment=== | |||
An ECS deployment is a process that deploys an updated version of an ECS containerized application as a new, replacement [[Amazon_ECS_Concepts#Task|task]] set. CodeDeploy reroutes production traffic from the task set with the original version to the new replacement task set with the updated version. When the deployment completes, the original task set is terminated. A deployment belongs to a [[#ECS_Deployment_Group|deployment group]], and links to a [[#ECS_Revision|revision]], essentially [[AWS CodeDeploy AppSpec|AppSpec]] metadata, which can be specified in-line or as a file stored in S3. | |||
===Lambda Deployment=== | |||
===EC2 Deployment=== | |||
=Deployment Configuration= | |||
==Deployment Configuration Types== | |||
===ECS Deployment Configuration=== | |||
Traffic is always shifted all at once. Custom deployment configuration settings cannot be specified for an Amazon ECS deployment. This reality is reflected by the fact that a [[#ECS_Deployment_Group|ECS deployment group]] always refers to a CodeDeployDefault.ECSAllAtOnce deployment configuration. | |||
===Lambda Deployment Configuration=== | |||
===EC2 Deployment Configuration=== | |||
=Revision= | |||
== Revision Types== | |||
===ECS Revision=== | |||
For ECS, a revision is an [[AWS CodeDeploy AppSpec|AppSpec file]] that specifies the [[Amazon_ECS_Concepts#Task|task]] definition for the [[Amazon_ECS_Concepts#Service|ECS service]] with the containerized application to deploy, the container where the updated application is deployed, a port for the container where production traffic is rerouted and optional network configuration settings and Lambda functions that can run validation tests during deployment lifecycle event hooks. | |||
===Lambda Revision=== | |||
===EC2 Revision=== | |||
=AppSpec= | |||
{{Internal|AWS CodeDeploy AppSpec|AppSpec}} | |||
=CodeDeploy Agent= | |||
The CodeDeploy agent is not used in an AWS Lambda or an Amazon ECS deployment. |
Latest revision as of 21:20, 28 February 2019
Internal
Overview
I started to look into AWS CodeDeploy for a standard way to trigger a new ECS deployment when a new container image shows up in ECR. Based on what I've read so far, ASW CodeDeploy is not what I need, or at least, it's not the preferred way of doing it. Apparently, AWS CodePipeline is. An ECS service, when configured with blue/green deployments, automatically creates a backing AWS CodeDeploy infrastructure, consisting of CodeDeploy application and CodeDeploy deployment group. The deployments are triggered by actual CodeDeploy deployments, but they are not publicly exposed and cannot be accessed, at least from the console.
Application
Application Types
ECS Application
An ECS application is a collection of deployment groups and revisions. The deployments use the ECS compute platform.
Lambda Application
EC2 Application
Deployment Group
Deployment Group Types
ECS Deployment Group
An ECS Deployment Group specifies the ECS service with the containerized application to deploy as a task set, a production and optional test listener used to serve traffic to the deployed application, when to reroute traffic and terminate the deployed application's original task set, and optional trigger, alarm, and rollback settings.
Lambda Deployment Group
EC2 Deployment Group
Target Group
In the context of a deployment group, a load balancer target groups routes traffic during your deployment. CodeDeploy binds one target group to the Amazon ECS service's original task set and the other to its replacement task set. For more details, see:
Service Role
Deployment
Deployment Types
ECS Deployment
An ECS deployment is a process that deploys an updated version of an ECS containerized application as a new, replacement task set. CodeDeploy reroutes production traffic from the task set with the original version to the new replacement task set with the updated version. When the deployment completes, the original task set is terminated. A deployment belongs to a deployment group, and links to a revision, essentially AppSpec metadata, which can be specified in-line or as a file stored in S3.
Lambda Deployment
EC2 Deployment
Deployment Configuration
Deployment Configuration Types
ECS Deployment Configuration
Traffic is always shifted all at once. Custom deployment configuration settings cannot be specified for an Amazon ECS deployment. This reality is reflected by the fact that a ECS deployment group always refers to a CodeDeployDefault.ECSAllAtOnce deployment configuration.
Lambda Deployment Configuration
EC2 Deployment Configuration
Revision
Revision Types
ECS Revision
For ECS, a revision is an AppSpec file that specifies the task definition for the ECS service with the containerized application to deploy, the container where the updated application is deployed, a port for the container where production traffic is rerouted and optional network configuration settings and Lambda functions that can run validation tests during deployment lifecycle event hooks.
Lambda Revision
EC2 Revision
AppSpec
CodeDeploy Agent
The CodeDeploy agent is not used in an AWS Lambda or an Amazon ECS deployment.