Tom Mueller wrote:
> Rajiv,
> Nice to see the install-node checkin. I'd like to understand the
> expected usage patterns for this.
I'll throw in my 2 cents on a couple items...
>
> It seems that the arguments to install-node are very similar to those
> for create-node-ssh, except for the way that the hostname is passed in,
> with install-node being able to take multiple hosts.
>
> Is the expectation that one would run install-node first on a set of
> servers, and then run create-node-ssh?
Yes
> Could create-node-ssh have an
> additional argument that would do the install?
We discussed having "create-node-ssh --install". We initially chose
to decouple the functionality into it's own command. One reason was
that as a separate command it let you pass multiple hosts
(create-node-ssh is not set up to do that).
Adding the --install option to create-node-ssh is still a possibility
though.
> Also, it seems that all of the hosts to be installed by a single
> install-node command need to use the same sshuser or keyfile, right? I
> suppose that in a real production environment, that is probably a good
> assumption.
Correct. The best practice is to have all machines be identical, and
that is what we are targeting.
> I also am wondering about whether the install can be multi-threaded.
Yes. See bug 13460.
> Here's where I'm coming from with the large cluster testing I've been
> doing.
>
> I have a file, hosted-nodes, that contains the sshuser and hostname for
> each host.
> I use a shell function, "install_hosted_nodes" that has the following:
>
> install_hosted_nodes() {
> echo Installing GlassFish on nodes from hosted_nodes file...
> egrep -v '^#' $TESTHOME/hosted-nodes |
> awk '{print $1 "@" $2}' |
> xargs -L 1 -i -t -P0 ssh -n -T {} "rm -rf /scratch/gf/glassfishv3;
> unzip -q -d /scratch/gf $GFNIGHTLY"
> }
>
> where $GFNIGHTLY is the NFS location of the glassfish.zip file. The -P0
> option on xargs causes all of the installed to be run in parallel.
>
> Then I use the following function to create the SSH nodes:
>
> create_hosted_nodes() {
> echo Creating SSH nodes from the hosted_nodes file for domain $DOMAIN...
> grep -v '^#' $TESTHOME/hosted-nodes |
> awk '{ printf "create-node-ssh --nodehost %s --installdir
> /scratch/gf/glassfishv3/glassfish --sshuser %s n-ssh-%s-%d\n", $2, $1,
> ENVIRON["DOMAIN"], ++n }' |
> asadmin
> asadmin list-nodes
> }
>
> I'm trying to figure out how to work the use of install-node into this.
> One option would be to run install-node from the xargs in
> install_hosted_nodes, but this has the problem that the ZIP file would
> be created once for each node, and there would be a problem in that
> multiple install-node commands cannot proceed in parallel because they
> would all try to use the same glassfish.zip file.
I think this could be solved by running the first install-node sequentially
which would create the glassfish.zip, then the remaining install-nodes
can be run in parallel since they would re-use glassfish.zip.
Joe
> Another option would be to create a single invocation of install-node
> that would target all hosts. However, my hosts have different sshusers,
> so that would not work. And I would still not get a multi-threaded install.
>
> Thoughts?
> Thanks.
> Tom
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>