Deploy an archive with gasadmin

When you deploy an archive on a Genero Application Server, the applications and services referenced in the archive are placed on the host, but are not yet available to users. Use this procedure to deploy an archive on your Genero Application Server using the gasadmin tool. To deploy an archive using the Deployment App, go to Deploy an archive in the Single sign-on User Guide.

Before you begin:

As a prerequisite, you have a Genero Archive (gar) file.

Tip:

It is a good idea to set your environment to access the gasadmin command by running the script $FGLASDIR/envas.

About this task:

When you use gasadmin to deploy the Genero Archive (gar) file, the archive is unpacked to the path set by the resource res.deployment.root. The default value for this resource is the $(res.appdata.path)/deployment directory; however, you can change the resource value to specify a different directory.

Static resources are zipped for better performance at runtime.
Note:

The application deployed is named with the xcf filename, not the Genero Archive (.gar) filename. To get details of deployed applications run the gasadmin gar --list-archives command where the GAS is running.

At the command line, type the gasadmin command with the appropriate command and arguments.

To deploy an archive named fuzzy.gar:

gasadmin gar --deploy-archive fuzzy.gar

By default, the results are output in text format. When the console output uses the form of an XML document, it can be easier to parse by other applications than textual output. To output in XML, specify the --xml-output option:

gasadmin gar --deploy-archive fuzzy.gar --xml-output
The exit status is a 0 (zero) in case of success, 1 in case of error.
XML output example:
<DEPLOYMENT success="TRUE">
  <MESSAGE>Genero Archive successfully deployed.</MESSAGE>
</DEPLOYMENT>
<DEPLOYMENT success="FALSE">
  <ERROR>Failed to deploy the Genero Archive</ERROR>
  <ERROR>An archive with the same name is already deployed</ERROR>
</DEPLOYMENT>
Text output example:
Command succeeded.
Genero archive successfully deployed.
Command failed.
ERROR: Failed to deploy the Genero Archive
ERROR: An archive with the same name is already deployed.
Important:

If you start the dispatcher with the option (-E) to override the $(res.appdata.path) location, you must also override the resource when deploying applications with the gasadmin gar command, in order to deploy to the correct directory.

For example, specify the same option with both commands:
  • Starting the dispatcher:

    httpdispatch -E res.appdata.path=/work/tmp/gas/appdata

  • Deploying the application:

    gasadmin gar -E res.appdata.path=/work/tmp/gas/appdata --deploy-archive myapp.gar

All applications and services are deployed in the default group of the application server. For more information on where the archive is deployed, go to File system layout of deployed archive.

What to do next:
After deploying an archive, you now need to activate (enable) it so that the applications and services provided by the archive become available to users. For information on enabling an archive, go to Enable a deployed archive with gasadmin.
Tip:

You can view a list of all deployed archives (enabled and disabled) with the gasadmin gar --list-archives command. For details, go to List deployed archives.