This is the documentation for Cloudera Manager 4.8.2.
Documentation for other versions is available at Cloudera Documentation.

Working with Host Templates

Host templates let you designate a set of role groups that can be applied in a single operation to a host or a set of hosts. This significantly simplifies the process of configuring new hosts when you need to expand your cluster. Host templates are supported for both CDH4 and CDH3 cluster hosts.

  Important: A host template can only be applied on a host with a version of CDH that matches the CDH version running on the cluster to which the host template belongs.

You can create and manage host templates under the Templates tab from the All Hosts page.

  1. Click the Hosts tab on the main Cloudera Manager navigation bar.
  2. Click the Templates tab on the All Hosts page.

Templates are not required; Cloudera Manager assigns roles and role groups to the hosts of your cluster when you perform the initial cluster installation. However, if you want to add new hosts to your cluster, a host template can make this much easier.

If there are existing host templates, they are listed on the page, along with links to each role group included in the template.

If you are managing multiple clusters, you must create separate host templates for each cluster, as the templates specify role configurations specific to the roles in a single cluster. Existing host templates are listed under the cluster to which they apply.

  • You can click a role group name to be taken to the Edit page for that role group, where you can modify the role group settings.
  • From the Actions menu associated with the template you can edit the template, or delete it.

Creating a Host Template

  1. From the Templates tab, click Create...
  2. In the Create New Host Template pop-up window that appears:
    • Type a name for the template.
    • For each role, select either the none option, or the appropriate role group. There may be multiple role groups for a given role type — you want to select the one with the configuration that meets your needs. Selecting the none option means no role group will be included in the template for that role type.
  3. Click Create to create the host template.

Editing a Host Template

  1. From the Hosts tab, click the Templates tab.
  2. Pull down the Actions menu for the template you want to modify, and click Edit. This put you into the Edit Host Template pop-up window. This works exactly like the Create New Host Template window — you can modify they template name or any of the role group selections.
  3. Click OK when you have finished.

Applying a Host Template to a Host

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

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) and DataNode (1)). The host has a DataNode role that belongs to the 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) 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.

Note that 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 note that 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. Go to the All Hosts page, Status tab.
  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 – check the box to enable this.
  6. Click Confirm to initiate the action.