Jump to: navigation, search

Deploying the web application

Prerequisites

Prerequisite for all Web Services and Applications Service VMs

  • RPM (RPM Package Manager): Used for installing, updating, and removing software packages.

GWS Platform Service has the following direct dependencies that must be installed on each VM where it's planned to be installed.

  • glibc(x86-64) >= 2.17
  • libtool-ltdl(x86-64) >= 2.4.6
  • libgcc(x86-64) >= 8.5.0

Third Party Component Prerequisite

  • OpenJDK 17: Required for GWS API Service.

Installing GWS Platform Service

  1. Install Unix ODBC manager: yum install unixODBC
  2. Install MSSQL 18 or Oracle 23 ODBC driver according to corresponding driver documentation:
  3. Create DSN entry of corresponding DB driver in /etc/odbc.ini
    MSSQL:
    [MicrosoftODBC-18]
    Driver=ODBC Driver 18 for SQL Server
    Oracle:
    [OracleODBC-23]
    Driver=Oracle 23 ODBC driver
    Note: Oracle ODBC initialization script (odbc_update_ini.sh) allows to automatically create DSN in odbc.ini during installation, if it's done, step 3 should be omitted. For instance, to create DSN during installation, the script should be run with following arguments:
    ./odbc_update_ini.sh / /usr/lib/oracle/23/client64/lib "Oracle 23 ODBC driver" "OracleODBC-23" /etc/odbc.ini
  4. Download the RPM Package to the target installation server.
  5. Optional - you may skip this step and go to the next if you want to install GWS Platform Service with default user and group. To install the service with a custom user and group:
    1. Create a configuration file named gws-service-platform.conf in the directory /usr/lib/sysusers.d/
    2. In the configuration file created in the previous step, add the following lines to specify the username and groupname:
      u <username>
      g <groupname>
      For example, to create a user and group named 'genuser', the sample code will be:
      u genuser
      g genuser
      This process creates a new user and group named 'genuser' during installation and then assigns the ownership of the folder /<installation_path>/gws-service-platform to the newly created user and group.
  6. Install the GWS Platform Service. You can either run a basic installation or custom installation, their respective commands follow:
    • If you want to run the basic installation, that is, installing the service in a default location, run the following command:
      rpm -ivh gws-service-platform-<version>-1.x86_64.rpm
      Running the above command installs the service in the default location: /opt/genesys/gws-service-platform. During installation, a default user and a group named genesys are created if it doesn't already exist and the ownership of the folder /opt/genesys/gws-service-platform is assigned to the newly created default user and group.
    • If you want to install the service in a custom location, run the following command with the --prefix option as shown below:
      rpm -ivh gws-service-platform-<version>-1.x86_64.rpm --prefix <custom_location>
    For example, to install the service in the path /user/share, the sample command will be:
    rpm -ivh gws-service-platform-<version>-1.x86_64.rpm --prefix /user/share

Updating configuration

You can update the existing configuration using the sample configuration file environment.yaml available in the RPM package.

To update the configuration,

  1. Navigate to the default installation path: /opt/genesys/gws-service-platform. Or, the custom path: /<installation_path>/gws-service-platform.
  2. Modify the configuration using the sample file environment.yaml and save.

Updating environment variables

If required, you can modify the default values of environment variables available in the /usr/lib/systemd/system/gws-service-platform.service file to suit your organizational needs.

To modify the environment variables,

  1. Find the environment variable in the gws-service-platform.service file using the keyword search Environment=.
  2. Copy the variable(s) you wish to modify and paste them in the file /usr/lib/systemd/system/gws-service-platform.service.d/gws-service-platform.conf.
  3. Modify the environment variable value as required. While modifying ensure that you follow the same format followed in the gws-service-platform.service file, that is,
    Environment=<Env_variable_name>=<Env_variable_value>
    Important
    It is recommended to keep your modified environment variables separately in /usr/lib/systemd/system/gws-service-platform.service.d/gws-service-platform.conf to avoid the risk of values being overwritten during upgrades or reinstallation.
    An example gws-service-platform.service file with environment variables is as follows:
    [Service]
    Environment=GWS_SERVER_PORT=8092
    Environment=GWS_ENV_CONFIG_FILE=./environment.yaml
    Environment=GWS_COMMON_LOCATION=/
    Environment=GWS_COMMON_AUTH_SECRET= (must match serverSettings.auth.secret in GWS API Application yaml)
  4. After modifying the required environment variables, run the following command to save the changes.
    systemctl daemon-reload

Note: For Platform Service-only deployments, the remainder of the installation steps are not applicable and should be skipped

Installing Web Services and Applications

Prerequisites check:

