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 consul to a specific IP #391

Closed
raju-divakaran opened this issue Jan 9, 2017 · 4 comments
Closed

Bind consul to a specific IP #391

raju-divakaran opened this issue Jan 9, 2017 · 4 comments

Comments

@raju-divakaran
Copy link

Hello,

Recently we enabled docker-engine on a server where we are having consul agent also running. Soon after starting docker-engine, as we know the docker0 ( default bridge n/w ) is enabled. This results in consul not getting started, as it complains there are multiple internal IPs.

Can we please incorporate a way to bind consul agent to an IP if needed by including that option in the systemd file.

Thanks

@legal90
Copy link
Contributor

legal90 commented Jan 9, 2017

Hi @raju-divakaran
You can set any consul configuration option by overriding the attribute, for example in a wrapper recipe:

node.override['consul']['config'][OPT_NAME] = OPT_VALUE

In particular, for bind_addr it will be:

node.override['consul']['config']['bind_addr'] = '10.10.20.30'

Being passed to consul_config resource, these options will be rendered in /etc/consul/consul.json and parsed by the consul daemon after the service restart.
https://github.com/johnbellone/consul-cookbook/blob/3e123c2706250a9589874c8d01824eeeab090f0a/recipes/default.rb#L43

@legal90
Copy link
Contributor

legal90 commented Jan 12, 2017

I hope my comment above helps.
Closing this issue.

@legal90 legal90 closed this as completed Jan 12, 2017
@raju-divakaran
Copy link
Author

Yes, I don't know how I missed that option. Thanks much!

@lock
Copy link

lock bot commented Apr 25, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Apr 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants