Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mapping for depends_on and ContainerDependency #897

Closed
dkovvuri opened this issue Jul 27, 2019 · 9 comments
Closed

Mapping for depends_on and ContainerDependency #897

dkovvuri opened this issue Jul 27, 2019 · 9 comments

Comments

@dkovvuri
Copy link

dkovvuri commented Jul 27, 2019

Support transformation of depends_on in Docker Compose to ContainerDependency objects in the ECS task definition.

ECS has recently announced support for container dependency within a task. When using the ecs-cli to transform a docker-compose file to an ECS task definition the options depends_on are skipped with the error:

WARN[0000] Skipping unsupported YAML option for service... option name=depends_on service name=webserver

Steps to Replicate

I. Docker-Compose File

version: '2'
services:
    redis:
        image: 'redis:3.2.7'

    postgres:
        image: postgres:9.6
        environment:
            - POSTGRES_USER=airflow
            - POSTGRES_PASSWORD=airflow
            - POSTGRES_DB=airflow

    webserver:
        image: puckel/docker-airflow:1.10.3
        restart: always
        links:
            - postgres
            - redis
        depends_on:
            - postgres
            - redis
        ports:
            - "8080:8080"
        command: webserver

II. Run ecs-cli

ecs-cli compose --file compose.yml --project-name test run --region us-east-1
@PettitWesley
Copy link
Contributor

I like this idea; depends_on could be mapped to a container dependency with condition START.

@robbymarston
Copy link

+1, I would find this incredibly useful!

@PavanYadala
Copy link

PavanYadala commented Oct 2, 2019

Where should i mention the depends_on option. In doker-compose.yml or ecs-parms.yml? Also please let me know the format as well. I want my web app should be started before my nginx server starts.

@PavanYadala
Copy link

Support transformation of depends_on in Docker Compose to ContainerDependency objects in the ECS task definition.

ECS has recently announced support for container dependency within a task. When using the ecs-cli to transform a docker-compose file to an ECS task definition the options depends_on are skipped with the error:

WARN[0000] Skipping unsupported YAML option for service... option name=depends_on service name=webserver

Steps to Replicate

I. Docker-Compose File

version: '2'
services:
    redis:
        image: 'redis:3.2.7'

    postgres:
        image: postgres:9.6
        environment:
            - POSTGRES_USER=airflow
            - POSTGRES_PASSWORD=airflow
            - POSTGRES_DB=airflow

    webserver:
        image: puckel/docker-airflow:1.10.3
        restart: always
        links:
            - postgres
            - redis
        depends_on:
            - postgres
            - redis
        ports:
            - "8080:8080"
        command: webserver

II. Run ecs-cli

ecs-cli compose --file compose.yml --project-name test run --region us-east-1

Where should i mention the depends_on option. In doker-compose.yml or ecs-parms.yml? Also please let me know the format as well. I want my web app should be started before my nginx server starts.

@Sylvestre67
Copy link

Is there any way to set of the dependsOn array of a task_definition.container_definitions using ecs-cli at this moment ?

@rohitg1594
Copy link

Any updates on this? I would really love to have this feature.

@ekanai
Copy link

ekanai commented Dec 19, 2019

When this issue will be supported?

@diablodale
Copy link
Contributor

I think customers will have to do this without the ecs-cli team. They wrote yesterday, "We’ve shifted our resources over the past few months to developing [ecs-cli] v2..."
aws/containers-roadmap#513 (comment)

With that in mind, I suggest someone take on this code fix themselves. Fork the repo and submit a PR. We can share the PR in our private forks of this repo until/if ecs-cli team integrates the PR.

@allisaurus
Copy link
Contributor

Closing, as this feature is now available in v1.21.0 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

9 participants