2.5.2 create-node-ssh
Creates a node that is enabled for communication over SSH.
Synopsis
asadmin [asadmin-options] create-node-ssh [--help] --nodehost node-host [--installdir as-install-parent] [--nodedir node-dir] [--sshport ssh-port] [--sshuser ssh-user] [--sshkeyfile ssh-keyfile] [--force={false|true}] node-name
Storage location
Application Server installation directory/javaee/glassfish/bin
Function
The create-node-ssh subcommand creates a node that is enabled for communication over the secure shell (SSH) protocol. A node represents a host on which Application Server software is installed. A node must exist for every host on which server instances reside. The domain administration server (DAS) contacts an SSH node's host through the SSH connector to manage server instances that reside on the node. However, the DAS does not use the SSH connector to contact the host where the DAS is running because the DAS can run all asadmin subcommands locally. This command is supported in remote mode only.
To force the node to be created in the DAS configuration even if the host cannot be contacted through SSH, set the --force option to true.
Precondition
Domain Administration Server (DAS) is running.
A node must exist for every host on which server instances reside
Arguments
- --help | -?
-
Displays the help text for the subcommand.
- --nodehost node-host
-
Specifies the name of the host that the node represents. The name of the host must be specified. Otherwise, an error occurs.
Type: String
The following values can be specified:
-
Specify the nodehost name
Default value: N/A
-
- --installdir as-install-parent
-
Specifies the full path to Application Server installation directory/javaee.
Type: String
The following values can be specified:
-
The full path to Application Server installation directory/javaee
Default value: Application Server installation directory/javaee directory for the DAS.
-
- --nodedir node-dir
-
Specifies the path to the directory that is to contain server instances that are created on the node. If a relative path is specified, the path is relative to Application Server installation directory directory.
Type: String
The following values can be specified:
-
Specify the path to the directory that contain server instance
Default value: Application Server installation directory/javaee/glassfish/nodes
-
- --sshport ssh-port
-
Specifies the port to use for SSH connections to this node's host. If the --nodehost option is set to localhost-domain, the --sshport option is ignored.
Type: Integer
The following values can be specified:
-
1 to 65535
Default value: 22
-
- --sshuser ssh-user
-
Specifies the user on this node's host that is to run the process for connecting to the host through the SSH protocol. To ensure that the DAS can read this user's SSH private key file, specify the user that is running the DAS process. If the --nodehost option is set to localhost domain, the --sshuser option is ignored.
Type: String
The following values can be specified:
-
Specify the sshuser name
Default value: User that is running the DAS process
-
- --sshkeyfile ssh-keyfile
-
Specifies the absolute path to the SSH private key file for user that the --sshuser option specifies. This file is used for authentication to the SSHd daemon on the node's host.
Type: String
The following values can be specified:
-
Path to the SSH private key file for user
Default value:
Key file in the user's .ssh directory on the host where the subcommand is run. If multiple key files are found in user's .ssh directory, the subcommand uses the following order of preference:
-
id_rsa
-
id_dsa
-
identity
-
- --force={false|true}
-
Specifies whether the node is created in the DAS configuration even if validation of the node's parameters fails.
To validate a node's parameters, the DAS must be able to contact the node's host through SSH.
Type: Boolean
The following values can be specified:
-
false
The node is not created if validation of the node's parameters fails (default).
-
true
The node is created even if validation of the node's parameters fails.
Default value: false
-
- node-name
-
Specifies the name of the node.
The name must meet the following requirements:
The name may contain only ASCII characters.
The name must start with a letter, a number, or an underscore.
The name may contain only the following characters:
-
Lowercase letters
-
Uppercase letters
-
Numbers
-
Hyphen
-
Period
-
Underscore
The name must be unique in the domain and must not be the name of another node, a cluster, a named configuration, or a server instance.
The name must not be domain, server, or any other keyword that is reserved by Java EE Server.
Type: String
The following values can be specified:
-
Specify the node name
Default value: N/A
-
Examples
The following example creates a node.
asadmin create-node-ssh --nodehost adc.example.com --installdir /export/glassfish3 adc
Exit Status
Exit Status |
Explanation |
---|---|
0 |
command executed successfully. |
1 |
error in executing the command. |