gogo commands for Geronimo

Page edited by Runhua Chi


Changes (31)

...
{info}Not completed yet{info}

{excerpt}Gogo {excerpt}The gogo commands for Geronimo is an extension of [Apache Felix Shell|http://felix.apache.org/site/apache-felix-gogo.html|Felix gogo] karaf Shell|http://karaf.apache.org/|Apache karaf] to interact with Geronimo kernel.{excerpt} Those command names are made up of two parts: <scope>:<name> by convention as listed below. Click each command to learn about its usage.

To enter the Felix karaf shell, press *Enter* after you start up the Geronimo server using *geronimo run* command.

{anchor:top}
...
[deploy:login|#gogocommandlogin]
[deploy:start-module|#gogocommandstartmodule]
[equinox:diagnose|#gogocommanddiagnose]

{column}
...
Use this syntax to stop the server.
{panel:borderStyle=solid}
geronimo> geronimo:stop-server --hostname localhost -p 1099
{panel}

...
h2. encrypt command examples
Use this syntax to encrypt string passw0rd on an active server so that the encryption settings of that server will be used.{panel:borderStyle=solid}
encrypt passw0rd
geronimo> deploy:encrypt passw0rd
{panel}
Online encryption result is shown below:
...
Use this syntax to create a custom server assembly, which is placed at {{<geronimo_home>/var/temp/}}.
{panel:borderStyle=solid}
geronimo> deploy:assemble-server -f zip -g group1 -a assemble1
{panel}
[Back to Top|#top]
...
Use this syntax to deploy a WAR file whose deployment plan is located outside of the WEB-INF directory.
{panel:borderStyle=solid}
deploy-module d:/HelloWorld.war d:/geronimo-web.xml
geronimo> deploy:deploy-module d:/HelloWorld.war d:/geronimo-web.xml
{panel}

...
Use this syntax to distribute a module whose deployment plan is located outside of the WEB-INF directory.
{panel:borderStyle=solid}
distribute-module d:/HelloWorld.war d:/geronimo-web.xml
geronimo> deploy:distribute-module d:/HelloWorld.war d:/geronimo-web.xml
{panel}

...
Use this syntax to display the list of plugins in the given repository using secure channel.
{panel:borderStyle=solid}
list-plugins --secure -r http://geronimo.apache.org/plugins/geronimo-3.0/
geronimo> deploy:list-plugins --secure -r http://geronimo.apache.org/plugins/geronimo-3.0/
{panel}

...
Use this syntax to create a new server instance.
{panel:borderStyle=solid}
new-server-instance instance2
geronimo> deploy:new-server-instance instance2
{panel}

...
Use this syntax to deploy a newer version of an existing module .
{panel:borderStyle=solid}
redeploy-module D:/HelloWorld.war default/HelloWorld/1.0/car
geronimo> deploy:redeploy-module D:/HelloWorld.war default/HelloWorld/1.0/car
{panel}

...
Use this syntax to remove an existing module.
{panel:borderStyle=solid}
geronimo> deploy:undeploy-module default/HelloWorld/1.0/car
{panel}

...
Use this syntax to start an existing module.
{panel:borderStyle=solid}
start-module default/HelloWorld/1.0/car
geronimo> deploy:start-module default/HelloWorld/1.0/car
{panel}

...
Use this syntax to stop a running module.
{panel:borderStyle=solid}
stop-module default/HelloWorld/1.0/car
geronimo> deploy:stop-module default/HelloWorld/1.0/car
{panel}

...
Use this syntax to restart a module.
{panel:borderStyle=solid}
restart-module default/HelloWorld/1.0/car
geronimo> deploy:restart-module default/HelloWorld/1.0/car
{panel}

...
Use this syntax to list the started modules in the target repository.
{panel:borderStyle=solid}
list-modules -r
geronimo> deploy:list-modules -r
{panel}

...
Use this syntax to deploy a CAR file.
{panel:borderStyle=solid}
geronimo> deploy:install-plugin d:/HelloWorld-1.0.car
{panel}
[Back to Top|#top]
...
Use this syntax to install a geronimo library.
{panel:borderStyle=solid}
install-library d:/temp/openejb-ejbd-3.2-SNAPSHOT.jar
geronimo> deploy:install-library d:/temp/openejb-ejbd-3.2-SNAPSHOT.jar
{panel}

...
{panel}

h2. unlock -keystore command examples

[Back to Top|#top]

h1. equinox:diagnose{anchor:gogocommanddiagnose}

The command is used to diagnose constraints of an installed OSGi bundle and verify if the bundle can be resolved successfully. The command is only available in Equinox OSGi runtime.
{panel:borderStyle=solid}
*diagnose* *{_}generaloptions{_}* *<bundleIDs>*

where

*{_}bundleIDs{_}* is a list of bundle IDs seperated by whitepaces.
{panel}

h2. diagnose command examples
Use this syntax to diagnose the resolver problem of a bundle with Id 85.
{panel:borderStyle=solid}
geronimo> diagnose 85
mvn:org.apache.geronimo.framework/geronimo-service-builder/3.0-SNAPSHOT [85]
No unresolved constraints.
{panel}
[Back to Top|#top]

Full Content

geronimo Tools and commands jaxws-tools
Not completed yet

The gogo commands for Geronimo is an extension of Apache karaf Shell to interact with Geronimo kernel. Those command names are made up of two parts: <scope>:<name> by convention as listed below. Click each command to learn about its usage.

To enter the karaf shell, press Enter after you start up the Geronimo server using geronimo run command.

geronimo:stop-server
deploy:assemble-server
deploy:distribute
deploy:list-modules
deploy:new-server-instance
deploy:stop-module

geronimo:wait-for-server
deploy:connect
deploy:encrypt
deploy:list-plugins
deploy:redeploy-module
deploy:undeploy-module

geronimo:start-client
deploy:deploy-module
deploy:install-library
deploy:list-targets
deploy:restart-module
deploy:unlock-keystore

geronimo:start-server
deploy:disconnect
deploy:install-plugin
deploy:login
deploy:start-module
equinox:diagnose

Note that if the <name> portion of the command is unique, then you only need to type it. If not, then you must either type the full <scope>:<name> or arrange the scope search path accordingly. For example, you can use list-modules instead of deploy:list-modules to list all modules in the server repository.

Following options are common to those commands:

generaloptions includes:

-s or --server, --hostname

Hostname, default localhost

-p or --port

Port, default 1099

-u or --username

Specify an Username to start the server

-w or --password

Specify the password to start the server

--help

Display this help message

geronimo:start-server

The server can be started through Felix Shell using the geronimo:start-server command. It uses the following syntax:

start-server generaloptions commandoptions

where

commandoptions includes:

-A or --javaagent

Use a specific Java Agent, set to none to disable

-b or --background

Run the server process in the background

-D or --property

Define system properties

-G or --gproperty

Define Geronimo system properties

-H or --home

Use a specific Geronimo home directory

-j or --jvm

Use a specific Java Virtual Machine for server process

-J or --javaopt

Set a Java Virtual Machine flag

-l or --logfile

Capture console output to a specified log file

-m or --modules

Start up a specific module by name

-P or --profile

Specify a configuration profile

-q or --quite

Suppress informative and warning messages

-t or --timeout

Specify the timeout for the server process in seconds

-v or --verbose

Enable verbose output; specify multiple times to increase verbosity

--secure

Use secure channel

start-server command examples

Back to Top

geronimo:stop-server

The server can be stopped using the geronimo/stop-server command. It uses the following syntax:

stop-server generaloptions commandoptions

Where

commandoptions includes:

--secure

Use secure channel

stop-server command examples

Use this syntax to stop the server.

geronimo> geronimo:stop-server --hostname localhost -p 1099

Back to Top

geronimo:wait-for-server

The command is used to verify if the server has started in the given time (in seconds). It uses the following syntax:

wait-for-server generaloptions commandoptions

Where

commandoptions includes:

-t or --timeout

Specify the time (in seconds) to wait while verifying the that the server has started. 60 seconds by default

wait-for-server command examples

Back to Top

deploy:login

The command is used to save the username and password for the current connection to a file to avoid future prompting. This command is used for remote connections. Local connections, by default, affect in the embeded mode which does not support this function. It has the following syntax:

login generaloptions commandoptions

where

commandoptions includes:

--secure

Use secure channel

login command examples

Back to Top

deploy:encrypt

The command is used to generates an encrypted string using org.apache.geronimo.util.EncryptionManager. It has the following syntax:

encrypt commandoptions string

where

commandoptions includes:

--secure

Use secure channel

string is a string to be encrypted

encrypt command examples

Use this syntax to encrypt string passw0rd on an active server so that the encryption settings of that server will be used.

geronimo> deploy:encrypt passw0rd


Online encryption result is shown below:

String to encrypt: passw0rd
Online encryption result:
{Simple}rO0ABXNyABlqYXZheC5jcnlwdG8uU2VhbGVkT2JqZWN0PjY9psO3VHACAARbAA1lbmNv
ZGVkUGFyYW1zdAACW0JbABBlbmNyeXB0ZWRDb250ZW50cQB+AAFMAAlwYXJhbXNBbGd0ABJMamF2YS9s
YW5nL1N0cmluZztMAAdzZWFsQWxncQB+AAJ4cHB1cgACW0Ks8xf4BghU4AIAAHhwAAAAEG2NoqXONCcU
GqfK0reVCpVwdAADQUVT

Back to Top

deploy:assemble-server

The command is used to extract a customized server assembly from the current one. It has the following syntax:

assemble-server generaloptions commandoptions

Where

commandoptions includes:

-a, or --artifact

Specify the server artifact name

-f, or --format

Specify if the assembly is in .zip or tar.gz format

-g, or --groupId

Specify the group ID of the library

-t, or --path

Specify the assembly location, where your specific plug-ins are stored. The default location is <geronimo_home>/var/temp/

-l, or --list

Refresh the plug-in list

assemble-server command examples

Use this syntax to create a custom server assembly, which is placed at <geronimo_home>/var/temp/.

geronimo> deploy:assemble-server -f zip -g group1 -a assemble1

Back to Top

geronimo:start-client

The command is used to start a Geronimo application client. Note that before starting a client, you have to deploy the application to the server. It has the following syntax:

start-client generaloptions commandoptions

Where

commandoptions includes:

-A or --javaagent

Use a specific Java Agent, set to none to disable

-b or --background

Run the server process in the background

-D or --property

Define system properties

-G or --gproperty

Define Geronimo system properties

-H or --home

Use a specific Geronimo home directory

-j or --jvm

Use a specific Java Virtual Machine for server process

-J or --javaopt

Set a Java Virtual Machine flag

-l or --logfile

Capture console output to a specified log file

-P or --profile

Specify a configuration profile

-t or --timeout

Specify the timeout for the server process in seconds

-v or --verbose

Enable verbose output; specify multiple times to increase verbosity

start-client command examples

Back to Top

deploy:connect

The command is used to connect to an instance of Geronimo that is already running. After connected successfully, you can run a series of commands on the remote server. It has the following syntax:

connect generaloptions commandoptions

Where

commandoptions includes:

--secure

Use secure channel

connect command examples

Back to Top

deploy:disconnect

The command is used to close the connection to a remote Geronimo server. Only one instance of the server can be connected at a time, no additional options are needed to specify which server to disconnect from. If you are trying to connect to a second server instance, use this command to disconnect first. It has the following syntax:

disconnect

disconnect command examples

Back to Top

deploy:deploy-module

The command is used to deploy a module to a Geronimo server. Once deployed, a module is identified by its module ID within Geronimo. It has the following syntax:

deploy-module generaloptions commandoptions <module> <deployment plan>

where

module is a module file, which is required for the command and can be one of the following:

  • Java EE Enterprise Application Archive (EAR) file
  • Java EE Web Application Archive (WAR) file
  • Java EE Enterprise JavaBean Archive (JAR) file
  • Java EE Java Resource Archive (RAR) file
  • OSGi Bundle
  • Web Archive Bundle(WAB) file
  • Enterprise Bundle Archive(EBA) file

deployment plan is an optional plan file for Java EE module. If the deployment plan for a Java EE archive file is not in the WEB-INF directory, its location must be specified after the module in the command. See Understanding deployment plans for more details.
commandoptions includes:

--secure

Use secure channel

-i or --inPlace

Add and start an archive or directory to an active server, without the archive or directory being copied into the server directory tree

-t or --targets

Specify the target repository to be deployed into. See list-targets for the names of repositories available on the server.

deploy-module command examples

Use this syntax to deploy a WAR file.

deploy-module d:/HelloWorld.war

Use this syntax to deploy a WAR file whose deployment plan is located outside of the WEB-INF directory.

geronimo> deploy:deploy-module d:/HelloWorld.war d:/geronimo-web.xml

Back to Top

deploy:distribute-module

The command works exactly like deploy-modules 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. It has the same syntax and options as deploy-modules:

distribute-module generaloptions commandoptions <module> <deployment plan>

distribute command examples

Use this syntax to distribute a module whose deployment plan is located outside of the WEB-INF directory.

geronimo> deploy:distribute-module d:/HelloWorld.war d:/geronimo-web.xml

Back to Top

deploy:list-targets

The command is used to list all available target repositories on the server. It has the following syntax:

list-targets generaloptions commandoptions

where

commandoptions includes:

--secure

Use secure channel

list-targets command examples

Back to Top

deploy:list-plugins

The command is used to list all of plugins in a certain maven repository. It has the following syntax:

list-plugins generaloptions commandoptions

where

commandoptions includes:

--secure

Use secure channel

-rr or --refresh-repository

refresh repository

-r or --repository

repository URL

-rl or --refresh-list

referensh plugin list

list-plugins command examples

Use this syntax to first access the list of repositories. Select a repository from the list, plugins in this repository is displayed.

list-plugins

Use this syntax to display the list of plugins in the given repository using secure channel.

geronimo> deploy:list-plugins --secure -r http://geronimo.apache.org/plugins/geronimo-3.0/

Back to Top

deploy:new-server-instance

The command is used to create a new server instance. It has the following syntax:

new-server-instance generaloptions commandoptions instancename

where

commandoptions includes:

--secure

Use secure channel

instancename is the name of the new instance.

new-server-instance command examples

Use this syntax to create a new server instance.

geronimo> deploy:new-server-instance instance2

Back to Top

deploy:redeploy-module

The command is used to deploy a newer version of a module onto a server where the older module is already deployed. It has the following syntax:

redeploy-module generaloptions commandoptions <module> <deployment plan> <module id>

where

module is a module file, which is required for the command and can be one of the following:

  • Java EE Enterprise Application Archive (EAR) file
  • Java EE Web Application Archive (WAR) file
  • Java EE Enterprise JavaBean Archive (JAR) file
  • Java EE Java Resource Archive (RAR) file
  • OSGi Bundle
  • Web Archive Bundle(WAB) file

deployment plan is an optional plan file for Java EE module. If the deployment plan for a Java EE archive file is not in the WEB-INF directory, its location must be specified after the module in the command. See Understanding deployment plans for more details.
module id is the configuration on the server you want to replace. If you do not specify the module_id, the plan supplied (or plan inside the module) will be used to determine the actual configuration that you wish to redeploy. Redeploying a plan with an existing module ID allows you to modify the configuration of a running module without intermediate undeployment.
commandoptions includes:

--secure

Use secure channel

redeploy-module command examples

Use this syntax to deploy a newer version of an existing module .

geronimo> deploy:redeploy-module D:/HelloWorld.war default/HelloWorld/1.0/car

Back to Top

deploy:undeploy-module

The command is used to properly remove a module from a server. It has the following syntax:

undeploy-module generaloptions commandoptions <module id>

where

module id is the configuration name you want to remove from the server. It must be provided.
commandoptions includes:

--secure

Use secure channel

undeploy-module command examples

Use this syntax to remove an existing module.

geronimo> deploy:undeploy-module default/HelloWorld/1.0/car

Back to Top

deploy:start-module

The command is used to start an existing module on the server which is not running. It use the following syntax:

start-module generaloptions commandoptions <module id>

where

module id is the configuration name you want to start on the server. It must be provided.
commandoptions includes:

--secure

Use secure channel

start-module command examples

Use this syntax to start an existing module.

geronimo> deploy:start-module default/HelloWorld/1.0/car

Back to Top

deploy:stop-module

The command is used to stop a running module on the server. It use the following syntax:

start-module generaloptions commandoptions <module id>

where

module id is the configuration name you want to stop on the server. It must be provided.
commandoptions includes:

--secure

Use secure channel

stop-module command examples

Use this syntax to stop a running module.

geronimo> deploy:stop-module default/HelloWorld/1.0/car

Back to Top

deploy:restart-module

The command is used to restart a module on the server. It has the following syntax:

restart-module generaloptions commandoptions <module id>

where

module id is the configuration name you want to restart on the server. It must be provided.
commandoptions includes:

--secure

Use secure channel

restart-module command examples

Use this syntax to restart a module.

geronimo> deploy:restart-module default/HelloWorld/1.0/car

Back to Top

deploy:list-modules

The command is used to list modules in the target repository. It has the following syntax:

list-modules generaloptions commandoptions <targetname>

where

commandoptions includes:

--secure

Use secure channel

-t or --stopped

Show stopped modules only

-r or --started

Show started modules only

-a or --all

Show started and stopp modules only, this one is default if you did not specify any parameters

targetname is the name of target repository. See list-targets for more details.

list-modules command exmaples

Use this syntax to list the started modules in the target repository.

geronimo> deploy:list-modules -r

Back to Top

deploy:install-plugin

The command is used to install a geronimo plugin into the server. It has the following syntax:

install-plugin generaloptions commandoptions <configuration archive>

where

commandoptions includes:

--secure

Use secure channel

configuration archive is the fully qualified name of plugin archive. The archive must be a valid Geronimo plugin file.

install-plugin command examples

Use this syntax to deploy a CAR file.

geronimo> deploy:install-plugin d:/HelloWorld-1.0.car

Back to Top

deploy:install-library

The command is used to install a geronimo library into the server. It has the following syntax:

install-library generaloptions commandoptions <configuration archive>

where

commandoptions includes:

--secure

Use secure channel

-g or --groupId

Specify the group ID of the library

configuration archive is the fully qualified name of library archive.

If installed successfully, the library will be found in <geronimo_home>/repository

install-library command examples

Use this syntax to install a geronimo library.

geronimo> deploy:install-library d:/temp/openejb-ejbd-3.2-SNAPSHOT.jar

Back to Top

deploy:unlock-keystore

The command is used to unlock a keystore and private key in Geronimo server. It has the following syntax:

unlock-keystore generaloptions commandoptions <keystore>

where

commandoptions includes:

--secure

Use secure channel

keystore is the name of keystore or private key you want to unlock.

unlock-keystore command examples

Back to Top

equinox:diagnose

The command is used to diagnose constraints of an installed OSGi bundle and verify if the bundle can be resolved successfully. The command is only available in Equinox OSGi runtime.

diagnose generaloptions <bundleIDs>

where

bundleIDs is a list of bundle IDs seperated by whitepaces.

diagnose command examples

Use this syntax to diagnose the resolver problem of a bundle with Id 85.

geronimo> diagnose 85
mvn:org.apache.geronimo.framework/geronimo-service-builder/3.0-SNAPSHOT 85
No unresolved constraints.

Back to Top

Change Notification Preferences
View Online | View Changes | Add Comment