dev@glassfish.java.net

Re: new asadmin command

From: Vishal Mehra <vishal.m.mehra_at_gmail.com>
Date: Tue, 14 Jul 2009 15:29:19 -0700

Bill,

Perhaps, this is out of the scope of the current implementation,
however, it would be good feature to have (RFE). In large enterprise
settings, wherein we are dealing with multiple instances of app
servers and clusters, providing the program options can be tedious
even if they are well scripted. Few programs options can run into
multiple lines and therefore it becomes challenging to manage them
especially when there are changes to the cluster topology, and/or to
the network. IMHO, it would nice to provide a configuration file as a
parameter to the asadmin command. The configuration could contain
program options as name/value pair. At run time, appropriate options
file(s) can be provided as a parameter.

for example, asadmin_config_file1 could look like
host 127.0.0.1
port 4848
user admin
passwordfile somefile
secure false

and then the asadmin command would like

asadmin -config_file=asadmin_config_file <program>

Even in a developer environment, developers would not have to specify
these options each time they run the asadmin command. They can set it
once and forget it.

if you believe there is a value add to the above approach, perhaps, we
can extend the concept to create options hierarchy i.e. one (base)
option file is extended by another option file.

My 2 cents.

Regards,

Vishal


On Tue, Jul 14, 2009 at 2:01 PM, Bill Shannon <bill.shannon_at_sun.com> wrote:
>
> As some of you know, I've been fixing some problems in the asadmin
> command to make it more compatible with v2.  All my work has been
> done "on the side", without impacting the existing v3 asadmin.
>
> After talking to Kedar and Byron, I think it's time to change that.
>
> Right now you can experiment with the new version of asadmin by setting
> the system environment variable ASADMIN_NEW=true, e.g.,
>
> export ASADMIN_NEW=true
> asadmin ...
>
> If you haven't already, please try that out and let me know of any problems.
>
> *If I don't hear complaints, I'm going to switch the default tomorrow.*
>
> After the change, you'll be able to set ASADMIN_NEW=false to get the old
> behavior, at least for a short time until we're completely convinced
> that the new version is working properly.
>
>
> The new version of asadmin has the following important differences:
>
> The --path option to (e.g.) the deploy command that appeared in v3 has
> been removed.  Specify the path as the operand to the command.
>
> The asadmin "program options", e.g.
>
>        --host
>        --port
>        --user
>        --passwordfile
>        --terse
>        --interactive
>        --secure
>
> can and should be specified *before* the command name, e.g.,
>
> $ asadmin --host myhost --port 5555 list-applications
>
> Although we still support supplying them after the command name,
> you'll get a warning about deprecated syntax.
>
> Other than those things, let me know where the new asadmin behaves
> differently than what you expect based on the v2 asadmin.
>
> Thanks.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>