Add a new node to an existing cluster
Cloudera Manager makes it very simple to add and remove hosts in a cluster. All host management operations in Cloudera Manager are done from the Hosts screen. In this section, we will go through the steps of adding a new host to the cluster.
There are 2 ways to add a new host
using Cloudera Manager:
1. Let Cloudera Manager install the Cloudera Manager agent and other parcels etc.
2. Manually install the Cloudera Manager Agent and let Cloudera Manager do the rest of the installation.
We will be using the first method. But before we start the addition, make sure you have completed the OS-level configuration as per the post below.
CCA 131 – Perform OS-level configuration for Hadoop installation
Adding a new Host
We will be adding a new host “node04.localdomain” to our existing cluster. Follow the
steps outlined below for node addition.
1. Navigate to the Hosts screen from the Cloudera Manager toolbar. You should see all the hosts that are part of the cluster as shown in the following screenshot:
2. Click on “Add New Hosts to Cluster” button to add new host node04.localdomain. You should see an “Add Hosts Wizard” as shown in the screenshot below. Continue on the next page from here.
3. On the next page, you can specify the host(s) to be added.
4. Click search and let Cloudera Manager scan the host. As we can see in the screenshot below, the new host is scanned successfully.
5. On the “Select Repository” page select Matched release for this Cloudera Manager Server as the repository, click on Continue:
6. Provide the root user credentials for the new host and click on Continue:
7. The Cloudera Manager will go ahead and install the Cloudera Manager agent, Cloudera Manager daemons and Oracle JDK to the new host.
8. The next screen starts the installation of parcels on the node. Once the parcels are installed, click on Continue.
9. The next screen, as shown in the following screenshot, inspects the host for correctness. Once the inspection is complete, click on Continue.
10. Next, select the template to apply to the new host. Host templates define sets of role groups that can be used to easily expand clusters by populating new hosts with roles. This is particularly useful if you are adding a lot of new hosts as worker nodes. We do not have a template created yet, so we will go ahead with the “None” option selected. We will add a template later on.
11. A message is displayed indicating successful “Deploy Client Configuration Command”.
12. You should see the new host added into the CDH cluster without any roles assigned to it currently.
Creating Host Templates
Host templates define sets of role groups that can be used to easily expand clusters by
populating new hosts with roles. Host templates can also be applied to hosts with existing roles to reconfigure them. Hosts with existing roles will gain new roles but will not lose existing ones. Follow the steps outlined below to create a new host template.
1. From the “Hosts” drop-down menu select the “Host Templates” option.
2. Currently, we do not have any host templates created. Click the “Create” button to add new Host Template.
3. Provide a suitable name to the new host template and select the roles to be added in the host template. I have selected the roles “DataNode”, “NodeManager”, “ResourceManager” and “Zookeeper Server”.
4. You should have the new host template ready as shown in the screenshot below.
Applying Host Template
Now that we have the host template ready, we can apply it to the new node “node04” and
assign the roles included in the host template. Follow the steps outlined below to assign host template “DataNode” to the new host “node04”.
1. Go to the “hosts” page and select the new host “node04” in the list. From the “Actions for Selected” drop-down menu select the option “Apply Host Template”.
2. Select the correct host template if you have multiple host templates present. Also opt for the option to “Deploy client configurations and start newly created roles after applying the host template”.
3. The Cloudera Manager will go ahead and apply the host template to the host and deploy client configurations. It would also start the roles that are applied.