5.12.1 Configure the config.sh File of PGX

To configure the config.sh file for installing PGX with MMG, follow these steps:
  1. Login to the server as a non-root user.
  2. Navigate to the <OFS_MMG>/mmg-pgx/bin directory.
  3. Configure the applicable config.sh attributes as shown in the following table:
    Sample Config.sh file
    #!/bin/sh
    export PGX_PORT=##PGX_PORT##
    export PGX_CONTEXT_PATH=##PGX_CONTEXT_PATH##
    export PGX_SSL_ENABLED=##PGX_SSL_ENABLED##
    export PGX_SSL_KEYSTORE=##PGX_SSL_KEYSTORE##
    export PGX_SSL_KS_SECRET=##MMG_SSL_KS_SECRET##
    export PGX_SSL_KS_TYPE=## PGX_SSL_KS_TYPE ##
    export PGX_SSL_KS_ALIAS=## PGX_SSL_KS_ALIAS##
    export GRAPH_SERVICE_URL=## GRAPH_SERVICE_URL##
    export GRAPH_KEYSTORE_PASSWORD=## GRAPH_KEYSTORE_PASSWORD##
    export LOG_HOME=##LOG_HOME##
    export LOG_LEVEL=##LOG_LEVEL##

    Table 5-2 config.sh file of pgx

    Parameter Description Is Mandatory Comments
    ##PGX_PORT## Port on which pgx server needs to be run. YES If not set, Port defaults to 7007.
    ##PGX_CONTEXT_PATH## Context path of pgx server YES If not set, Context path defaults to pgx.
    ##PGX_SSL_ENABLED##

    The values can be true /false.

    If true, follow the below steps if Self Signed is being used:

    • Import pgx server.cer file to MMG server java keystore
    • Import MMGserver.cer file to pgx server java keystore

    For more details, see Import Server Certificate to Java Keystore section.

    YES
    Properties if ##PGX_SSL_ENABLED## is set to true.
    ##PGX_SSL_KEYSTORE##

    Absolute path for the keystore file.

    This is applicable only if ##PGX_SSL_ENABLED## is set to true.

    NOTE:

    Run the following command to create a keystore:

    keytool -genkey -v -alias demoalias -keyalg RSA -keysize 2048 -keystore server.keystore -validity 3650 -keypass secret -storepass secret - storetype PKCS12

    YES ../conf/server.keystore. Include the file name in the path.
    ##PGX_SSL_KS_SECRET##

    Value passed in above command for keypass.

    This is applicable only if ##PGX_SSL_ENABLED## is set to true.

    YES Keystore password
    ##PGX_SSL_KS_TYPE##

    The type of the pgx keystore.

    This is applicable only if ##PGX_SSL_ENABLED## is set to true.

    YES PKCS12
    ##PGX_SSL_KS_ALIAS##

    The Alias of the pgx keystore.

    This is applicable only if ##PGX_SSL_ENABLED## is set to true.

    YES password123
    Properties for graph service
    ## GRAPH_SERVICE_URL ##

    Graph Service URL.

    The value is same as ##LOADGRAPH_BASE_URL## in the MMG.config.sh

    YES http(s)://<MMG Host>:<Graph service port>/graph-service
    ## GRAPH_KEYSTORE_PASSWORD ##

    Graph Keystore password.

    The value is same as ##GRAPH_KEYSTORE_PASSWORD## in the MMG.config.sh

    YES password123
    Properties for setting log path
    ##LOG_HOME## A writable folder that stores pgx logs. /scratch/users/logs
    ##LOG_LEVEL## The values can be DEBUG/INFO/WARN