sandhya

All | Personal | Sun

20060516 Tuesday May 16, 2006

meet wadm! the new CLI for SJS WebServer 7.0 It is new, scriptable, full featured and is a one stop command line tool ( cli ) to administer
"Sun Java System Web Server 7.0"

Here are few 'nice' somethings that we've put in:
1. support for JACL scripting
2. shell mode to execute multiple commands in a shell
3. tabbed completion for command names and option names
4. history of recent commands run
5. startup file
6. environment variables [options can be set as env variables, to avoid typing them each time]

and many other features.  explore it yourself.

To start of:

$wadm help
gives you list of commands supported by wadm

heres how you can run a single command:

$wadm list-configs --user=administration-user --port=administration-server-port --host=administration-server-host --password-file=mypwdfile

password-file contents should be as follows
wadm_password=password

If you need to run many commands at once, wadm supports shell mode,

$wadm --user=admin --port=8989 --password-file=mypwdfile
wadm> list-configs
www.mysports.com
config1
wadm> list-virtual-servers --config=www.mysports.com
vs1
vs2
wadm> list-webapps --config=www.mysports.com --vs=vs1
/merchandise
wadm> exit
$

Almost all commands operate on a config, so you'll end up giving --config=name on every command
You can avoid it by supplying it in a startup file $HOME_DIR/.wadmrc

for ex:
cat ~/.wadmrc
set wadm_config www.mysports.com

or run "set wadm_config www.mysports.com" in the shell.

Once in the shell, you can use "tab completion" to look up command-names or option names

for ex:
#./wadm --user=admin --password-file=~/wadmpwdfile --port=8989
Sun Java System Web Server 7.0 B05/08/2006 13:23
wadm> create-selfsigned-cert --

--org-unit   --state       --locality    --echo        --verbose     --token       --token-pin
--validity   --org         --country     --key-type    --key-size    --curve       --config*
--server-name*   --nickname*
wadm> add-     

add-search-docs   add-webapp


If you are at JavaONE, you're welcome to check the demo at the WebServer booth[#702]
Posted by sandhya ( May 16 2006, 09:30:00 AM PDT ) Permalink Comments [1]