Deployment has been edited by Tim McConnell (Jun 03, 2008).

(View changes)

Content:

What's Changed?

From a deployment perspective there has been two significant enhancements to the 2.1.1 version of the Geronimo server. The first is deployment using GShell, and the second is deployment to a clustered farm of Geronimo servers. GShell is a command-line processing environment that can be used for the execution of Geronimo commands. GShell is an extensible environment and includes support for editing, command history, and tab completion. Deployment using GShell is described here: GShell. WADI can now be used to support clustering of web applications for Geronimo configurations which use the Tomcat Web Container (WADI support for Jetty was in previous releases). Applications can be deployed to administratively-defined groups of Geronimo servers. Deployment to a clustered farm is described here: Farming.

Deployment Options

1. Standard command line

The deployer application is a Java application that manages Java EE artifacts and GBean components in the Geronimo server. If Geronimo is running, it will connect to the server and perform its action through the server's deployment service. If it cannot find a running server, it will throw an error stating it could not connect to the server or the server is unavailable. The deployment tool can be started by using the java -jar to invoke the main class in <geronimo_home>/bin/deployer.jar. Typically, the deployment tool is started by just using the deploy script, but you can also run the application by starting a Java virtual machine using the following syntax:

java -jar deployer.jar [general_options] [command] [command_options]

where [general_options] specify common options that apply to all commands and control how the application behaves, [command] is a command name that specifies the action to be performed, and [command_options] are options unique to the command specified.

General options

This section lists all the available general options for the Geronimo deployer tool. The most frequently-used <general_options> are --user and --password.

  • --uri [identifier]
    Where [identifier] is a Universal Resource Identifier (URI) that specifies how the deployer is to contact the server. If this flag is not specified, the deployer will attempt to contact the server using the standard port on localhost. The identifier must have the following form: deployer:geronimo:jmx:rmi:///jndi/rmi:[//host[:port]]/JMXConnector where [host] is replaced with the host name or TCP/IP address of the system where the server is running and [port] is replaced with the port number where the server is listening. If unspecified, localhost and the default port will be used.

  • --host [host]
    Where [host] is the host name of the server you are trying to deploy that application or resource. This option allows you to deploy resources and applications to a remote server. This parameter is optional and defaults to localhost.

  • --port [port]
    Where [port] is the port of the remote server you are trying to deploy that application or resource. This parameter is optional and defaults to port 1099.

  • --driver [driver_path]
    Where [driver_path] is the path to the driver JAR if you want to use this tool with a server other than Geronimo. Currently, manifest Class-Path entries in that JAR are ignored.

  • --user [username]
    Where [username] is a user name authorized to be an administrator on the server. If the command requires authorization, you must use this option.

  • --password [password]
    Where [password] is a the password required to authenticate the user name. If this flag is not specified, the deployer will attempt to perform the command with no password, but if that fails, it will prompt you to enter a password.

  • --syserr [select]
    Where [select] can be either true or false. If this flag is unspecified. false is assumed. Specify true when you want errors to be logged to the syserr device.

  • --verbose [select]
    Where [select] can be either true or false. If this flag is unspecified. false is assumed. Specify true when you need more messages to determine the cause of an error.

  • --inPlace
    The --inPlace option allows you point to and deploy an application directly from a directory external to Geornimo without the need for even packaging the application. In other words, you can have an application running in Geronimo but that application may be anywhere else on the file system. The syntax for this option is:

    deploy --inPlace [app_home]
    

    Where [app_home] indicates the home directory where you have your application (exploded).

  • --offline
    You can also deploy applications if Geronimo is not running by using the --offline option. The syntax for this option is:

    deploy --offline [module]
    

    Where [module] specifies the application file name and location. Also, --offline and --inPlace can be combined as in the example below:

    deploy --offline --inPlace [app_home]
    

    Where [app_home] indicates the home directory where you have your application (exploded).

Commands

The available commands for the Geronimo deployer tool are listed below:

Additionally, you can type help for further details on a given command. The syntax is as follows:

deploy help [command]

Deploy

Use the deploy command to add and start a new module. The deploy command has the following syntax:

deploy <general_options> <--targets target;target;...> deploy <module> <deployment_plan>

Where <module> specifies the application file name and location, and the <deployment_plan> specifies the file name and location of the XML with the deployment plan. Normally both a module and deployment plan are passed to the deployer. Sometimes the module contains a deployment plan, or requires no deployment plan, in which case it can be omitted. Sometimes the deployment plan references a module already deployed in the Geronimo server environment, in which case a module does not need to be provided. If no targets are provided, the module is deployed to all available targets. Geronimo only provides one target (ever), so this is primarily useful when using a different driver. If the server is not currently running at the time of deploying the application, the module will be marked to start next time the server is started. A module file can be one of the following:

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

Login

Use the login command to save the username and password for the current connection to the file .geronimo-deployer in the current user's home directory. Future connections to the same server will try to use this saved authentication information instead of prompting where possible. This information will be saved separately per connection URL, so you can specify the -url or host and/or -port options on the command line to save a login to a different server. The login command has the following syntax:

deploy --user <user_name> --password <password> login

So, next time you run a different command that originally required user name and password, you can run the command directly, for example:

deploy list-modules

Even when the login information is not saved in clear text, it is not secure either. If you want to save the authentication securely, you should change the .geronimo-deployer file in your home directory so that nobody else can read or write it.

Redeploy

