ecs_composex.ecs.ecs_service package ¶
Submodules ¶
ecs_composex.ecs.ecs_service.helpers module ¶
- ecs_composex.ecs.ecs_service.helpers. define_deployment_options ( family , props ) [source] ¶
-
Function to define the DeploymentConfiguration Default is to have Rollback and CircuitBreaker on.
- Parameters :
-
-
family ( ecs_composex.ecs.ecs_family.ComposeFamily ) –
-
props ( dict ) – the troposphere.ecs.Service properties definition to update with deployment config.
-
- Return type :
-
None
- ecs_composex.ecs.ecs_service.helpers. define_family_deploy_percents ( values , default ) [source] ¶
-
Simple function to average out sum of values or return default value :type values:
list
:param values: :type default:int
:param default: :rtype:int
:return: The default or average value
- ecs_composex.ecs.ecs_service.helpers. define_placement_strategies ( ) [source] ¶
-
Function to generate placement strategies. Defaults to spreading across all AZs
- Return type :
-
troposphere.If
- Returns :
-
list of placement strategies
Module contents ¶
Package to build the ECS Service Definition
- class ecs_composex.ecs.ecs_service. EcsService ( family ) [source] ¶
-
Bases:
object
Class representing the service from the Docker compose file and translate it into AWS ECS Task Definition and Service.
- Variables :
-
-
links ( list ) – the links used for DependsOn of the service stack
-
dependencies ( list ) – list of services used for the DependsOn of the service stack
-
config ( ServiceConfig ) – The service configuration
-
task_definition ( troposphere.ecs.TaskDefinition ) – The service task definition for ECS
-
eips ( list<troposphere.ec2.EIP> ) – list of AWS EC2 EIPs which are used for the public NLB
-
service_attrs ( dict ) – Attributes defined to expand the troposphere.ecs.ServiceDefinition from prior settings.
-
- generate_service_definition ( family ) [source] ¶
-
Function to generate the Service definition. This is the last step in defining the service, after all other settings have been prepared.
- Parameters :
-
-
family ( ecs_composex.ecs.ecs_family.ComposeFamily ) –
-
settings ( ecs_composex.common.settings.ComposeXSettings ) –
-
- Return type :
-
None