Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Many Geronimo administrative commands have been implemented using GShell. Previously existing Geronimo commands (e.g. startup, geronimo.sh, deploy.sh) are still included in Geronimo. Over time, however, it is expected that we will implement all administrative commands using GShell, only.

This document is organized in the following sections:

Table of Contents

Running GShell

A simple launcher script/.bat file is located in the <geronimo_home>/bin directory of a Geronimo server. To start GShell on a *nix OS:

Wiki Markup
{deck:id=gsh startup command}
Wiki Markup
{card:label=Unix}

No Format
nopaneltrue

cd geronimo-jetty6-javaee5-2.1
./bin/gsh

Wiki Markup
{card}
Wiki Markup
{card:label=Windows}

No Format
nopaneltrue

cd c:\g
bin\gsh

Wiki Markup
{card}
Wiki Markup
{deck}
Code Block

cd geronimo-jetty6-javaee5-2.1
./bin/gsh

or on Windows

Code Block

cd c:\g
bin\gsh

GShell commands may be specified when starting GShell:

Code Block

./gsh deploy/list-modules

or commands may be entered interactively:

Panel

coltrane kevan$ ./gsh
Apache Geronimo (2.1)

Type 'help' for more information.
-----------------------------------------------------------------------------------
kevan@coltrane:/> deploy/list-modules
Connecting to Geronimo server: localhost:1099
Username: system
Password: ****
Connection established
Found 84 modules
+ org.apache.geronimo.configs/activemq-broker/2.1/car
+ org.apache.geronimo.configs/activemq-ra/2.1/car
+ org.apache.geronimo.configs/axis/2.1/car
...

The help command will display all GShell commands that are available in the current environment.

just type gsh

GShell commands may be specified when starting GShell:

./gsh deploy/list-modules

or commands may be entered interactively:

No Format
borderStylesolid

coltrane kevan$ ./gsh
Apache Geronimo (2.1)

Type 'help' for more information.
-----------------------------------------------------------------------------------
kevan@coltrane:/> deploy/list-modules
Connecting to Geronimo server: localhost:1099
Username: system
Password: *******
Connection established
Found 84 modules
 + org.apache.geronimo.configs/activemq-broker/2.1/car
 + org.apache.geronimo.configs/activemq-ra/2.1/car
 + org.apache.geronimo.configs/axis/2.1/car
...

The help command will display all GShell commands that are available in the current environment.

No Format
borderStylesolid

kevan@coltrane:/> help

For information about Apache Geronimo, visit:
    http://geronimo.apache.org

Available commands:
  execute-alias         Execute an alias
  exit                  Exit the shell
  print                 Alias to: echo
  alias                 Create an alias
  source                Load a file/url into the current shell
  ?                     Alias to: help
  .                     Alias to: source
  unalias               Remove an alias
  unset                 Unset a variable
  help                  Show command help
  echo                  Echo or print arguments to STDOUT
  clear                 Clear the terminal screen
  quit                  Alias to: exit
  set                   Set a variable

  remote-control

  server-control        Remote server control


  deploy

  undeploy              Undeploy a module
  connect               Connect to a Geronimo server
  install-library       Install library
  stop                  Stop a module
  list-targets          List targets
  restart               Restart a module
  install-plugin        Install a plugin
  list-plugins          Install plugins into a geronimo server
  start                 Start a module
  assemble              Extract a geronimo server from the current one
  deploy
Code Block

kevan@coltrane:/> help

For information about Apache Geronimo, visit:
    http://geronimo.apache.org

Available commands:
  execute-alias         Execute an alias
  exit                Deploy a Exitmodule
 the shell
list-modules  print        List modules
  redeploy      Alias to: echo
  alias    Redeploy a module
  distribute         Create an alias
 Distribute sourcea module
  disconnect            Disconnect Loadfrom a file/url into the current shellGeronimo server


  remote

  ?rsh-server            Start a GShell server
  rsh    Alias to: help
  .           Connect to a remote GShell server


  geronimo

  stop-server Alias  to: source
  unalias     Stop a Geronimo server
  start-client     Remove an alias
  unset Start a Geronimo application client
  start-server          UnsetStart a variable
  help    Geronimo server

