Add payment service
This commit is contained in:
@@ -46,6 +46,10 @@ Parameters:
|
|||||||
Type: String
|
Type: String
|
||||||
Default: ratings
|
Default: ratings
|
||||||
Description: The cart service name
|
Description: The cart service name
|
||||||
|
PaymentServiceName:
|
||||||
|
Type: String
|
||||||
|
Default: payment
|
||||||
|
Description: The payment service name
|
||||||
ImageUrl:
|
ImageUrl:
|
||||||
Type: String
|
Type: String
|
||||||
Default: nginx
|
Default: nginx
|
||||||
@@ -91,6 +95,10 @@ 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
|
||||||
|
PaymentContainerPort:
|
||||||
|
Type: Number
|
||||||
|
Default: 8080
|
||||||
|
Description: What port number the application inside the docker container is binding to
|
||||||
ContainerCpu:
|
ContainerCpu:
|
||||||
Type: Number
|
Type: Number
|
||||||
Default: 256
|
Default: 256
|
||||||
@@ -422,6 +430,39 @@ Resources:
|
|||||||
DesiredCount: 1
|
DesiredCount: 1
|
||||||
TaskDefinition: !Ref 'RatingsTaskDefinition'
|
TaskDefinition: !Ref 'RatingsTaskDefinition'
|
||||||
|
|
||||||
|
# payment service
|
||||||
|
PaymentTaskDefinition:
|
||||||
|
Type: AWS::ECS::TaskDefinition
|
||||||
|
DependsOn: ['RabbitMqService']
|
||||||
|
Properties:
|
||||||
|
Family: !Ref 'PaymentServiceName'
|
||||||
|
Cpu: !Ref 'ContainerCpu'
|
||||||
|
Memory: !Ref 'ContainerMemory'
|
||||||
|
TaskRoleArn:
|
||||||
|
Fn::If:
|
||||||
|
- 'HasCustomRole'
|
||||||
|
- !Ref 'Role'
|
||||||
|
- !Ref "AWS::NoValue"
|
||||||
|
ContainerDefinitions:
|
||||||
|
- Name: !Ref 'PaymentServiceName'
|
||||||
|
Cpu: !Ref 'ContainerCpu'
|
||||||
|
Memory: !Ref 'ContainerMemory'
|
||||||
|
Image: robotshop/rs-payment
|
||||||
|
PortMappings:
|
||||||
|
- ContainerPort: !Ref 'PaymentContainerPort'
|
||||||
|
LogConfiguration:
|
||||||
|
LogDriver: json-file
|
||||||
|
PaymentService:
|
||||||
|
Type: AWS::ECS::Service
|
||||||
|
DependsOn: LoadBalancerRule
|
||||||
|
Properties:
|
||||||
|
ServiceName: !Ref 'PaymentServiceName'
|
||||||
|
Cluster:
|
||||||
|
Fn::ImportValue:
|
||||||
|
!Join [':', [!Ref 'StackName', 'ClusterName']]
|
||||||
|
DesiredCount: 1
|
||||||
|
TaskDefinition: !Ref 'PaymentTaskDefinition'
|
||||||
|
|
||||||
WebTaskDefinition:
|
WebTaskDefinition:
|
||||||
Type: AWS::ECS::TaskDefinition
|
Type: AWS::ECS::TaskDefinition
|
||||||
Properties:
|
Properties:
|
||||||
|
Reference in New Issue
Block a user