Deployment on remote server

The Genero deployment service can be accessed remotely to perform tasks to deploy applications.

You can access it on the GAS at a base URL of /ws/r/admin/GeneroDeploymentService.

Deploying a Genero Archive (gar) file on a remote server where you do not have access to the command line gasadmin tool, requires you to use the deployment service. The service is protected by Genero Identity Provider (GIP) and requires authorization to use it.

The deployment service is based on the gasadmin gar and implements most of its commands for managing Genero Archive (gar). Table 1 describes the actions you can perform and provides you with examples of using them over HTTP.

Table 1. Genero Archive deployment service actions over HTTP
Action Description HTTP request details
deploy Deploys a Genero Archive (gar) file on the Genero Application Server by calling:

gasadmin gar --deploy-archive

Returns the command result in XML format.

HTTP PUT request of following form:
URL: /ws/r/admin/GeneroDeploymentService/deploy?archive=name
Note: archive=name is mandatory to identify the archive on the GAS.

To send the archive to the Genero Application Server, you can use curl with a -H parameter to provide the access token, and a PUT instruction:

curl -H "Authorization:Bearer ACCESS_TOKEN" PUT -T test.gar 
http://app_server:port/connector
/ws/r/admin/GeneroDeploymentService/
deploy?archive=name
where:
  • The ACCESS_TOKEN is provided by the GIP as authorization to use the deployment service.
    Tip: The access token is obtained via the GIP GetToken tool. For examples, using this tool see Automatize application deployment via scripts.
  • app_server is the server name or IP address.
  • port is the port where the application server or Web server is listening.
  • connector is the Genero Application Server connector (/gas, for example).
enable Enables all applications and services of a given archive by calling:

gasadmin gar --enable-archive

HTTP GET request of following form:

URL: /ws/r/admin/GeneroDeploymentService/enable?archive=name

disable Disables all applications and services of given archive by calling:

gasadmin gar -–disable-archive

HTTP GET request of following form:

URL: /ws/r/admin/GeneroDeploymentService/disable?archive=name

undeploy Undeploys a genero archive on the Genero Application Server by calling:

gasadmin gar –-undeploy-archive

HTTP GET request of following form:

URL: /ws/r/admin/GeneroDeploymentService/undeploy?archive=name

list Returns a list and status of all archives available on the Genero Application Server by calling:

gasadmin gar --list-archive

HTTP GET request of following form:

URL: /ws/r/admin/GeneroDeploymentService/list

cleanup The cleanup operation is not available with the REST service, as it requires user interaction to its prompts. To perform a cleanup operation, you must use gasadmin on the application server, performed by the command:

gasadmin gar --clean-archives

N/A