Host Operations
Use ttGridAdmin
commands in this section to define a host in the model, modify a host, delete a host, run commands on all hosts, or list all hosts.
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 |
---|---|
|
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 If this option is omitted, the host system must be accessible through passwordless SSH at the time |
|
DNS name or IP address of the host for internal communications, inside the grid. Use this together with 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 Also see Notes below and Address Formats. |
|
DNS name or IP address of the host for external communications, outside the grid, for client/server connections. Use this together with This option takes one name or address only, but a name may resolve to one or more IP addresses. If host names from Also see Notes below and Address Formats. |
|
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 Note: Using a single address is not recommended for production environments. Also see Notes below and Address Formats. |
|
Specifies that this host will belong to data space group number A host with a data instance must belong to a data space group. Also see Note: Once a host is assigned to a data space group and |
|
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 |
|
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 |
|
Use this option with the |
|
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 |
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 specifymysys1
forhostCreate
ifmysys1.example.com
was specified forgridSshConfig
. -
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
.
Delete a Host (hostDelete)
The hostDelete
command removes a host from the model.
ttGridAdmin hostDelete name
[-cascade]
Options
The hostDelete
command has the options:
Option | Description |
---|---|
|
Name of the host object to remove from the model. |
|
Specifies that installation and instance objects associated with the host should also be removed from the model. |
Examples
This deletes a host that was created in an example in Create a Host (hostCreate).
% ttGridAdmin hostDelete mysys2host -cascade Instance gridmgmt1 on Host mysys2host deleted from Model Installation installation1 on Host mysys2host deleted from Model Host mysys2host deleted from Model
Notes
-
If the host has any installations or instances, you must either use
-cascade
or useinstallationDelete
andinstanceDelete
. -
Deleting instances and installations removes the objects from the model but does not remove the physical instances and installations.
Execute a Command or Script on Grid Hosts (hostExec)
The hostExec
command runs a command (such as a system command or TimesTen command) or a script on hosts in the grid, as specified.
ttGridAdmin hostExec [-only hostname] [-exclude hostname] [-parallel n] command | -script filepath
Options
The hostExec
command has the options:
Option | Description |
---|---|
|
The command or script is run only on the specified hosts. Specify just one host with Use host names as defined in the model. Without |
|
The command or script is performed on all hosts in the grid except for the specified hosts. Specify just one host with Use host names as defined in the model. Without |
|
Specifies that the command or script runs on no more than |
|
Or:
|
Examples
This example first shows the existing hosts in the grid, then uses hostExec
to run the df /
command (to show disk space) on each host, excluding mysys3host
and mysys4host
. So the command is performed on mysys1host
and mysys2host
.
% ttGridAdmin hostList Name IntAddress ExtAddress DSG Comment ----------- ---------------------- ---------------------- --- ------- mysys1host intmysys1.example.com extmysys1.example.com 1 mysys2host intmysys2.example.com extmysys2.example.com 2 mysys3host intmysys3.example.com extmysys3.example.com 1 mysys4host intmysys4.example.com extmysys4.example.com 2 % ttGridAdmin hostExec -exclude mysys3host -exclude mysys4host df / Commands executed on: mysys1host rc 0 mysys2host rc 0 Return code from mysys1host: 0 Output from mysys1host: Filesystem 1K-blocks Used Available Use% Mounted on /dev/xvda2 173483816 28416336 136254988 18% / Return code from mysys2host: 0 Output from mysys2host: Filesystem 1K-blocks Used Available Use% Mounted on /dev/xvda2 117144964 35319512 75874836 32% /
Notes
-
The command or script is run on each host as the instance administrator through passwordless SSH.
-
No environment variables are set on the hosts, other than those set by SSH by default.
-
The command returns 2000 if execution did not complete prior to the timeout.
-
During execution,
stdout
andstderr
output is displayed as part of thestdout
andstderr
output from thehostExec
command. Because output is buffered, the output from different commands is not intermingled.
List All Hosts in the Model (hostList)
The hostList
command lists information about hosts in the specified version of the model.
ttGridAdmin hostList [-latest|-current|-version n]
Options
The hostList
command has the options:
Option | Description |
---|---|
|
Lists hosts in the latest model—the model being modified and not yet applied to the grid. This is the default. |
|
Lists hosts in the current model—the model most recently applied to the grid. |
|
Lists hosts in the specified version number of the model. |
Examples
The following two examples, relating to examples shown in Modify a Host (hostModify) and List Model Versions (modelList), show identical output, indicating that version 4 is the latest version (the version not yet applied to the model).
For each host, the host name, internal address, external address, and associated data space group are listed (optionally with a comment).
% ttGridAdmin hostlist Name IntAddress ExtAddress DSG Comment ----------- ---------------------- ------------------ --- -------------------- mysys1host intmysys1.example.com extmysys1.example.com 1 mysys2host intmysys2.example.com extmysys2.example.com 1 mysys3host intmysys3.example.com extmysys3.example.com 1 Move from location1. mysys4host intmysys4.example.com extmysys4.example.com 2 % ttGridAdmin hostlist -version 4 Name IntAddress ExtAddress DSG Comment ----------- ---------------------- ------------------ --- -------------------- mysys1host intmysys1.example.com extmysys1.example.com 1 mysys2host intmysys2.example.com extmysys2.example.com 1 mysys3host intmysys3.example.com extmysys3.example.com 1 Move from location1. mysys4host intmysys4.example.com extmysys4.example.com 2
Modify a Host (hostModify)
The ttGridAdmin
hostModify
command modifies a host object in the model.
ttGridAdmin hostModify name [-dataspacegroup n] [-nodataspacegroup] [-comment comment]
Options
The hostModify
command has the options:
Option | Description |
---|---|
|
Name of the existing host object to modify. |
|
Specifies the number of the data space group that this host will belong to. The number of data space groups a grid will have is determined by the A host with a data instance should always belong to a data space group. |
|
Specifies that this host will not be part of any data space group (the default) |
|
Associates a comment with the host object or modifies an existing comment. Put the comment in quotes if there are any spaces. The comment is stored and included in output of the |
Notes
-
The host system must be accessible through passwordless SSH at the time
hostModify
is executed. -
If
modelApply
has already been run for a model including this host, you cannot change the data space group assignment.