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

Add support for docker options specific to the ambari server . #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rmelick
Copy link

@rmelick rmelick commented Feb 23, 2016

This is very convenient for port forwarding 8080 to a specific port on the localhost. This lets you use the same url to reach the ambari server even after docker restarts.

Convenient for port forwarding 8080 to a specific port on the localhost.
@lalyos
Copy link
Contributor

lalyos commented Feb 23, 2016

If you want to use fixed urls. I would suggest to use the consul provided dns names.
You can use the export EXPOSE_DNS=true and than consul provided dns is available on the host

Than you can put nameserver 127.0.0.1 into your /etc/resolv.conf

After that you can always refer to ambari server as http://amb-server.service.consul:8080

@rmelick
Copy link
Author

rmelick commented Feb 24, 2016

Thanks @lalyos . I'm running Ubuntu 15.10 with Network Manager, so it's already using port 53 on my localhost for the dnsmasq. Trying to forward port 53 fails. I did figure out a workaround that might work for others using Ubuntu and Network Manager.

Since the consul container won't always have the same ip address (although so far it has always been the same for me), you can't just add it to your list of dns servers once through the ui. But, you can figure out the ip of the consul

get-host-ip amb-consul
or

AMBARI_CONSUL_IP=`docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' amb-consul`

Then, you can use the nmcli command line interface to Network Manager to add it to the list of dns server

nmcli -p connection modify "Wired connection 1" +ipv4.dns $AMBARI_CONSUL_IP`
nmcli -p connection up "Wired connection 1"

This does not handle getting rid of the old ip from the list though.

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

Successfully merging this pull request may close these issues.

2 participants