compose-cli
compose-cli copied to clipboard
ECS context does not, in fact, honor update_config
Description
When deploying a docker compose service to ECS with a stop-first update policy the deployment will fail if the generated cloudformation template yaml is used.
Steps to reproduce the issue:
- Define a docker-compose service for an applicaiton such as Minecraft that uses a .lock file to prevent multiple instances of the minecraft server running.
- Ensure that update_config.order = stop-first is set.
-
docker compose --context ecs-context convert > cloudformation.yaml
-
aws cloudformation create-stack --template-body file://cloudformation.yaml
- modify the service in some way
-
aws cloudformation update-stack --template-body file://cloudformation.yaml
Describe the results you received:
The following warnings are emitted indicating that the update_config section was not, in fact, supported, as claimed
WARNING services.build: unsupported attribute
WARNING services.deploy.update_config.failure_action: unsupported attribute
WARNING services.deploy.update_config.order: unsupported attribute
WARNING services.scale: unsupported attribute
In addition, the generated cloudformation yaml contains the following under the Service:
DeploymentConfiguration:
MaximumPercent: 200
MinimumHealthyPercent: 100
The deployment, triggered by step 6, never completes as AWS will not stop the running Task untill the Task with revision 2 starts successfully, but it cannot becase of the lock on the shared volume.
Describe the results you expected:
stop-first - the default, with 1 replica, should generate a cloudformation DeploymentConfiguration for the service that allows the service to be stopped first, and ensures 2 copies do not run:
DeploymentConfiguration:
MaximumPercent: 100
MinimumHealthyPercent: 0
This result can be achieved using x-aws-min_percent
and x-aws-max_percent
BUT the document does claim that deploy.update_config
is generally supported, which is clearly not correct here.
Output of docker-compose --version
:
Docker Compose version v2.7.0
Output of docker version
:
Client:
Cloud integration: v1.0.28
Version: 20.10.17
API version: 1.41
Go version: go1.17.11
Git commit: 100c701
Built: Mon Jun 6 23:04:45 2022
OS/Arch: darwin/amd64
Context: default
Experimental: true
Server: Docker Desktop 4.11.1 (84025)
Engine:
Version: 20.10.17
API version: 1.41 (minimum version 1.12)
Go version: go1.17.11
Git commit: a89b842
Built: Mon Jun 6 23:01:23 2022
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.6
GitCommit: 10c12954828e7c7c9b6e0ea9b0c02b01407d3ae1
runc:
Version: 1.1.2
GitCommit: v1.1.2-0-ga916309
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Output of docker context show
:
[
{
"Name": "gt-sandbox",
"Metadata": {
"Description": "(eu-north-1)",
"Type": "ecs"
},
"Endpoints": {
"docker": {
"SkipTLSVerify": false
},
"ecs": {
"Profile": "default"
}
},
"TLSMaterial": {},
"Storage": {
"MetadataPath": "...",
"TLSPath": "..."
}
}
]
Output of docker info
:
Client:
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc., v0.8.2)
compose: Docker Compose (Docker Inc., v2.7.0)
extension: Manages Docker extensions (Docker Inc., v0.2.8)
sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc., 0.6.0)
scan: Docker Scan (Docker Inc., v0.17.0)
Additional environment details (AWS ECS, Azure ACI, local, etc.):
AWS ECS
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it had not recent activity during the stale period.