2017-12-15 14:15:01 +01:00
|
|
|
ecs_cluster_name: "{{ resource_prefix }}"
|
|
|
|
user_data: |
|
|
|
|
#!/bin/bash
|
|
|
|
echo ECS_CLUSTER={{ ecs_cluster_name }} >> /etc/ecs/ecs.config
|
|
|
|
|
|
|
|
ecs_service_name: "{{ resource_prefix }}-service"
|
|
|
|
ecs_task_image_path: nginx
|
|
|
|
ecs_task_name: "{{ resource_prefix }}-task"
|
|
|
|
ecs_task_memory: 128
|
|
|
|
ecs_task_containers:
|
|
|
|
- name: "{{ ecs_task_name }}"
|
|
|
|
image: "{{ ecs_task_image_path }}"
|
|
|
|
essential: true
|
|
|
|
memory: "{{ ecs_task_memory }}"
|
|
|
|
portMappings:
|
|
|
|
- containerPort: "{{ ecs_task_container_port }}"
|
|
|
|
hostPort: "{{ ecs_task_host_port|default(0) }}"
|
|
|
|
mountPoints: "{{ ecs_task_mount_points|default([]) }}"
|
|
|
|
ecs_service_deployment_configuration:
|
|
|
|
minimum_healthy_percent: 0
|
|
|
|
maximum_percent: 100
|
|
|
|
ecs_service_placement_strategy:
|
|
|
|
- type: binpack
|
|
|
|
field: memory
|
|
|
|
- type: spread
|
|
|
|
field: attribute:ecs.availability-zone
|
|
|
|
ecs_task_container_port: 8080
|
2018-04-25 21:41:04 +02:00
|
|
|
ecs_target_group_name: "{{ resource_prefix[:28] }}-tg"
|
2017-12-15 14:15:01 +01:00
|
|
|
ecs_load_balancer_name: "{{ resource_prefix[:29] }}-lb"
|
2018-11-23 13:35:25 +01:00
|
|
|
ecs_service_health_check_grace_period: 60
|
2018-05-24 20:29:20 +02:00
|
|
|
ecs_fargate_task_containers:
|
|
|
|
- name: "{{ ecs_task_name }}"
|
|
|
|
image: "{{ ecs_task_image_path }}"
|
|
|
|
essential: true
|
|
|
|
portMappings:
|
|
|
|
- containerPort: "{{ ecs_task_container_port }}"
|
|
|
|
hostPort: "{{ ecs_task_host_port|default(0) }}"
|
|
|
|
#mountPoints: "{{ ecs_task_mount_points|default([]) }}"
|