DeployGar
The DeployGar tool deploys and manages applications and services in a Genero archive (.gar) file on a Genero Application Server secured by a Genero Identity Provider.
Set the environment
Before executing the command, set the environment using the envidp script, found in $FGLDIR/web_utilities/services/gip. On Microsoft® Windows, the script is named envidp.bat.
Syntax
DeployGar command [ options ] [ args ]
- command. There are nine commands to perform actions on Genero archive
(.gar) files on the Genero Application Server (GAS):
- list lists all deployed gar files.
- deploy deploys a gar file.
- undeploy undeploys a gar file.
- enable enables a gar file.
- disable disables a gar file.
- secure secures a gar file.
- unsecure unsecures a gar file.
- delegate configures delegation in a deployed Genero archive.
- config configures application security on the Identity Provider (IdP).
- options. Some options are specific to commands and these are described in the tables in DeployGar command options.
- args include the URL of the GAS. Some arguments are specific to commands and these are described in the next paragraphs.
Syntax 1: list archives
DeployGar list [ options ] url
Syntax 2: deploy/enable/secure archives
DeployGar {
| deploy | undeploy
| enable | disable
| secure | unsecure } [ options ] archive url
Syntax 3: delegate
DeployGar delegate [ options ] archive xcf url
- options are described in Table 2
- archive is the Genero archive filename
- xcf is the filename of the application configuration file (.xcf) in the archive
- url is the GAS base URL
Syntax 4: config
DeployGar config [ options ] operation client_id url - options are described in Table 3
- operation to perform security configuration on IdP must be one of the
following:
{get|set} - client_id is the OAuth client ID of the application
- url is the GAS base URL
DeployGar command options
| Option | Description |
|---|---|
|
|
Displays help for the command. |
|
|
Specifies the HTTP user name. |
|
|
Specifies the password of the HTTP user. |
-t, --token value
|
Specifies the access token value. |
-f, --tokenfile
filename
|
Specifies the access token file. |
-x, --xml |
Output result of command in XML format. |
| Option | Description |
|---|---|
|
|
Displays help for the command. |
|
|
Specifies the HTTP user name. |
|
|
Specifies the password of the HTTP user. |
-t, --token value
|
Specifies the access token value. |
-f, --tokenfile
filename
|
Specifies the access token file. |
| Option | Description |
|---|---|
|
|
Displays help for the command. |
|
|
Specifies the HTTP user name. |
|
|
Specifies the password of the HTTP user. |
-t, --token value
|
Specifies the access token value. |
-f, --tokenfile
filename
|
Specifies the access token file. |
-c, --config
filename |
Specifies the configuration filename. |
Usage
The DeployGar tool is located in your $FGLDIR/web_utilities/services/gip/bin/deploy directory.
Use a command with the help option to display available options. For example:
DeployGar config --help
Some examples using DeployGar are given in the next paragraphs. To run DeployGar commands, you will need to have a valid access token. The GetToken command allows you to get access tokens at the command line.
Get list of deployed gar files
Run this command to get a list of deployed gar files on a GAS. Mainly, you would use this to check your access is working; that you have an up-to-date access token, and that the GAS URL is reachable.
DeployGar list --xml --tokenfile mytoken.json
GAS_base_URL
- The
--xmloption is specified for the format of the output. - The
--tokenfileoption needs the path to a filename where the access token got from the IdP is saved. See GetToken for details of getting the access token. - GAS_base_URL is the URL of the
GAS.
https://host:port/gas
<?xml version="1.0" encoding="UTF-8"?><DEPLOYMENT success="TRUE">
<MESSAGE>3 archive(s) deployed
</MESSAGE>
<ARCHIVE name="myGarfile" enabled="TRUE">
<DESCRIPTION>Price program</DESCRIPTION>
<DEPLOYMENT_PATH>C:\ProgramData\FourJs\gas\5.00.03-202410221156/deployment/myGarfile-20241025-111957</DEPLOYMENT_PATH>
<APPLICATION xcf="price.xcf"/>
</ARCHIVE>
#...Deploy a gar file
Run this command to deploy a Genero archive file.
DeployGar deploy -f mytoken.json myGarfile.gar
GAS_base_URL
- The
-foption (short option for--tokenfile) gives the path to a file where the access token got from the IdP is saved. - GAS_base_URL is the URL of the
GAS.
https://host:port/gas
COMMAND deploy succeeded
MESSAGE:
Found application price.xcf.
MESSAGE:
Optimizing by compressing static resources...
MESSAGE:
Optimizing by compressing public resources...
MESSAGE:
Archive myGarfile.gar successfully deployed.Secure a gar file
Run this command to secure applications deployed in a Genero archive file.
DeployGar secure -f mytoken.json
myGarfile.gar
GAS_base_URL
- The
-foption (short option for--tokenfile) gives the path to a file where the access token got from the IdP is saved. - GAS_base_URL is the URL of the
GAS.
https://host:port/gas
[{"client_id":"10DC13F0-B4F9-4C71-B8D8-8AFA26194444","xcf":"price.xcf","kind":"APPLICATION"}]