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

How to select the private IP to use to advertise consul agent ? #10

Open
lucj opened this issue Sep 12, 2017 · 1 comment
Open

How to select the private IP to use to advertise consul agent ? #10

lucj opened this issue Sep 12, 2017 · 1 comment

Comments

@lucj
Copy link
Contributor

lucj commented Sep 12, 2017

I'm using ContainerPilot on a micro-services application deployed on a Swarm.

Within a redis container (based on the autopilotpattern/redis image), there are several interfaces (due to Swarm) and I do not manage to select the correct private IP as the consul agent's advertise address. As consul sees several private IP, I need to select one though.

Is there a way to specify the interface to use in case several are present ? An env var which could be provided in the compose file ?

This env var could be used to get the correct IP which then could be set in a etc/consul.json file using sed like replacement (as suggested in TritonDataCenter/containerpilot#258).

This env var could also be used in manage.py and defaut to eth0 (currently hardcoded:https://github.com/autopilotpattern/redis/blob/7588d9c604643d7eb1ea9c919929bee7f914e8fa/bin/manage.sh#L314-316

I'm currently having some hard time deploying ContainerPilot on Swarm :
(TritonDataCenter/containerpilot#503)

What do you think ?

@jwreagor
Copy link

jwreagor commented Oct 9, 2017

Apologies for not getting back to you. I think adding an environment variable to configure the interface sounds perfectly reasonable. I'm not sure anyone is going to get a commit out any time soon on our end (for this blueprint) but I'd be happy to code review a PR if you have the time.

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

No branches or pull requests

2 participants