admin@glassfish.java.net

Re: create-node cli command

From: Joe Di Pol <joe.dipol_at_oracle.com>
Date: Mon, 24 May 2010 11:40:23 -0700

Carla Mott wrote:
> I meant to include the asadmin alias on this email...
>
> Hi,
>
>
> Something that I noticed which is a little unexpected. Below are
> examples of running the command.
>
> 1) If I specify a host then that host needs to be reachable and it seems
> that gf needs to be running on that machine. Is that right?

The create-node-* commands are remote commands and therefore must
connect to the DAS. The --host parameter is specifying the DAS to
connect to (not the host to create the instance on) so yes the
DAS needs to be running on that host.

> At some
> point when we try to create an instance on a remote machine we will want
> to see if the host is reachable using SSH so not sure what checks are
> being done here or what it is trying to tell me. But as far as I know
> it is not a requirement for the remote to be available when the config
> info is added to the DAS. Also I tried to pass 'localhost' or the
> actual name of the host and in the case of localhost the host arg didn't
> appear in the domain.xml entry and in the case of the machine name got
> an error. We think that a valid use case is a node is running on the
> DAS (where the command is being executed) but not sure how to specify
> the host in that case. I want nodex to be on machinex and I'm executing
> the create-node command on machinex what is the host name that I pass?

--host is the DAS host. When running create-node-config there won't
be any instance host specified. When running create-node-ssh we
must support --nodehost to specify the instance host.

Joe

> 2) I need to also have a create-node-ssh which does what create-node
> currently plus adds more elements. I was hoping I could have 2 Create
> annotations with different names (create-node and create-node-ssh) in
> the same server bean but that fails. How can I implement this? See an
> example of the domain.xml entries
> http://wiki.glassfish.java.net/Wiki.jsp?page=3.1SSHProvisioningConfig
>
> Examples:
>
> This is a remote machine which is not running GF
>
> dhcp-usca14-133-171:bin cmott$ asadmin create-node
> --host=grappa.sfbay.sun.com node4
> Remote server does not listen for requests on [grappa.sfbay.sun.com:4848].
> Is the server up?
> Unable to get remote commands.
> Closest matching local command(s):
> create-node-agent
> Command create-node failed.
>
>
>
> If I don't specify the host all is fine.
>
> dhcp-usca14-133-171:bin cmott$ asadmin create-node
> --glassfish-home=~/gf-v3/glassfishv3/glassfish/ node4
>
> Command create-node executed successfully.
> dhcp-usca14-133-171:bin cmott$
>
> ------------------------------------------------------------------------
>
> Subject:
> create-node cli command
> From:
> Carla Mott <carla.mott_at_oracle.com>
> Date:
> Fri, 21 May 2010 17:00:24 -0700
> To:
> Jerome Dochez <Jerome.Dochez_at_sun.com>
>
> To:
> Jerome Dochez <Jerome.Dochez_at_sun.com>
> CC:
> gf-daspro_at_sun.com
>
>
> Hi,
>
> I was able to get the basics of the create-node command to work. I
> needed to do a clean in that module and then build because I did make a
> mistake when specifying the params and that seemed to still be an issue
> until I did a clean.
>
> Anyway something that I noticed which is a little unexpected. Below are
> examples of running the command.
> 1) If I specify a host then that host needs to be reachable and it seems
> that gf needs to be running on that machine. Is that right? At some
> point when we try to create an instance on a remote machine we will want
> to see if the host is reachable using SSH so not sure what checks are
> being done or what it is trying to tell me. But as far as I know it is
> not a requirement for the remote to be available when the config info is
> added to the DAS. Also I tried to pass 'localhost' or the actual name
> of the host and in the case of localhost the host arg didn't appear and
> in the case of the current machine name got an error. We think that a
> valid use case is a node is running on the DAS but not sure how to
> specify that so it is clear. so I want nodex to be on machinex and I'm
> executing the create-node command on machinex
>
> 2) I want to have create-node-config which does exactly what the command
> I currently called create-node does and that command will be used to
> setup an offline config where we expect that at some point later the
> user runs create-instance on a remote host and a handshake occurs. I
> think this is all works fine as long as I don't specify a host, right?
>
> 3) I need to also have a create-node-ssh which does what create-node
> currently plus adds more elements. I was hoping I could have 2 Create
> annotations with different names (create-node-config and
> create-node-ssh) in the same server bean but that fails. How can I
> implement this? See an example of the domain.xml entries
> http://wiki.glassfish.java.net/Wiki.jsp?page=3.1SSHProvisioningConfig
>
> Examples:
>
> This is a remote machine which is not running GF
>
> dhcp-usca14-133-171:bin cmott$ asadmin create-node
> --host=grappa.sfbay.sun.com node4
> Remote server does not listen for requests on [grappa.sfbay.sun.com:4848].
> Is the server up?
> Unable to get remote commands.
> Closest matching local command(s):
> create-node-agent
> Command create-node failed.
>
>
>
> If I don't specify the host all is fine.
>
> dhcp-usca14-133-171:bin cmott$ asadmin create-node
> --glassfish-home=~/gf-v3/glassfishv3/glassfish/ node4
>
> Command create-node executed successfully.
> dhcp-usca14-133-171:bin cmott$
>
>
> ------------------------------------------------------------------------
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net