From 007215cd51b0aa1c90dbc06793ac64a3bec0461c Mon Sep 17 00:00:00 2001 From: Viren Nadkarni Date: Fri, 7 Mar 2025 15:41:19 +0530 Subject: [PATCH 1/5] Add placeholder --- .../coverage/coverage_codedeploy/index.md | 1 - content/en/user-guide/aws/codedeploy/index.md | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 content/en/user-guide/aws/codedeploy/index.md diff --git a/content/en/references/coverage/coverage_codedeploy/index.md b/content/en/references/coverage/coverage_codedeploy/index.md index 7e7e889cdb..970c6eebb3 100644 --- a/content/en/references/coverage/coverage_codedeploy/index.md +++ b/content/en/references/coverage/coverage_codedeploy/index.md @@ -4,7 +4,6 @@ linkTitle: "codedeploy" description: > Implementation details for API codedeploy hide_readingtime: true -draft: true --- ## Coverage Overview diff --git a/content/en/user-guide/aws/codedeploy/index.md b/content/en/user-guide/aws/codedeploy/index.md new file mode 100644 index 0000000000..8dd3a25adb --- /dev/null +++ b/content/en/user-guide/aws/codedeploy/index.md @@ -0,0 +1,16 @@ +--- +title: CodeDeploy +linkTitle: CodeDeploy +description: > + Get started with CodeDeploy on LocalStack +tags: ["Pro image"] +--- + +## Introduction + + +## Getting Started + + +## Limitations + From aa827bccd4a98013c40e1704ea594938e402623c Mon Sep 17 00:00:00 2001 From: Viren Nadkarni Date: Thu, 15 May 2025 18:21:55 +0530 Subject: [PATCH 2/5] Update --- content/en/user-guide/aws/codedeploy/index.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/content/en/user-guide/aws/codedeploy/index.md b/content/en/user-guide/aws/codedeploy/index.md index 8dd3a25adb..caaacfe823 100644 --- a/content/en/user-guide/aws/codedeploy/index.md +++ b/content/en/user-guide/aws/codedeploy/index.md @@ -8,9 +8,13 @@ tags: ["Pro image"] ## Introduction +CodeDeploy is a service that automates application deployments. +On AWS, it supports deployments to Amazon EC2 instances, on-premises instances, serverless Lambda functions, or Amazon ECS services. +Furthermore, based on the target it is also possible to use an in-place deployment or a blue/green deployment. -## Getting Started +LocalStack supports a mocking of CodeDeploy API operations. +The supported operations are listed on the [API coverage page]({{< ref "coverage_codedeploy" >}}). +## Getting Started ## Limitations - From e5ba131b364796abadf50f7c749fd84b3dc7f6cf Mon Sep 17 00:00:00 2001 From: Viren Nadkarni Date: Mon, 19 May 2025 19:50:23 +0530 Subject: [PATCH 3/5] Add content --- content/en/user-guide/aws/codedeploy/index.md | 115 ++++++++++++++++++ 1 file changed, 115 insertions(+) diff --git a/content/en/user-guide/aws/codedeploy/index.md b/content/en/user-guide/aws/codedeploy/index.md index caaacfe823..3c6df14fa7 100644 --- a/content/en/user-guide/aws/codedeploy/index.md +++ b/content/en/user-guide/aws/codedeploy/index.md @@ -17,4 +17,119 @@ The supported operations are listed on the [API coverage page]({{< ref "coverage ## Getting Started +This guide will walk through the process of creating CodeDeploy applications, deployment configuration, deployment groups, and deployments. + +Basic knowledge of the AWS CLI and the [`awslocal`](https://github.com/localstack/awscli-local) wrapper is expected. + +Start LocalStack using your preferred method. + +### Applications + +An application is a CodeDeploy construct that uniquely identifies your targetted application. +Create an application with the [CreateApplication](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateApplication.html) operation: + +{{< command >}} +$ awslocal deploy create-application --application-name hello --compute-platform Server + +{ + "applicationId": "063714b6-f438-4b90-bacb-ce04af7f5e83" +} + +{{< /command >}} + +Make note of the application name, which can be used with other operations such as [GetApplication](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_GetApplication.html), [UpdateApplication](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_UpdateApplication.html) and [DeleteApplication](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_DeleteApplication.html). + +{{< command >}} +$ awslocal deploy get-application --application-name hello + +{ + "application": { + "applicationId": "063714b6-f438-4b90-bacb-ce04af7f5e83", + "applicationName": "hello", + "createTime": 1747663397.271634, + "computePlatform": "Server" + } +} + +{{< /command >}} + +You can list all application using [ListApplications](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_ListApplications.html). + +{{< command >}} +$ awslocal deploy list-applications + +{ + "applications": [ + "hello" + ] +} + +{{< /command >}} + +{{< command >}} + + +{{< /command >}} + +### Deployment configuration + +A deployment configuration consists of rules for deployment along with success and failure criteria. + +Create a deployment configuration using [CreateDeploymentConfig](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeploymentConfig.html): + +{{< command >}} +$ awslocal deploy create-deployment-config --deployment-config-name hello-conf \ + --compute-platform Server \ + --minimum-healthy-hosts '{"type": "HOST_COUNT", "value": 1}' + +{ + "deploymentConfigId": "0327ce0a-4637-4884-8899-49af7b9423b6" +} + +{{< /command >}} + + +[ListDeploymentConfigs](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_ListDeploymentConfigs.html) can be used to list all available configs: + +{{< command >}} +$ awslocal deploy list-deployment-configs + +{ + "deploymentConfigsList": [ + "hello-conf" + ] +} + +{{< /command >}} + +Use [GetDeploymentConfig](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_GetDeploymentConfig.html) and [DeleteDeploymentConfig](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_DeleteDeploymentConfig.html) to manage deployment configurations. + +{{< command >}} +$ awslocal deploy get-deployment-config --deployment-config-name hello-conf + +{ + "deploymentConfigInfo": { + "deploymentConfigId": "0327ce0a-4637-4884-8899-49af7b9423b6", + "deploymentConfigName": "hello-conf", + "minimumHealthyHosts": { + "type": "HOST_COUNT", + "value": 1 + }, + "createTime": 1747663716.208291, + "computePlatform": "Server" + } +} + +{{< /command >}} + +### Deployment groups + +### Deployments + +Operations related to deployment management are: CreateDeployment, GetDeployment, ListDeployments + + +Furthermore, ContinueDeployment and StopDeployment can be used to control the deployment flows. + + ## Limitations From c3161c1804970b5577dd649ab2e8248e541debb0 Mon Sep 17 00:00:00 2001 From: Viren Nadkarni Date: Tue, 20 May 2025 19:50:02 +0530 Subject: [PATCH 4/5] Add content --- content/en/user-guide/aws/codedeploy/index.md | 132 ++++++++++++++++-- 1 file changed, 124 insertions(+), 8 deletions(-) diff --git a/content/en/user-guide/aws/codedeploy/index.md b/content/en/user-guide/aws/codedeploy/index.md index 3c6df14fa7..70cf6e530a 100644 --- a/content/en/user-guide/aws/codedeploy/index.md +++ b/content/en/user-guide/aws/codedeploy/index.md @@ -66,11 +66,6 @@ $ awslocal deploy list-applications {{< /command >}} -{{< command >}} - - -{{< /command >}} - ### Deployment configuration A deployment configuration consists of rules for deployment along with success and failure criteria. @@ -88,7 +83,6 @@ $ awslocal deploy create-deployment-config --deployment-config-name hello-conf \ {{< /command >}} - [ListDeploymentConfigs](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_ListDeploymentConfigs.html) can be used to list all available configs: {{< command >}} @@ -124,12 +118,134 @@ $ awslocal deploy get-deployment-config --deployment-config-name hello-conf ### Deployment groups +Deployment groups can be managed with [CreateDeploymentGroup](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeploymentGroup.html), [ListDeploymentGroups](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_ListDeploymentGroups.html), [UpdateDeploymentGroup](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_UpdateDeploymentGroup.html), [GetDeploymentGroup](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_GetDeploymentGroup.html) and [DeleteDeploymentGroup](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_DeleteDeploymentGroup.html). + +{{< command >}} +$ awslocal deploy create-deployment-group \ + --application-name hello \ + --service-role-arn arn:aws:iam::000000000000:role/role \ + --deployment-group-name hello-group + +{ + "deploymentGroupId": "09506586-9ba9-4005-a1be-840407abb39d" +} + +{{< /command >}} + +{{< command >}} +$ awslocal deploy list-deployment-groups --application-name hello + +{ + "deploymentGroups": [ + "hello-group" + ] +} + +{{< /command >}} + +{{< command >}} +$ awslocal deploy get-deployment-group --application-name hello \ + --deployment-group-name hello-group + +{ + "deploymentGroupInfo": { + "applicationName": "hello", + "deploymentGroupId": "09506586-9ba9-4005-a1be-840407abb39d", + "deploymentGroupName": "hello-group", + "deploymentConfigName": "CodeDeployDefault.OneAtATime", + "autoScalingGroups": [], + "serviceRoleArn": "arn:aws:iam::000000000000:role/role", + "triggerConfigurations": [], + "deploymentStyle": { + "deploymentType": "IN_PLACE", + "deploymentOption": "WITHOUT_TRAFFIC_CONTROL" + }, + "outdatedInstancesStrategy": "UPDATE", + "computePlatform": "Server", + "terminationHookEnabled": false + } +} + +{{< /command >}} + ### Deployments -Operations related to deployment management are: CreateDeployment, GetDeployment, ListDeployments +Operations related to deployment management are: [CreateDeployment](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_CreateDeployment.html), [GetDeployment](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_GetDeployment.html), [ListDeployments](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_ListDeployments.html). + +{{< command >}} +$ awslocal deploy create-deployment \ + --application-name hello \ + --deployment-group-name hello-group \ + --revision '{"revisionType": "S3", "s3Location": {"bucket": "placeholder", "key": "placeholder", "bundleType": "tar"}}' + +{ + "deploymentId": "d-TU3TNCSTO" +} + +{{< /command >}} + +{{< command >}} +$ awslocal deploy list-deployments + +{ + "deployments": [ + "d-TU3TNCSTO" + ] +} + +{{< /command >}} + +{{< command >}} +$ awslocal deploy get-deployment --deployment-id d-TU3TNCSTO + +{ + "deploymentInfo": { + "applicationName": "hello", + "deploymentGroupName": "hello-group", + "deploymentConfigName": "CodeDeployDefault.OneAtATime", + "deploymentId": "d-TU3TNCSTO", + "revision": { + "revisionType": "S3", + "s3Location": { + "bucket": "placeholder", + "key": "placeholder", + "bundleType": "tar" + } + }, + "status": "Created", + "createTime": 1747750522.133381, + "creator": "user", + "ignoreApplicationStopFailures": false, + "updateOutdatedInstancesOnly": false, + "deploymentStyle": { + "deploymentType": "IN_PLACE", + "deploymentOption": "WITHOUT_TRAFFIC_CONTROL" + }, + "instanceTerminationWaitTimeStarted": false, + "fileExistsBehavior": "DISALLOW", + "deploymentStatusMessages": [], + "computePlatform": "Server" + } +} + +{{< /command >}} +Furthermore, [ContinueDeployment](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_StopDeployment.html) and [StopDeployment](https://docs.aws.amazon.com/codedeploy/latest/APIReference/API_StopDeployment.html) can be used to control the deployment flows. -Furthermore, ContinueDeployment and StopDeployment can be used to control the deployment flows. +{{< command >}} +$ awslocal deploy continue-deployment --deployment-id d-TU3TNCSTO +{{< /command >}} +{{< command >}} +$ awslocal deploy stop-deployment --deployment-id d-TU3TNCSTO + +{ + "status": "Succeeded", + "statusMessage": "Mock deployment stopped" +} + +{{< /command >}} ## Limitations + +All CodeDeploy operations are currently mocked. From 1a3b70cfb399404ec2032ed02d2b08f7b56074a9 Mon Sep 17 00:00:00 2001 From: Viren Nadkarni Date: Fri, 30 May 2025 15:59:51 +0530 Subject: [PATCH 5/5] Fix title for coverage page --- content/en/references/coverage/coverage_codedeploy/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/en/references/coverage/coverage_codedeploy/index.md b/content/en/references/coverage/coverage_codedeploy/index.md index 970c6eebb3..c4c85d3102 100644 --- a/content/en/references/coverage/coverage_codedeploy/index.md +++ b/content/en/references/coverage/coverage_codedeploy/index.md @@ -1,6 +1,6 @@ --- -title: "codedeploy" -linkTitle: "codedeploy" +title: "CodeDeploy" +linkTitle: "CodeDeploy" description: > Implementation details for API codedeploy hide_readingtime: true