Building TIBCO Foresight REST API Docker Image

    Procedure
  1. Navigate to <folder>/fsrest-1.2.0/images/config folder.

  2. Open the configuration.properties file and configure the following properties:

    Configuration Properties
    Property Description
    docker_repository=<docker_registry_ip>: <docker_registry_port>

    Required.

    <docker_registry_ip> is the IP address of the machine in which you want to push the docker images.

    <docker_registry_port> is the optional port number of the Docker repository at the IP address specified in <docker_registry_ip>.

    Note: If this parameter is not needed, remove the preceding colon (:)

    docker_username=

    Optional.

    Specify the username of the Docker login.

  3. Save and close the configuration.properties file.

  4. Navigate to <folder>/fsrest-1.2.0/images/scripts folder.

  5. Open the build-fsrest-image-silent.properties file and edit the properties as follows:

    Properties Parameters
    Do you accept the license?

    Y/y = Accept license

    N/n = Do not accept license

    Enter Y/y or N/n.

    instreamPath

    Enter the file path where Foresight Instream is installed.

    For example: </instream path/instream version>

    If Foresight Instream is not installed, specify the path as 'none'.

    translatorPath

    Enter the file path where Foresight Translator is installed.

    For example: </translator path/translator version>

    If Foresight Translator is not installed, specify the path as 'none'.

    dockerInstallDir

    Enter the directory path where the Foresight REST API engine resides in the docker image. This entry must match the entry in the Dockerfile where the Foresight REST API is added.

    For example:

    ADD ./engine/FSRest_ITEngine.tar.gz /usr/share/tomcat/tibco/instream/fseng

    dockerInstallDir for the above path is /usr/share/tomcat/tibco/instream/fseng

    cleanGuidelines

    Y/y or N/n

    Enter Y/y if you want to clean the guidelines in the Foresight REST API image's guideline resource directory.

    Enter N/n if you do not want to clean the guidelines in the Foresight REST API image's guideline resource directory.

    copyGuidelines

    Specify if the guideline files from Foresight Instream and/or Foresight Translator are to be copied to the Foresight REST API image.

    Note: A guideline file is a file with the extension .std, .sef, or .xsd found in the Foresight Instream and/or Foresight Translator installation's database directory.

    Valid parameters:

    N = Do not copy any guideline files from the Foresight Instream or Foresight Translator installations to the Foresight REST API image.

    I = Copy guideline files from the Foresight Instream installation.

    T = Copy guideline files from the Foresight Translator installation.

    IT = Copy guideline files from both installations, first Foresight Instream and then Foresight Translator. Any guideline file in both installations have the file from Foresight Translator overwriting the one from Foresight Instream.

    TI = Copy guideline files from both installations, first Foresight Translator and then Foresight Instream. Any guideline files in both installations have the file from Foresight Instream overwriting the one from Foresight Translator.

    For example:

    copyGuidelines = TI

    Note: This step copy the guidelines present in the Database directory of Foresight REST API engine to the container. However, coping guidelines from container to mount_path is not supported in this release.
    cleanMaps

    Y/y or N/n

    Enter Y/y if you want to clean the map files in the Foresight REST API image's map resource directory.

    Enter Y/y if you do not want to clean the map files in the Foresight REST API image's map resource directory.

    copyMaps

    Y/y or N/n

    Enter Y/y if you want to copy the map files from the Foresight REST API engine.

    Enter N/n if you do not want to copy the map files from the Foresight REST API engine.

    Note: This step copy the map files present in the Database directory of Foresight REST API engine to the container. However, coping map files from container to mount_path is not supported in this release.
    enableSSL

    Y/y or N/n

    Note: Do not select Y/y unless you intend to update the default deploy script.

    Enter Y/y if you want to enable SSL. Enter the given properties related to the SSL:

    keystoreFile

    This is the path where the certificate is stored in your local machine.

    < Path to the file > / <keystore-filename>

    keystoreType

    Keystore type

    PKSCS12 or JKS

    keystorePass

    Keystore password

    Note: If you enable SSL, Foresight REST API runs on https with port 8443. While running the docker image, ensure that you map port 8443 instead of 8080.

    Enter N/n if you do not want to enable SSL.

    Note: This release of Foresight REST API only supports server-side SSL authentication.
    dockerPush

    Y/y or N/n

    Enter Y/y if you want to push the Docker image to the Docker repository.

    Enter N/n if you do not want to push the Docker image to the Docker repository.

    removeOldDockerImage

    Y/y or N/n

    Enter Y/y if you want the system to look for and remove an existing Docker image.

    Enter N/n you do not want the system to look for and remove an existing Docker image.

    secureWithAPIKey

    Enter Y/y if you want to enable API Key Security. Enter the given properties related to the key:

    jdbc.platform

    MYSQL or Oracle

    If you are using an Oracle database, add its connector lib path to the database.driver.path

    jdbc.driver Database driver URL
    jdbc.url Database connection URL
    jdbc.username Database username
    jdbc.password Database password
    jdbc.databasename Database name for MYSQL database
    APIKeyExpireTime Expire time (in seconds) for API key

    Enter N/n if you do not want to enable API Key Security.

    Note: Enabling this requires the application to use a valid API key to communicate with Foresight REST API. Do not select Y/y unless BCCE supports this.

    For more information, see TIBCO Foresight® REST API User Guide.

  6. Run the following command:
    ./build-fsrest-image-silent.sh
  7. Now you are prompted to enter the Docker password. Enter the password.

    Note: This step is optional and the prompt comes only when you have provided the docker_repository.
    ##############################################################################
    Login to xx.xx.x.xxx:5000
    ##############################################################################
    
    Password:
  8. Once you enter the password, you receive a message Login Succeeded. On successful installation, you receive this message:

    TIBCO Foresight REST API engine and docker image build is completed.