The quit command will exit the GShell environment.

To obtain help information on any command, use the --help option:

No Format
borderStylesolid

kevan@coltrane.local:/> deploy/list-modules --help
list-modules
 --

  TARGET               Show command help
  echo        Target name
  -a (--all)      Echo or print arguments to STDOUT
  clear          Show started or stopped modules
   Clear the terminal screen
  quit-h (--help)                      Display Aliasthis to:help exitmessage
   set -p (--port) N                  Set a variable

Port, default remote-control1099

  server-controlr (--started)       Remote server control


  deploy

  undeploy        Show started modules only
   Undeploy a module
  connect       -s (--hostname, --server) VAL    Hostname, default localhost
  -t (--stopped)        Connect to a Geronimo server
  install-library     Show stopped Installmodules libraryonly
  stop  -u (--username) VAL              Username
  Stop a module
  list-targets-w (--password) VAL              Password

Geronimo GShell Commands

The following list shows the Geronimo specific commands available:

No Format
borderStylesolid

deploy/deploy  List targets
  restart               RestartDeploy a module
deploy/undeploy  install-plugin            InstallUndeploy a pluginmodule
deploy/start   list-plugins            Install plugins intoStart a geronimo server
module
deploy/stop  start                 StartStop a module
deploy/restart  assemble             Restart  Extract a geronimo server from the current one
  deploy  a module
deploy/list-modules          List modules
deploy/redeploy              DeployRedeploy a module
deploy/distribute   list-modules         Distribute Lista modulesmodule

deploy/connect  redeploy             Connect Redeployto a Geronimo moduleserver
deploy/disconnect  distribute          Disconnect from Distributea aGeronimo module
server

deploy/install-library  disconnect     Install library
deploy/list-targets       Disconnect from a GeronimoList servertargets


  remote

  rsh-serverdeploy/install-plugin        Install a plugin
deploy/list-plugins          Install plugins Startinto a GShellgeronimo server

deploy/assemble  rsh            Extract a geronimo server from the  Connect to a remote GShell server


  geronimo

  stopcurrent one

geronimo/start-server           StopStart a Geronimo server
  start-clientgeronimo/stop-server          StartStop a Geronimo application client
  server

geronimo/start-server client         Start a Geronimo server

The quit command will exit the GShell environment.

To obtain help information on any command, use the {--help} option:

application client

Starting and Stopping Geronimo in Gshell

Geronimo can be started through gshell using the geronimo/start-server command.

No Format
borderStylesolid

jason@Jason-Warners-Computer
Code Block

kevan@coltrane.local:/> deploygeronimo/liststart-modulesserver --background
Launching Geronimo Server...
Booting Geronimo Kernel (in Java 1.5.0_13)...

If the --background option is not used, then the server instance will maintain control of the terminal and a new instance of gshell must be started to interact with the server.

Other useful geronimo/start-server options (Use geronimo/start-server --help to see a full list of options).

No Format
borderStylesolid

start-server
 --

  -A (--javaagent) JARhelp
list-modules
 --

  TARGET                           Target name
  -a (--all)                       Show started or stopped modules
  -h (--help)            Use a specific Java Agent, set to 'none'   Display this help message
  -p (--port) N  to dis
                  Port, default 1099
  -r (--started)           able
  -D (--property) NAME=VALUE    Show startedDefine modulessystem onlyproperties
  -sG (--hostname, --server) VALgproperty) NAME=VALUE    Define Hostname, default localhostan org.apache.geronimo property
  -tH (--stoppedhome) DIR                Use a Showspecific stoppedGeronimo moduleshome onlydirectory
  -uJ (--usernamejavaopt) FLAG VAL           Set a JVM Usernameflag
  -wb (--passwordbackground) VAL             Run the server process Password

