| type=page | |
| status=published | |
| title=create-node-ssh | |
| next=create-password-alias.html | |
| prev=create-node-dcom.html | |
| ~~~~~~ | |
| = create-node-ssh | |
| [[create-node-ssh-1]][[GSRFM00048]][[create-node-ssh]] | |
| == create-node-ssh | |
| Creates a node that is enabled for communication over SSH | |
| [[sthref463]] | |
| === Synopsis | |
| [source] | |
| ---- | |
| 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}] | |
| [--install={false|true}] [--archive archive] | |
| node-name | |
| ---- | |
| [[sthref464]] | |
| === Description | |
| The `create-node-ssh` subcommand creates a node that is enabled for | |
| communication over secure shell (SSH). | |
| A node represents a host on which the {productName} software is | |
| installed. A node must exist for every host on which {productName} | |
| instances reside. | |
| The domain administration server (DAS) contacts an SSH node's host | |
| through the SSH connector to manage {productName} 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. | |
| By default, the subcommand fails and the node is not created if the DAS | |
| cannot contact the node's host through SSH. 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`. | |
| This subcommand is supported in remote mode only. | |
| [[sthref465]] | |
| === Options | |
| asadmin-options:: | |
| Options for the `asadmin` utility. For information about these | |
| options, see the link:asadmin.html#asadmin-1m[`asadmin`(1M)] help page. | |
| `--help`:: | |
| `-?`:: | |
| Displays the help text for the subcommand. | |
| `--nodehost`:: | |
| The name of the host that the node represents. The name of the host | |
| must be specified. Otherwise, an error occurs. | |
| `--installdir`:: | |
| The full path to the parent of the base installation directory of the | |
| {productName} software on the host, for example, | |
| `/export/glassfish7/`. The default is the parent of the default base | |
| installation directory of the {productName} software for the DAS. | |
| This default is useful only if {productName} is installed in the | |
| same location on all hosts. | |
| `--nodedir`:: | |
| The path to the directory that is to contain {productName} | |
| instances that are created on the node. The default is | |
| as-install``/nodes``, where as-install is the base installation | |
| directory of the {productName} software on the host. If a relative | |
| path is specified, the path is relative to the as-install directory. | |
| `--sshport`:: | |
| The port to use for SSH connections to this node's host. The default | |
| is 22. If the `--nodehost` option is set to ``localhost-``domain, the | |
| `--sshport` option is ignored. | |
| `--sshuser`:: | |
| The user on this node's host that is to run the process for connecting | |
| to the host through SSH. The default is the user that is running the | |
| DAS process. 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. | |
| `--sshkeyfile`:: | |
| 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. | |
| + | |
| [NOTE] | |
| ==== | |
| {productName} also supports password authentication through the | |
| `AS_ADMIN_SSHPASSWORD` entry in the password file. The password file | |
| is specified in the `--paswordfile` option of the | |
| link:asadmin.html#asadmin-1m[`asadmin`(1M)] utility. | |
| ==== | |
| + | |
| If the SSH private key file is protected by a passphrase, the password | |
| file must contain the `AS_ADMIN_SSHKEYPASSPHRASE` entry. + | |
| The path to the key file must be reachable by the DAS and the key file | |
| must be readable by the DAS. + | |
| The default is the a key file in the user's `.ssh` directory. If | |
| multiple key files are found, the subcommand uses the following order | |
| of preference: | |
| 1. `id_rsa` | |
| 2. `id_dsa` | |
| 3. `identity` | |
| `--force`:: | |
| 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. Possible values are as follows: | |
| `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. | |
| `--install`:: | |
| Specifies whether the subcommand shall install the {productName} | |
| software on the host that the node represents. + | |
| Possible values are as follows: | |
| `false`;; | |
| The subcommand shall not install the {productName} software on | |
| the host (default). | |
| `true`;; | |
| The subcommand shall install the {productName} software on the | |
| host. | |
| `--archive`:: | |
| The absolute path to the archive file of the {productName} | |
| software that is to be installed. If this option is omitted and the | |
| `--install` is `true`, the subcommand creates a ZIP archive of the | |
| {productName} software from the installation where this subcommand | |
| is run. The archive does not contain the `domains` directory or the | |
| `nodes` directory. | |
| [[sthref466]] | |
| === Operands | |
| node-name:: | |
| 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 {productName} | |
| instance. | |
| * The name must not be `domain`, `server`, or any other keyword that | |
| is reserved by {productName}. | |
| [[sthref467]] | |
| === Examples | |
| [[GSRFM513]][[sthref468]] | |
| ==== Example 1 Creating a Node | |
| This example creates the node `adc` for the host `adc.example.com`. By | |
| default, the parent of the base installation directory of the | |
| {productName} software is `/export/glassfish7`. | |
| [source] | |
| ---- | |
| asadmin> create-node-ssh | |
| --nodehost adc.example.com | |
| --installdir /export/glassfish7 adc | |
| Command create-node-ssh executed successfully. | |
| ---- | |
| [[GSRFM514]][[sthref469]] | |
| ==== Example 2 Forcing the Creation of a Node | |
| This example forces the creation of node `eg1` for the host | |
| `eghost.example.com`. The node is created despite the failure of the DAS | |
| to contact the host `eghost.example.com` to validate the node's | |
| parameters. | |
| [source] | |
| ---- | |
| asadmin> create-node-ssh --force --nodehost eghost.example.com eg1 | |
| Warning: some parameters appear to be invalid. | |
| Could not connect to host eghost.example.com using SSH. | |
| There was a problem while connecting to eghost.example.com:22 | |
| eghost.example.com | |
| Continuing with node creation due to use of --force. | |
| Command create-node-ssh executed successfully. | |
| ---- | |
| [[sthref470]] | |
| === Exit Status | |
| 0:: | |
| command executed successfully | |
| 1:: | |
| error in executing the command | |
| [[sthref471]] | |
| === See Also | |
| link:asadmin.html#asadmin-1m[`asadmin`(1M)] | |
| link:create-node-config.html#create-node-config-1[`create-node-config`(1)], | |
| link:create-node-dcom.html#create-node-dcom-1[`create-node-dcom`(1)], | |
| link:delete-node-ssh.html#delete-node-ssh-1[`delete-node-ssh`(1)], | |
| link:install-node.html#install-node-1[`install-node`(1)], | |
| link:install-node-ssh.html#install-node-ssh-1[`install-node-ssh`(1)], | |
| link:list-nodes.html#list-nodes-1[`list-nodes`(1)], | |
| link:ping-node-ssh.html#ping-node-ssh-1[`ping-node-ssh`(1)], | |
| link:setup-ssh.html#setup-ssh-1[`setup-ssh`(1)], | |
| link:uninstall-node.html#uninstall-node-1[`uninstall-node`(1)], | |
| link:uninstall-node-ssh.html#uninstall-node-ssh-1[`uninstall-node-ssh`(1)], | |
| link:update-node-ssh001.html#update-node-ssh-1[`update-node-ssh`(1)] | |