The redeploy command is a shortcut to undeploy a module from one or more servers, then deploy and restart a new version. The redeploy command has the following syntax:

deploy <general_options> redeploy <module> <deployment_plan> <ModuleID|TargetModuleID+>

Where <module> specifies the application file name and location, and the <deployment_plan> specifies the file name and location of the XML with the deployment plan. Normally both a module and deployment plan are passed to the deployer. Sometimes the module contains a deployment plan, or requires no deployment plan, in which case it can be omitted. Sometimes the deployment plan references a module already deployed in the Geronimo server environment, in which case a module does not need to be provided. If more than one TargetModuleID is provided, all TargetModuleIDs must refer to the same module (just running on different targets). Regardless of whether the old module was running or not, the new module will be started. If no ModuleID or TargetModuleID is specified, and you're deploying to Geronimo, the deployer will attempt to guess the correct ModuleID for you based on the module and/or plan provided. Note: To specify a TargetModuleID, use the form: TargetName|ModuleName. Just like the deploy command, the redeploy command accepts the following modules file types:

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

Restart

Use the restart command to restart a module that has been deployed before. The restart command has the following syntax:

deploy <general_options> restart <ModuleID|TargetModuleID+>

The restart command uses the configId of a module, or the fully-qualified TargetModuleID identifying both the module and the server or cluster it's on, and restarts that module. The module should be available to the server and running. If multiple modules are specified, they will all be restarted.

Start

Use the start command to start a previously deployed module. The start command has the following syntax:

deploy <general_options> start <ModuleID|TargetModuleID+>

The start command accept the configId of a module, or the fully-qualified TargetModuleID identifying both the module and the server or cluster it's on, and starts that module. The module should be available to the server but not currently running. If multiple modules are specified, they will all be started. If the server is not running, the module will be marked to start next time the server is started.

Stop

Use the stop command to stop a running module. The stop command has the following syntax:

deploy <general_options> stop <moduleIDs>

Where <moduleIDs> is a list of one or more modules (configID) separated by blank space. The module identification (or ConfigID)
is defined at deployment time in the respective deployment plan for each module previously deployed.

Undeploy

Use the undeploy command to stop and remove a module (running or not) and its deployment information from the server. The undeploy command has the following syntax:

java -jar deployer.jar <general_options> undeploy <moduleIDs>

Where <moduleIDs> is a list of one or more modules (configID) separated by blank space. The module identification (or ConfigID) is defined at deployment time in the respective deployment plan for each module previously deployed.

This command has the same ability as with deploy to uninstall applications when the server is not running, this command has the following syntax:

java -jar deployer.jar <general_options> --offline undeploy <moduleID>

Distribute

Use the distribute command to add a new module to the server. This command does not start the module nor mark it to be started in the future. The distribute command has the following syntax:

java -jar deployer.jar <general_options> distribute <module> <deployment_plan>

Just like with the deploy command, <module> specifies the application file name and location. The <deployment_plan> specifies
the file name and location of the XML with the deployment plan. Sometimes the application module already has included in the package a deployment plan or the application is so simple that does not require any deployment plan, in these cases this parameter can be omitted. A module file can be one of the following:

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

Install-library

Use the install-library command to install a library file into the server's repository. a new module to the server. This command does not start the module nor mark it to be started in the future. The distribute command has the following syntax:

java -jar deployer.jar <general_options> install-library <module> <deployment_plan>

Just like with the deploy command, <module> specifies the application file name and location. The <deployment_plan> specifies
the file name and location of the XML with the deployment plan. Sometimes the application module already has included in the package a deployment plan or the application is so simple that does not require any deployment plan, in these cases this parameter can be omitted. A module file can be one of the following:

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

List-modules

Use the list-modules command to list all available modules on the server, note that for running this command the server must be running. The list-modules command has the following syntax:

java -jar deployer.jar <general_options> list-modules \[\-\-all|\-\-started|\-\-stopped\]

  • --all : is used by default when no other option is specified. It will list all the available modules.
  • --started : this option will list only the modules that are running.
  • --stopped : this option will list only the modules that are not running.

List-targets

Use the list-targets command to lists the targets known to the server you have connected to. The list-targets command has the following syntax:

java -jar deployer.jar <general_options> list-targets

In the case of Geronimo, each configuration store is a separate target. Geronimo does not yet support clusters as targets.

Install-plugin

Use the install-plugin command to install a Geronimo plugin previously exported from a Geronimo server or downloaded from a repository. A Geronimo plugin can be an application, a configuration such data sources and drivers or a combination. The install-plugin command has the following syntax:

java -jar deployer.jar install-plugin <plugin_file>

Search-plugins

Use the search-plugins command to list all the Geronimo plugins available in a Maven repository. The search-plugins command has the following syntax:

java -jar deployer.jar search-plugins <maven_repository_URL>

Back to top

2. GShell command line

3. Clustered deployment

4. Plugins

5. Console

6. GEP - Eclipse

Annotations

Annotations

Deployment Plans

Deployment plans

    • Deployment plan wizard
    • geronimo-web.xml
    • geronimo-application.xml
    • geronimo-ra.xml
    • geronimo-application-client.xml
    • openejb-jar.xml
    • datasources
    • messaging
    • security

Content:

Powered by Atlassian Confluence (Version: 2.2.9 Build:#527 Sep 07, 2006) - Bug/feature request

Unsubscribe or edit your notifications preferences