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

Bind task to specific IP address #426

Closed
abatsakis opened this issue Jun 14, 2016 · 3 comments
Closed

Bind task to specific IP address #426

abatsakis opened this issue Jun 14, 2016 · 3 comments

Comments

@abatsakis
Copy link

Hi all,

I was wondering if there are any plans in supporting the binding of a task to a specific IP address on the host that can e.g. provided at RunTask time similar to docker's -p IP:host_port:container_port

This is very handy for instances with multiple interfaces on different subnets

@kiranmeduri
Copy link
Contributor

IIUC you are asking on how can ECS tasks running on EC2 instances support ENIs. We are currently gathering requirements to support this and would love to understand more about your use-case. Is your case to assign one IP per task and have that IP constrained by policies defined in the VPC/Subnet/Security Groups?

In the current system even if we support passing in IP in RunTask API, you need to know IP beforehand which is not true in RunTask case which doesn't take containerInstance as input. May be you meant StartTask API. Even in that scenario it is interesting to understand more about the end-to-end flow.

Thanks for bringing this up.

-kiran

@samuelkarp
Copy link
Contributor

@abatsakis We're working on attaching ENIs to tasks and allowing IP addresses per task. Does the proposal in #701 address your use-case?

goodhart pushed a commit to goodhart/amazon-ecs-agent that referenced this issue Sep 7, 2017
---* Motivation *---
By hardcoding the host IP as 0.0.0.0, the agent is removing the ability for customers to specify specific host IP addresses (such as when there are multiple network interfaces). By default, the docker daemon defaults to 0.0.0.0, but this value may be overridden by launching the daemon with a --ip flag. https://docs.docker.com/engine/reference/commandline/dockerd/

This also has an implication for the CloudWatch Events published by ECS. Specifically, prior to this change the 'bindIP' field in the ECS Task Status events always contains '0.0.0.0'.

This change will benefit the following customer use cases:
* aws#426
* https://forums.aws.amazon.com/thread.jspa?threadID=173250
* https://serverfault.com/questions/695393/amazon-ecs-docker-binding-container-to-specific-ip-address

---* Detailed Description *---
Do not explicitly set the HostIP property when starting containers and instead defer to the daemon's default.
aaithal pushed a commit that referenced this issue Oct 6, 2017
---* Motivation *---
By hardcoding the host IP as 0.0.0.0, the agent is removing the ability for customers to specify specific host IP addresses (such as when there are multiple network interfaces). By default, the docker daemon defaults to 0.0.0.0, but this value may be overridden by launching the daemon with a --ip flag. https://docs.docker.com/engine/reference/commandline/dockerd/

This also has an implication for the CloudWatch Events published by ECS. Specifically, prior to this change the 'bindIP' field in the ECS Task Status events always contains '0.0.0.0'.

This change will benefit the following customer use cases:
* #426
* https://forums.aws.amazon.com/thread.jspa?threadID=173250
* https://serverfault.com/questions/695393/amazon-ecs-docker-binding-container-to-specific-ip-address

---* Detailed Description *---
Do not explicitly set the HostIP property when starting containers and instead defer to the daemon's default.
@adnxn
Copy link
Contributor

adnxn commented Nov 29, 2017

@abatsakis We've released task networking for containers as proposed in #701. I'm closing this issue since we haven't heard back, but feel free to let us know if this addresses your use case.

@adnxn adnxn closed this as completed Nov 29, 2017
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

4 participants