Geronimo GShell Commands

The following deploy commands are available:

Code Block

deploy/deploy   in the background
  -h (--help)             Deploy a module
deploy/undeploy     Display this help message
  -j (--jvm) DIR   Undeploy a module
deploy/start            Use a specific Java Virtual StartMachine afor module
deploy/stopserver
                    Stop a module
deploy/restart           process
  -l (--logfile) RestartFILE a module
deploy/list-modules           Capture console output Listto modulesfile
deploy/redeploy  -m (--module) NAME          Redeploy a module
deploy/distribute Start up a specific module by name
  -q (--quiet)  Distribute a module

deploy/connect               ConnectSuppress toinformative aand Geronimowarning servermessages
deploy/disconnect  -t (--timeout) N        Disconnect from a Geronimo server

deploy/install-library   Specify the timeout for Install library
deploy/list-targets   the server process in s
       List targets

deploy/install-plugin        Install a plugin
deploy/list-plugins          Install plugins into a geronimo server

deploy/assembleeconds
  -v (--verbose)               Extract a geronimoEnable serververbose fromoutput; thespecify currentmultipule one
Code Block

geronimo/start-servertimes
                 Start a Geronimo server
geronimo/stop-server              Stopto aincrease Geronimo server

geronimo/start-client          Start a Geronimo application client

More complete documentation is needed on these...

Starting and Stopping Geronimo in Gshell

Geronimo can be started through gshell using the geronimo/start-server command

verbosity

Geronimo can be stopped using the geronimo/stop-server command.

No Format
borderStylesolid

jason@Jason-Warners-Computer.local:/> geronimo/stop-server -u system -w manager
Stopping Geronimo server: localhost:1099
[] received stop signal

If username -u and password -w are not provided on the command line, the user will be prompted for them before the server shutdown process is started. The full set of geronimo/stop-server options can be seen in gshell using the --help option, the same way as for geronimo/start-server.

Note
titleOn a Windows platform

Use forward slash "/" instead of traditional back slash "\" as directory seperators.
For example:

No Format
borderStylesolid

jason@Local
Code Block
jason@Jason-Warners-Computer.local
:/> geronimo/start-server -
-background Launching Geronimo Server... Booting Geronimo Kernel (in Java 1.5.0_13)...

If the --background option is not used, then the server instance will maintain control of the terminal and a new instance of gshell must be started to interact with the server

Other Useful geronimo/start-server options (Use geronimo/start-server --help to see a full list of options)

j 'c:/programme files/Java60/bin/java.exe'

