Deploying applications on GAS
Follow these procedures to build archives for deploying applications and services with fglgar.
As a prerequisite, you must have your applications and/or services created, compiled, and tested. Consolidate all the necessary files for your archive under a root directory.
Included in this page are some typical examples of how to build archives and deploy applications:
- Overview of the main tasks
- Build a simple archive file
- Build an archive file with many applications
- Build an archive with public resources
- Build an archive with deployment triggers
- Deploy your application on your machine
- Enable your application on your machine
- Run the deployed application
For a full understanding of what Genero archiving offers, please read all archiving topics in the Genero Application Server User Guide.
Overview of the main tasks
This procedure provides you with a quick overview of the main steps for archiving and deploying an application using fglgar. For more information, see fglgar.
The applications, services, and resources included in the archive are available for your end users.
Build a simple archive file
The fglgar gar command used with the --application
option
builds an archive for your application. Using fglgar as shown in this
procedure creates this type of archive.
fglgar gar --application myApp.42r
If a MANIFEST file already exists when you run the command, errors will be raised. For more information on the use of these options, see fglgar.
Build an archive file with many applications
If you have many applications to package, you may find it easier to create the MANIFEST by hand instead of referencing each application at the command line. The fglgar checks if a MANIFEST file is present in the archive directory and uses it to create the gar.
Build an archive with public resources
An archive can contain common or public resources such as images, reports, etc., that all deployed applications on the GAS can use. Using fglgar as shown in this procedure creates this type of archive.
Build an archive with deployment triggers
An archive can be defined with deployment parameters. These are commands that execute when deploying and undeploying an application on the GAS. Using fglgar as shown in this procedure creates the archive with deployment trigger options.
Deployment triggers are typically not required, you can deploy your applications without them.
fglgar gar --application myApp.xcf --trigger-component cpn.gar.execution.local
--deploy-trigger "fglrun mydeploy.42r" --undeploy-trigger "fglrun myundeploy.42r"
- The --trigger-component option references a trigger component in the GAS as.xcf that defines the runtime environment where triggers are run. If not set, it defaults to "cpn.gar.execution.local".
- The --deploy-trigger specifies your DEPLOY command.
- The --undeploy-trigger options specifies the UNDEPLOY command.
If a MANIFEST file already exists when you run the command, errors will be raised. For more information on the use of these options, see fglgar.
Deploy your application on your machine
Once you have created an archive for your application, you can now deploy it locally on your machine where the GAS is installed. If the standalone dispatcher on your GAS installation is not already started, run it from the command line using httpdispatch.
fglrun
$FGLDIR/web_utilities/services/deployment/bin/PublishGAR
http://localhost:6394 deploy myApp.gar
gasadmin gar --deploy-archive myApp.gar
The application deployed is named with the xcf, not the gar file name.
Enable your application on your machine
Once you have deployed your application, you can now make it available for end users by enabling it on the machine where the GAS is installed. If the standalone dispatcher on your GAS installation is not already started, run it from the command line using httpdispatch.
fglrun
$FGLDIR/web_utilities/services/deployment/bin/PublishGAR
http://localhost:6394 enable myApp.gar
gasadmin gar --enable-archive myApp.gar
Run the deployed application
Once the application is enabled, you can now run it. If the standalone dispatcher on your GAS installation is not already started, run it from the command line using httpdispatch.
http://localhost:6394/ua/r/myApp