unique task def per job

pull/218/head
Frostebite 2021-02-07 14:33:42 +00:00
parent 277d7d5a28
commit cc58b23bb4
2 changed files with 9 additions and 4 deletions

View File

@ -3,6 +3,7 @@ Description: AWS Fargate cluster that can span public and private subnets. Suppo
public facing load balancers, private internal load balancers, and public facing load balancers, private internal load balancers, and
both internal and external service discovery namespaces. both internal and external service discovery namespaces.
Parameters: Parameters:
EnvironmentName: EnvironmentName:
Type: String Type: String
Default: development Default: development
@ -12,6 +13,7 @@ Parameters:
Type: String Type: String
Default: example Default: example
Description: A name for the service Description: A name for the service
ImageUrl: ImageUrl:
Type: String Type: String
Default: nginx Default: nginx
@ -22,22 +24,21 @@ Parameters:
Type: Number Type: Number
Default: 80 Default: 80
Description: What port number the application inside the docker container is binding to Description: What port number the application inside the docker container is binding to
ContainerCpu: ContainerCpu:
Type: Number Type: Number
Default: 256 Default: 256
Description: How much CPU to give the container. 1024 is 1 CPU Description: How much CPU to give the container. 1024 is 1 CPU
ContainerMemory: ContainerMemory:
Type: Number Type: Number
Default: 512 Default: 512
Description: How much memory in megabytes to give the container Description: How much memory in megabytes to give the container
Prefix: Prefix:
Type: String Type: String
Default: "test" Default: "test"
DesiredCount:
Type: Number
Default: 1
Description: How many copies of the service task to run
Role: Role:
Type: String Type: String
Default: "" Default: ""

View File

@ -46,6 +46,10 @@ class AWS {
ParameterKey: 'ImageUrl', ParameterKey: 'ImageUrl',
ParameterValue: image, ParameterValue: image,
}, },
{
ParameterKey: 'ServiceName',
ParameterValue: taskDefStackName,
},
], ],
}).promise(); }).promise();
await CF.waitFor('stackCreateComplete', { StackName: taskDefStackName }).promise(); await CF.waitFor('stackCreateComplete', { StackName: taskDefStackName }).promise();