Applying a Host Template to a Host

You can use a host template to apply configurations for multiple roles in a single operation.

Minimum Required Role: Cluster Administrator (also provided by Full Administrator)

You can apply a template to a host that has no roles on it, or that has roles from the same services as those included in the host template. New roles specified in the template that do not already exist on the host will be added. A role on the host that is already a member of the role group specified in the template will be left unchanged. If a role on the host matches a role in the template, but is a member of a different role group, it will be moved to the role group specified by the template.

For example, suppose you have two role groups for a DataNode (DataNode Default Group and DataNode (1)). The host has a DataNode role that belongs to DataNode Default Group. If you apply a host template that specifies the DataNode (1) group, the role on the host will be moved from DataNode Default Group to DataNode (1).

However, if you have two instances of a service, such as MapReduce (for example, mr1 and mr2) and the host has a TaskTracker role from service mr2, you cannot apply a TaskTracker role from service mr1.

A host may have no roles on it if you have just added the host to your cluster, or if you decommissioned a managed host and removed its existing roles.

Also, the host must have the same version of CDH installed as is running on the cluster whose host templates you are applying.

If a host belongs to a different cluster than the one for which you created the host template, you can apply the host template if the "foreign" host either has no roles on it, or has only management roles on it. When you apply the host template, the host will then become a member of the cluster whose host template you applied. The following instructions assume you have already created the appropriate host template.

  1. Click Hosts > All Hosts.
  2. Select the host(s) to which you want to apply your host template.
  3. From the Actions for Selected menu, select Apply Host Template.
  4. In the pop-up window that appears, select the host template you want to apply.
  5. Optionally you can have Cloudera Manager start the roles created per the host template. To enable this, check the box.
  6. Click Confirm to initiate the action.