...
GShell is an extensible, command-line processing environment for creating command-line applications. GShell includes support for command editing, command history, input/output redirection, and more. GShell is a subproject of Geronimo. For more information on GShell, see the GShell wiki.
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:
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 |
---|
|
cd geronimo-jetty6-javaee5-2.1
./bin/gsh
|
Wiki Markup |
---|
{card:label=Windows} |
No Format |
---|
|
cd c:\g
bin\gsh
|
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:
GShell just type gsh
GShell commands may be specified when starting GShell:
./gsh deploy/list-modules
or commands may be entered interactively:
No Format |
---|
|
coltrane kevan$ ./gsh
Apache Geronimo (2.1)
Type 'help' for more information.
------------------------------------------------------------- |
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 +
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/ activemq-raaxis/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.
The help
command will display all GShell commands that are available in the current environment.
No Format |
---|
|
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 Deploy a module
list-modules List modules
redeploy Redeploy a module
distribute |
Code Block |
---|
kevan@coltrane:/> help
For information about Apache Geronimo, visit:
http://geronimo.apache.org
Available commands:
execute-alias ExecuteDistribute ana aliasmodule
disconnect exit Disconnect from a Geronimo server
remote
Exit thersh-server shell
print Start a GShell server
rsh Alias to: echo
alias Connect to a remote GShell Createserver
an aliasgeronimo
sourcestop-server Stop a Geronimo server
Loadstart-client a file/url into the current shell
? Start a Geronimo application client
start-server Start a Alias to: help
. Geronimo server
|
The quit
command will exit the GShell environment.
To obtain help information on any command, use the --help
option:
No Format |
---|
|
kevan@coltrane.local:/> deploy/list-modules --help
list-modules
--
TARGET Alias to: source
unalias Remove an alias
unset Unset a variable
helpTarget name
-a (--all) Show commandstarted help
or stopped echomodules
-h (--help) Echo or print arguments to STDOUT
clearDisplay this help message
-p (--port) N Clear the terminal screen
quit Port, default 1099
-r (--started) Alias to: exit
set Show started modules only
-s (--hostname, --server) VAL SetHostname, adefault variablelocalhost
remote-control
server-controlt (--stopped) Remote server control
deploy
undeploy Show stopped modules only
-u (--username) UndeployVAL a module
connect Username
-w (--password) VAL Connect to a Geronimo server
install-library Password
|
Geronimo GShell Commands
The following list shows the Geronimo specific commands available:
No Format |
---|
|
deploy/deploy Install library
stop StopDeploy a module
deploy/undeploy list-targets List targets
Undeploy restarta module
deploy/start Restart a module
install-plugin Install Start a plugin
list-pluginsmodule
deploy/stop Install plugins into a geronimo server
startStop a module
deploy/restart StartRestart a module
deploy/list-modules assemble List modules
deploy/redeploy Extract a geronimo server from the current one
deployRedeploy a module
deploy/distribute Deploy a module
list-modules Distribute a module
deploy/connect List modules
redeploy Connect to a Geronimo server
deploy/disconnect Redeploy a module
distribute Disconnect from a Geronimo server
deploy/install-library Distribute aInstall module
library
deploy/list-targets disconnect List targets
deploy/install-plugin Disconnect from a Geronimo server
Install a remote
rsh-serverplugin
deploy/list-plugins Install plugins Startinto a GShellgeronimo server
deploy/assemble rsh Extract a geronimo server from the current one
geronimo/start-server Connect toStart a remote GShellGeronimo server
geronimo
geronimo/stop-server Stop a Geronimo server
geronimo/start-client Start a Geronimo application client
|
Starting and Stopping Geronimo in Gshell
Geronimo can be started through gshell using the geronimo/start-server
command.
No Format |
---|
|
jason@Jason-Warners-Computer.local:/> geronimo/start-server --background
Launching Geronimo Server...
Booting Geronimo Kernel (in Start a Geronimo server
|
The quit
command will exit the GShell environment.
To obtain help information on any command, use the {--help} option:
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 |
---|
|
start-server
--
-A (--javaagent) JAR |
Code Block |
---|
kevan@coltrane.local:/> deploy/list-modules --help
list-modules
--
TARGET Target name
-a (--all) Use a specific Java Agent, set to 'none' to dis
Show started or stopped modules
-h (--help) Display this help messageable
-pD (--portproperty) NNAME=VALUE Define system properties
-G (--gproperty) NAME=VALUE Port, default 1099Define an org.apache.geronimo property
-rH (--startedhome) DIR Use a Showspecific startedGeronimo moduleshome onlydirectory
-sJ (--hostname, --server) VALjavaopt) FLAG Set Hostname,a defaultJVM localhostflag
-tb (--stoppedbackground) Run the server Showprocess stoppedin modulesthe onlybackground
-uh (--usernamehelp) VAL Username
-w (--password) VAL Display this help message
-j (--jvm) DIR Password
|
Geronimo GShell Commands
The following deploy
commands are available:
Code Block |
---|
deploy/deploy Use a specific Java Virtual DeployMachine afor module
deploy/undeployserver
Undeploy a module
deploy/start process
-l (--logfile) FILE Start a module
deploy/stop Capture console output to file
-m (--module) NAME Stop a module
deploy/restart Start up a specific module by name
Restart a module
deploy/list-modules-q (--quiet) List modules
deploy/redeploy Suppress informative and warning messages
Redeploy a module
deploy/distribute-t (--timeout) N Distribute a module
deploy/connect Specify the timeout for the server process in s
Connect to a Geronimo server
deploy/disconnect Disconnect from a Geronimo server
deploy/install-library econds
Install library
deploy/list-targetsv (--verbose) List targets
deploy/install-plugin Enable verbose Install a plugin
deploy/list-pluginsoutput; specify multipule times
Install plugins into a geronimo server
deploy/assemble Extract a geronimo serverto from the current one
|
Code Block |
---|
geronimo/start-server Start a Geronimo server
geronimo/stop-server Stop a 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
Geronimo can be stopped using the geronimo/stop-server
command.
No Format |
---|
|
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 |
---|
title | On a Windows platform |
---|
|
Use forward slash "/" instead of traditional back slash "\" as directory seperators. For example: |
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 |
---|
|
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 |
---|
|
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 |
---|
|
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
Connecting to 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 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 |
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.
Geronimo server: localhost:1099
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 |
---|
|
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 |
---|
|
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 |
---|
|
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 |
---|
|
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
|