Ensure the dependent services such as Elasticsearch, PostgreSQL, Redis, and GWS Platform Service are installed and running. If the dependent services are installed on a different machine, ensure the respective hostnames are resolvable from the computer you're going to deploy the Web Services and Applications service.

  1. Download the RPM Package to the target installation server.
  2. Optional - you may skip this step and go to the next if you want to install Web Services and Applications Service with default user and group. To install the service with a custom user and group:
    1. Create a configuration file named gws-api-v2.conf in the directory /usr/lib/sysusers.d/
    2. In the configuration file created in the previous step, add the following lines to specify the username and groupname:
      u <username>
      g <groupname>
      For example, to create a user and group named 'genuser', the sample code will be:
      u genuser
      g genuser
      This process creates a new user and group named 'genuser' during installation and assigns the ownership of the folder /<installation_path>/gws-api-v2 to the newly created user and group.
  3. Install the Web Services and Applications Service. You can either run a basic installation or custom installation, their respective commands follow:
    • If you want to run the basic installation, that is, installing the service in a default location, run the following command:
      rpm -ivh gws-api-v2-<version>-1.noarch.rpm
      Running the above command installs the service in the default location: /opt/genesys/gws-api-v2. During installation, a default user and a group named genesys are created if it doesn't already exist and the ownership of the folder /opt/genesys/gws-api-v2 is assigned to the newly created default user and group.
    • If you want to install the service in a custom location, run the following command with the --prefix option as shown below:
      rpm -ivh gws-api-v2-<version>-1.noarch.rpm --prefix <custom_location>
    For example, to install the service in the path /user/share, the sample command will be:
    rpm -ivh gws-api-v2-<version>-1.noarch.rpm --prefix /user/share


Updating configuration

You can update the existing configuration using the sample configuration files available in the RPM package. Review the Web Services and Configuration files section to know about the sample configuration files.

To update the configuration,

  1. Navigate to the default installation path: /opt/genesys/gws-api-v2/config. Or, the custom path: /<installation_path>/gws-api-v2/config.
  2. Modify the configuration using the related sample file (for example, application.yaml) and save.

Updating environment variables

If required, you can modify the default values of environment variables available in the /usr/lib/systemd/system/gws-api-v2.service file to suit your organizational needs.

To modify the environment variables,

  1. Find the environment variable in the gws-api-v2.service file using the keyword search Environment=.
  2. Copy the variable(s) you wish to modify and paste them in the file /usr/lib/systemd/system/gws-api-v2.service.d/gws-api-v2.conf.
  3. Modify the environment variable value as required. While modifying ensure that you follow the same format followed in the gws-api-v2.service file, that is,
    Environment=<Env_variable_name>=<Env_variable_value>
    Important
    It is recommended to keep your modified environment variables separately in /usr/lib/systemd/system/gws-api-v2.service.d/gws-api-v2.conf to avoid the risk of values being overwritten during upgrades or reinstallation.
    An example gws-api-v2.service file with environment variables is as follows:
    [Service]
    Environment="JAVA_OPTIONS=-javaagent:opentelemetry-javaagent.jar -Dfile.encoding=UTF-8 -Djavax.net.ssl.keyStore=NONE"
    Environment="JAVA_TOOL_OPTIONS=-XX:+ExitOnOutOfMemoryError -XX:+UseG1GC -XX:+PrintFlagsFinal -Xms6g -Xmx6g"
  4. After modifying the required environment variables, run the following command to save the changes.
    systemctl daemon-reload

Next Steps

  1. Configuring Web Services
  2. Initializing Redis
  3. Initializing Postgres
  4. Starting and Testing Web Services

Installation package files

Web Services configuration and initialization files (Red Hat Enterprise Linux 8 or 9)

File/folder name Description
/usr/bin/gws-api-v2 The initialization script for the Web Services service.
/usr/lib/systemd/system/gws-api-v2.service The default configuration file for the Web Services service.
/usr/lib/systemd/system/gws-api-v2.service.d/gws-api-v2.conf The custom configuration file for the Web Services service. The settings defined in this file override the default settings.

Web Services and Applications files

File/folder name Description
/<installation_path>/gws-api-v2 The home directory of Web Services and Applications.
/<installation_path>/gws-api-v2/gws-api-v2.jar The application .jar file.

Web Services and Applications Configuration files

File/folder name Description
/<installation_path>/gws/config The folder that contains sample/templates of the Web Services and Applications configuration files. After installation, files from this folder must be modified according to the deployment environment:
  • /<installation_path>/gws-api-v2/config/application.yaml
  • /<installation_path>/gws-api-v2/config/statistics.yaml
  • /<installation_path>/gws-api-v2/config/logback.xml
  • /<installation_path>/gws-api-v2/config/feature-definitions.json

GWS Platform Service, service configuration and initialization files (Red Hat Enterprise Linux 8 or 9)

File/folder name Description
/usr/bin/gws-service-platform The initialization script for the GWS Platform Service.
/usr/lib/systemd/system/gws-service-platform.service The default service configuration file for the GWS Platform Service.
/usr/lib/systemd/system/gws-service-platform.service.d/gws-service-platform.conf The custom configuration file for the GWS Platform Service. The settings defined in this file override the default settings in /usr/lib/systemd/system/gws-service-platform.service

GWS Platform Service configuration files

File/folder name Description
/<installation_path>/gws-service-platform The home directory of the GWS Platform Service.
/<installation_path>/gws-service-platform/gws-service-platform The GWS Platform Service application file.
/<installation_path>/gws-service-platform/environment.yaml The folder that contains configuration sample/templates of the GWS Platform Service. After installation, files from this folder must be modified according to the deployment environment.
This page was last edited on August 20, 2024, at 16:54.
Comments or questions about this documentation? Contact us for support!