Create a Host (hostCreate)

The hostCreate command defines a host in the model.

ttGridAdmin hostCreate [name]
                       [-address addr]
                       [-internalAddress addr]
                       [-externalAddress addr]
                       [-dataspacegroup n]
                       [-nodataspacegroup]
                       [-like name [-cascade]]
                       [-comment comment]

Options

The hostCreate command has the options:

Option Description

name

Specifies the name for the host object in the model. The default is the first component of the operating system host name (the host name up to but not including the first ".", such as myhost).

If this option is omitted, the host system must be accessible through passwordless SSH at the time hostCreate is performed.

-internalAddress addr

DNS name or IP address of the host for internal communications, inside the grid. Use this together with -externalAddress. The host must be accessible by passwordless SSH at the specified address.

This option takes one name or address only, and a specified name must resolve to one IP address or to multiple IP addresses on the same network segment.

If host names from /etc/hosts are being used, the /etc/hosts files on all instances in the grid must contain identical entries for all hosts in the grid.

Also see Notes below and Address Formats.

-externalAddress addr

DNS name or IP address of the host for external communications, outside the grid, for client/server connections. Use this together with -internalAddress. The host must be accessible by passwordless SSH at the specified address.

This option takes one name or address only, but a name may resolve to one or more IP addresses.

If host names from /etc/hosts are being used, the /etc/hosts files on all instances in the grid must contain identical entries for all hosts in the grid.

Also see Notes below and Address Formats.

-address addr

DNS name or IP address of the host for both external and internal communications, if a single address is used. The host must be accessible by passwordless SSH at the specified address.

This option takes one name or address only, and a specified name must resolve to one IP address or to multiple IP addresses on the same network segment.

If host names from /etc/hosts are being used, the /etc/hosts files on all instances in the grid must contain identical entries for all hosts in the grid.

Note: Using a single address is not recommended for production environments.

Also see Notes below and Address Formats.

-dataspacegroup n

Specifies that this host will belong to data space group number n. The number of data space groups a grid has is determined by the k value set for the grid.

A host with a data instance must belong to a data space group.

Also see -nodataspacegroup and Notes below.

Note: Once a host is assigned to a data space group and modelApply is performed, you cannot change the assignment.

-nodataspacegroup

Specifies that the host will not be assigned to a data space group. This is the default.

A host with a data instance must belong to a data space group.

Also see -dataspacegroup and Notes below.

-like name

Specifies that this new host should be created with the same attributes as the named existing host, except where other options that you specify override settings from the existing host.

Also see -cascade.

-cascade

Use this option with the -like option to specify that installations and instances associated with the -like host also be defined for the host being created. (These objects will be defined for the new host, but not actually created until you run modelApply.)

-comment comment

Associates a comment with the host object. Put the comment in quotes if there are any spaces. The comment is stored and included in output of the hostList command.

Examples

Create a second management instance by adding a new host to the model with a set of installations and instances identical to those on the existing host (specified in the -like option). This command is run from the first management instance, which is on the first host, mysys1host (defined earlier, in the example for Create a Grid (gridCreate)):

% ttGridAdmin hostCreate mysys2host -internalAddress intmysys2.example.com 
-externalAddress extmysys2.example.com -like mysys1host -cascade 
Host mysys2host created in Model
Installation installation1 created in Model
Instance gridmgmt1 created in Model

This defines gridmgmt1 on mysys2host, duplicating gridmgmt1 on mysys1host.

Create a host for a data instance, specifying the data space group:

% ttGridAdmin hostCreate mysyshost3 -internalAddress intmysys3.example.com 
-externalAddress extmysys3.example.com -dataSpaceGroup 1
Host mysyshost3 created in Model

Notes

  • In specifying host addresses, for each host use the same format—fully qualified domain name, host name, or IP address—as was used in the gridSshConfig command for that host. For example, do not specify mysys1 for hostCreate if mysys1.example.com was specified for gridSshConfig.

  • You can use hostModify to change some settings later.

  • Hosts on the grid may be configured with either one or two network addresses, depending on system topology. If configured with two addresses, one is used for communications with systems inside the grid (internal) and one is used for client/server access to databases inside the grid from systems outside the grid (external). If configured with one address, which is not recommended for production environments, it is used for both internal and external communications. You must either set -address or set -internalAddress and -externalAddress.