'How to find valid FQDN value for my ambari agent
I am using this project : https://github.com/adoroszlai/ambari-runtime-compose.git to run ambari on my local system
The docker compose includes one server and one agent.
After running the containers, there are few installation steps :
I am struggling with what could be the valid FQDN name
I tried hostname
, hostname -f
, hostname --fqdn
inside my agent container.
All these 3 values are returing the container id.
So, I tried container id as well but no luck.
Should I add a new entry in the ambari agent's /etc/hosts, not sure what is the correct approach.
Thanks in advance !
Solution 1:[1]
In Compose, you'd use extra_hosts
, not modify /etc/hosts
directly.
Using the container ID (or the IP address shown from docker inspect
) is the more appropriate solution, however. Otherwise you would just use the container service name in the bridge network.
https://docs.docker.com/compose/networking/
Worth pointing out that Ambari Agent-Server communication requires SSH, and having an SSH-server and multiple other processes (that Ambari would install) within containers is a Docker anti-pattern.
Solution 2:[2]
Yes, add your hosts in /etc/hosts as fqdn (Fully Qualified Domain Name) such as "node1.domain.com" and put the full list of all node fqdn's on every node.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | OneCricketeer |
Solution 2 | steven-matison |