mirror of https://github.com/docker/compose.git
Configure Deployment controller
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
parent
e7bc8081ba
commit
35019564e4
|
@ -163,12 +163,20 @@ func (b Backend) Convert(project *types.Project) (*cloudformation.Template, erro
|
||||||
for _, dependency := range service.DependsOn {
|
for _, dependency := range service.DependsOn {
|
||||||
dependsOn = append(dependsOn, serviceResourceName(dependency))
|
dependsOn = append(dependsOn, serviceResourceName(dependency))
|
||||||
}
|
}
|
||||||
|
|
||||||
template.Resources[serviceResourceName(service.Name)] = &ecs.Service{
|
template.Resources[serviceResourceName(service.Name)] = &ecs.Service{
|
||||||
AWSCloudFormationDependsOn: dependsOn,
|
AWSCloudFormationDependsOn: dependsOn,
|
||||||
Cluster: cluster,
|
Cluster: cluster,
|
||||||
DesiredCount: desiredCount,
|
DesiredCount: desiredCount,
|
||||||
LaunchType: ecsapi.LaunchTypeFargate,
|
DeploymentController: &ecs.Service_DeploymentController{
|
||||||
LoadBalancers: serviceLB,
|
Type: ecsapi.DeploymentControllerTypeEcs,
|
||||||
|
},
|
||||||
|
DeploymentConfiguration: &ecs.Service_DeploymentConfiguration{
|
||||||
|
MaximumPercent: 200,
|
||||||
|
MinimumHealthyPercent: 100,
|
||||||
|
},
|
||||||
|
LaunchType: ecsapi.LaunchTypeFargate,
|
||||||
|
LoadBalancers: serviceLB,
|
||||||
NetworkConfiguration: &ecs.Service_NetworkConfiguration{
|
NetworkConfiguration: &ecs.Service_NetworkConfiguration{
|
||||||
AwsvpcConfiguration: &ecs.Service_AwsVpcConfiguration{
|
AwsvpcConfiguration: &ecs.Service_AwsVpcConfiguration{
|
||||||
AssignPublicIp: ecsapi.AssignPublicIpEnabled,
|
AssignPublicIp: ecsapi.AssignPublicIpEnabled,
|
||||||
|
|
|
@ -87,6 +87,13 @@
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
"DeploymentConfiguration": {
|
||||||
|
"MaximumPercent": 200,
|
||||||
|
"MinimumHealthyPercent": 100
|
||||||
|
},
|
||||||
|
"DeploymentController": {
|
||||||
|
"Type": "ECS"
|
||||||
|
},
|
||||||
"DesiredCount": 1,
|
"DesiredCount": 1,
|
||||||
"LaunchType": "FARGATE",
|
"LaunchType": "FARGATE",
|
||||||
"LoadBalancers": [
|
"LoadBalancers": [
|
||||||
|
@ -220,10 +227,6 @@
|
||||||
"Properties": {
|
"Properties": {
|
||||||
"ContainerDefinitions": [
|
"ContainerDefinitions": [
|
||||||
{
|
{
|
||||||
"DockerLabels": {
|
|
||||||
"com.docker.compose.project": "TestSimpleConvert",
|
|
||||||
"com.docker.compose.service": "simple"
|
|
||||||
},
|
|
||||||
"Environment": [
|
"Environment": [
|
||||||
{
|
{
|
||||||
"Name": "LOCALDOMAIN",
|
"Name": "LOCALDOMAIN",
|
||||||
|
@ -275,16 +278,6 @@
|
||||||
"NetworkMode": "awsvpc",
|
"NetworkMode": "awsvpc",
|
||||||
"RequiresCompatibilities": [
|
"RequiresCompatibilities": [
|
||||||
"FARGATE"
|
"FARGATE"
|
||||||
],
|
|
||||||
"Tags": [
|
|
||||||
{
|
|
||||||
"Key": "com.docker.compose.project",
|
|
||||||
"Value": "TestSimpleConvert"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"Key": "com.docker.compose.service",
|
|
||||||
"Value": "simple"
|
|
||||||
}
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"Type": "AWS::ECS::TaskDefinition"
|
"Type": "AWS::ECS::TaskDefinition"
|
||||||
|
|
Loading…
Reference in New Issue