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 CDH 4 and CDH 5 cluster hosts.
- Click the Hosts tab on the main Cloudera Manager navigation bar.
- Click the Templates tab on the 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 configuration 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, clone it, or delete it.
Creating a Host Template
- From the Templates tab, click Click here
- In the Create New Host Template pop-up window that appears:
- Type a name for the template.
- For each role, select 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.
- Click Create to create the host template.
Editing a Host Template
- From the Hosts tab, click the Templates tab.
- 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.
- 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 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.
- Go to the Hosts page, Status tab.
- Select the host(s) to which you want to apply your host template.
- From the Actions for Selected menu, select Apply Host Template.
- In the pop-up window that appears, select the host template you want to apply.
- Optionally you can have Cloudera Manager start the roles created per the host template – check the box to enable this.
- Click Confirm to initiate the action.
<< Specifying a Rack for Hosts | Maintenance Mode >> | |