A host type is a container for variables that are assigned to a particular host. These variables are called host-type attributes and are based on some combination of host characteristics, such as function, location, or configuration. A host type determines the set of host-type attributes that are assigned to a host.
Creating a host type or using an existing host type provides two benefits.
Provides the ability to group similar hosts
Provides a framework for dynamically configured variables, known as host-type attributes
By assigning each host a host type, grouping hosts by their most important characteristics is easier. For example, you can define a host type for the hosts that are used as web servers, another host type for hosts that are used for database servers, and so on.
Host types also enable you to set configuration values dynamically when a data center operation is performed. A web server host type might include attributes such as Location, WebServer_User, WebServer_Group, HTTP_Port, and HTTPS_Port. A database server host type might include a different set of attributes such as Location, DB_Directory, DB_InstanceName, DB_Port, and DB_SecurePort. If, in this example, you define a host type for web servers and the host type includes an HTTP port variable, when you perform an installation on hosts of this host type, your installation plan could automatically set the HTTP port variable of each web server based on the HTTP port attribute value set for each host.
Every host that you manage with the provisioning system will be assigned a host type, either the default host type, crhost, or a host type that you have defined. Each host can only have one host type.
When hosts are created by targetable components, the host type is automatically assigned. For more information about targetable components, see Targetable Components.
The N1 Grid Service Provisioning System software includes the default host type, system#crhost. By default, all hosts are assigned this host type. The system#crhost host type cannot be modified or deleted. The system#crhost type includes two attributes:
sys.hostName
sys.description
There are no default values for these attributes. The name value must be specified for each host when you define the host. The description value is optional.
A host type is distinguished by its name and its attributes. An attribute is a name-value pair.
Host-Type Attribute Characteristics
Each attribute can have a default value.
Attributes names must begin with a letter and cannot include spaces.
Attribute names must be unique within a particular host type.
Adding new attributes to the host type results in the attributes and their defaults being added to every host of that type.
Removing attributes from a host type permanently deletes those attributes from every host of that type.
Attributes cannot be renamed. Attributes can only be deleted and added again with a new name, which results in the attribute value being reset to the default on all hosts of that type.
Attribute values can be literal values or can represent variables determined by your configuration.
These variables are called substitution variables. One of the most common substitution variables is :[container:installPath].
When you define a host, you can selectively override the host type's default attribute values. Default values that are not overwritten will be applied to the host. If a host-type attribute's default value is changed after hosts are created, all hosts that did not override the default value are updated to reflect the new attribute value.
Host types enable you to group hosts by particular characteristics. Host types also enable you to set up dynamic configuration values.
For more information on substitution variables and configuration generation, see Chapter 6, Configuration Generation, in N1 Grid Service Provisioning System 5.0 Plan and Component Developer’s Guide.
This procedure describes how to create host types by using the browser interface. You can also create host types by using the following command.
hdb.ht.add – Creates a new host type.
For a detailed description of this command, see Chapter 7, hdb: CLI Commands for Managing Hosts, in N1 Grid Service Provisioning System 5.0 Command-Line Interface Reference Manual.
If you would like to create a new host type from an existing host type, see How to Edit Host Types.
To create a host type, you must belong to a user group that has Create, Edit, Delete permission on hosts.
Go to the Host Types page.
In the top row of the table on the Host Types page, type a name and brief description for the new host type and click Create.
The Host Types Details page for the new host type is displayed.
Perform the following steps for each attribute that you plan to assign to the new host type.
(Optional) To hide the host type, select Hidden.
To save the host type, click Save.
To edit a host type, you must belong to a user group that has Create, Edit, Delete permission on hosts.
Go to the Host Types page.
On the Host Types page, find the row listing the host type that you plan to edit and click Details.
A Details page appears for the selected host type.
Use the controls on the Edit page to modify the host type.
To save the modified host type as a new host type, click Save As.
Another Details page appears.
Type the name of the new host type.
The new host type name must be unique to existing host types.
Click Continue to Save As.
This procedure describes how to view host types by using the browser interface. You can also view host types by using the following commands.
hdb.ht.la – Displays all host types
hdb.ht.lo – Displays detailed information about a particular host type
For a detailed description of these commands, see Chapter 7, hdb: CLI Commands for Managing Hosts, in N1 Grid Service Provisioning System 5.0 Command-Line Interface Reference Manual.
From the navigation menu, choose Administrative.
The browser interface displays the Administrative page.
In the Administrative page, click Host Types.
The browser interface displays the Host types page.
(Optional) To include hidden host types, select Show Hidden Host Types in the upper right corner of the page.
(Optional) To view the details of a specific host type, click Details in the row that lists the host type that you want to view.
A Details page for the Host Type is displayed.
You can make the following modifications to the host type.
Add, change, or remove attributes
Change the name or description of the host type
For more information about the impact of updating host-type attributes, see Host-Type Attributes.
If you need to edit the host-type attributes of a particular host, see How to Modify Host-Type Attributes of a Host.
This procedure describes how to edit host types by using the browser interface. You can also edit host types by using the following command.
hdb.ht.mod – Edits a host type.
For a detailed description of this command, see Chapter 7, hdb: CLI Commands for Managing Hosts, in N1 Grid Service Provisioning System 5.0 Command-Line Interface Reference Manual.
To edit a host type, you must belong to a user group that has Create, Edit, Delete permission on hosts.
Go to the Details page of the host type that you want to edit.
Use the controls on the Details page to modify the host type.
(Optional) To hide the host type, click Hidden.
To save the host type, click Save.
Deleting a host type is permanent and cannot be undone. Deleting a host type might also be time consuming.
This procedure describes how to delete host types by using the browser interface. You can also delete host types by using the following command.
hdb.ht.del – Deletes a host type.
For a detailed description of this command, see Chapter 7, hdb: CLI Commands for Managing Hosts, in N1 Grid Service Provisioning System 5.0 Command-Line Interface Reference Manual.
You cannot delete a host type if any hosts of that type exist. You also cannot delete a host type that is owned by a plug-in.
To delete a host type, you must belong to a user group that has Create, Edit, Delete permission on hosts.
Go to the Details page of the host type that you plan to delete.
Click the Delete button at the bottom of the page.
Another page appears that provides the option to cancel the deletion.
You cannot delete host types that are in use. If a host type that you try to delete is being used, a message will list the host type and the reason that it was not deleted.
Verify that you are deleting the correct host type and click the Continue to Delete button.
The host type that you deleted is no longer listed in table on the Host Types page.