This issue is addressed by (https://issues.apache.org/jira/browse/GERONIMO-4709)

Connecting to an Already Running Geronimo Instance

deploy/connect can be used to connect to an instance of Geronimo that is already running. If no options are provided, then the default port (1099) and host (localhost) will be used to connect to a server. The -p option can be used to specify a different port and -s to specify a remote hostname.

No Format
borderStylesolid

jason@Jason-Warners-Computer.local:/> deploy/connect --port 1099 --hostname foo.bar.com
Connecting to Geronimo server: foo.bar.com:1099
Username: system
Password: *******

deploy/disconnect can be used to disconnect from an already connected instance of Geronimo. Since only one instance of Geronimo can be connected at a time, no options are needed to specify which server to disconnect from.

No Format
borderStylesolid

jason@Jason-Warners-Computer.local:/> deploy/disconnect
Disconnecting from Geronimo server
Connection ended

Deploying an Application to a Server Instance

Deploy

deploy/deploy can be used to deploy a module to the geronimo instance that is currently connected.

A module file can be one of the following:

  • J2EE Enterprise Application Archive (EAR) file
  • J2EE Web Application Archive (WAR) file
  • J2EE Enterprise JavaBean Archive (JAR) file
  • J2EE Java Resource Archive (RAR) file
No Format
borderStylesolid

jason@butters:/> deploy/deploy <module>
Code Block

-D (--property) NAME=VALUE     Define system properties
-G (--gproperty) NAME=VALUE    Define an org.apache.geronimo property
-H (--home) DIR                Use a specific Geronimo home directory
-j (--jvm) DIR                 Use a specific Java Virtual Machine for server 
                                 process
-l (--logfile) FILE            Capture console output to file

Geronimo can be stopped using the geronimo/stop-server command

Code Block

jason@Jason-Warners-Computer.local:/> geronimo/stop-server -u system -w manager
Stopping
Connecting to Geronimo server: localhost:1099
[] received stop signal

If username (-u) and password (-w) are not provided on the command line, the user will be prompted for them before the server can shutdown.
The full set of geronimo/stop-server options can be seen in gshell using the --help option

Due to a bug in Geronimo v2.1 (https://issues.apache.org/jira/browse/GERONIMO-3845), stop-server will only work if you use system as your admin username and manager as your password. This bug will be addressed in the next Geronimo release. You can always use the shutdown command (shutdwon.sh|bat) to stop your server.

Connecting to an Already Running Geronimo Instance

deploy/connect can be used to connect to an instance of Geronimo that is already running. If no options are provided, then the default port and host will be used to connect to a server. The port (-p) option is used to specify a non-default port and the hostname (-s) option can be used to specify a remote hostname.

Code Block

jason@Jason-Warners-Computer.local:/> deploy/connect --port 1099 --hostname foo.bar.com
Connecting to Geronimo server: foo.bar.com:1099
Username: system
Password: *******
Note
title"deploy/connect and geronimo/stop-server"

When issuing a geronimo/stop-server command to a remote server, the hostname must be provided (and the port if it is not default) even if you are currently connected to that server via deploy/connect
This issue is addressed by (https://issues.apache.org/jira/browse/GERONIMO-3869)

deploy/disconnect can be used to disconnect from an already connected instance of geronimo. Since only one instance of geronimo can be connected at a time, no options are needed to specify which server to disconnect from.

Username: system
Password: *******

The -u and -w options can be used to provide username and password when issuing the command. The -s option can be used to specify the hostname. If none specified, then the hostname defaults to localhost. Likewise -p can be used to specify a port to contact the host on with 1099 being the default. -i can be used to specify an inPlace deployment from the directory you are actually developing the application. In that instance, the path to the application would need to be provided in place of the location of the module.

A deployment plan is necessary to deploy an application. If the deployment plan is not in the WEB-INF directory of a module, then its location must be specified after the module in the command.

No Format
borderStylesolid

jason@butters:/> deploy/deploy <module> <deployment plan>              

Redeploy

deploy/redeploy is used to deploy a newer version of a module onto a server where the older module is already deployed. It functions in a similar way to deploy/deploy but lacks an inPlace deployment option. The username and password is still required and can be provided via command line (-u and -w) or through a prompt after the command is issued. As with the deploy command, the user can specify both port (-p) and hostname (-s) if they differ from the defaults

No Format
borderStylesolid

jason@butters:/> deploy/redeploy -u system -w manager <module>

Undeploy

deploy/undeploy is used to properly remove a module from a server. The command takes the username (-u) and password (-w) options. If not provided, the user will be prompted. As with the deploy command, the user can specify both port (-p) and hostname (-s) if they differ from the defaults. The module id must be provided for the module you wish to undeploy.

No Format
borderStylesolid

jason@butters:/> deploy/undeploy -u system -w manager <module_id>

Distribute

deploy/distribute works exactly like deploy/deploy except the module is not started once it has been deployed into the server and is not marked to be started each time the server starts. The command can be issued in the same way, with the same options, as deploy/deploy.

No Format
borderStylesolid

jason@butters:/> deploy/distribute -u system -w manager <module> <deployment plan>              
Code Block

jason@Jason-Warners-Computer.local:/> deploy/disconnect
Disconnecting from Geronimo server
Connection ended