3. Network Configuration
Deploying on AWS
Change the Hostname
Set a hostname for your Ambari server and nodes of the Hadoop cluster. Change the hostname to the Private DNS. Run this command, for example, as root to set a new hostname:
Repeat this on all hosts!
Deploying OVA on ESXi
Configure Network
The Hadoop VM is set to use DHCP by default. If a static IP is desired, you may choose either of these options:
Option 1 Use this utility:
Option 2 Manually update file
/etc/sysconfig/network-scripts/ifcfg-eth0
. Below, is an example of a static IP setting:
Then restart the network service or reboot the server for the changes to take effect. Command to restart the network:
Set the Hostname
To set a hostname for your Ambari server, run the command:
In the above command, substitute the <hostname>
variable for the actual hostname of your Ambari server. For example: Set a hostname for your Ambari server and nodes of the Hadoop cluster. Change the hostname to the Private DNS. Run this command, for example, as root to set a new hostname:
This hostname must be configured for both forward and reverse DNS. The Ambari and Hadoop applications must be able to translate the hostname to its IP address and back in order to work properly.
Update /etc/hosts file
Note
This step is optional if the hostname resolution is done by your DNS.
Update the /etc/hosts
file by adding, for each node, one entry of IP address and hostname. You will need to repeat this procedure in every cluster node.
Warning
The /etc/hosts
file on ALL nodes must have the hostname and IP of ALL nodes in the Hadoop cluster.
Example of how your /etc/hosts
file should look like:
Where 10.1.1.1
is the IP address of the node1 with hostname node1.hadoop-server.company.com
. The following line applies to a node2 in the same fashion, and so forth. The /etc/hosts
file in this example is identical in node1, node2, node3, node4 and node5.
Tip
If you are using DHCP, the IP address can be obtained using the ifconfig
command.
Caution
Do NOT set 127.0.0.1
to the hostname of the node VM. Hadoop host registration will fail.
Deploying on Azure
Change the Hostname
Set a hostname for your Ambari server and the nodes of the Hadoop cluster. Change the hostname so that it uses the name of the VM name with the Azure's default DNS suffix (internal.cloudapp.net).
Run this command, for example, as root to set a new hostname:
Repeat this on all hosts!