Building TIBCO Foresight REST API Component’s Docker Images
To run the Foresight REST API components on the Docker or Kubernetes platform, you must first build the Docker images for the components and applications.
- From TIBCO eDelivery, download the
TIB_fs-restapi-1.2.0.tar.gzinstallation package. - Extract the contents of the package to a local directory.
- For initial setup and additional technical details, see the README file located in the
fs-restapi-1.2.0 > scriptsdirectory.
- Procedure
- Navigate to the
<folder>/fsrest-1.2.0/images/configdirectory. - Open the
configuration.propertiesfile and configure the properties listed in the following table.Property Description docker_repository=<docker_registry_ip>:<docker_registry_port><docker_registry_ip>is the IP address and<docker_registry_port>is the port of the machine to which you want to push the Docker imagesdocker_usernameSpecify the username required to log in to Docker - Save and close the
configuration.propertiesfile. -
Build the Foresight REST API Foresight Instream/Foresight Translator engine as described in the previous section.
- Navigate to the <folder>/fsrest-1.2.0/images/scripts directory.
-
Run the following command:
./build-images.shIf you are running the script for the first time, the following message is displayed:
You must accept the License agreement before proceeding. Press ENTER key to read the License. Press q to finish reading.
- Press the
Enter key to read the license agreement. Press
qto finish the reading. - Enter 'y' to accept the license agreement.
-
You are now prompted to confirm the Foresight REST API engine component paths. Foresight REST API Docker image is built with the following Foresight Validation/Translation engine:
FSRest Engine Build Mon Dec 11 05:49:17 EST 2023 ======================================================================= Instream component: '/home/tibco/FSRest/TIBCO/Instream920/instream/9.2' (Healthcare Version) Translator component: '/home/tibco/FSRest/TIBCO/Translator4.1/translator/4.1' Created by user: tibco pts/1 2023-12-11 01:18 (xx.xx.xxx.175) Proceed with this Engine? (y/n)
Check the details. Enter 'y', if you want to proceed with this engine and 'n' if you do not want to proceed with this engine.
-
After confirming the engine paths, you are prompted to clean up the path
images/services/fsrest/misc/FSRestDirs/guidelines/where the user might have uploaded customized guidelines and map files and copy the guidelines and maps from the Foresight REST API engine.Do you want to clean up the from the guidelines under the FSRest image's guidelines resource directory? Please answer (y)es or (n)o. Do you want to copy the guidelines from FSRest Engine? Please answer (y)es or (n)o. Do you want to clean up the map files under the FSRest image's maps resource directory? Please answer (y)es or (n)o. Do you want to copy the map files from FSRest Engine? Please answer (y)es or (n)o.
Note: This step copy the guidelines and map files present in the Database directory of Foresight REST API engine to the container. However, coping these guidelines and map files from container to mount_path is not supported in this release. -
After clean-up and copying the guidelines, you are prompted to enable SSL.
By enabling SSL, the user can call Foresight REST API through HTTPS to encrypt communication so that attackers cannot steal data.
Do you want to enable ssl? Please answer (y)es or (n)o.
Note: Do not select (y)es unless you intend to update the default deploy script.If you enter (n)o, you are directly prompted to the next step. However, if you enter (y)es, you are prompted to enter the following details related to the SSL, before you move to the next step.
Properties Description keystoreFileThis is the path where the certificate is stored in your local machine.
< Path to the file > / <keystore-filename>
keystoreTypeKeystore type
PKSCS12 or JKS
keystorePassKeystore 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.Note: This release of Foresight REST API only supports server-side SSL authentication. -
After enableSSL confirmation, you are prompted to configure the API key. An API Key security is a code used to authenticate an application.
Do you want to secure with API key? Please answer (y)es or (n)o
If you enter (n)o, you are directly prompted to the next step. However, if you enter (y)es, you are prompted to enter the following details related to the key, before you move to the next step.
Note: Enabling this requires the application to use a valid API key to communicate with Foresight REST API. Do not select (y)es unless BCCE supports this.Property Description jdbc.platformMYSQL or Oracle
If you are using an Oracle database, add its connector lib path to the
database.driver.pathjdbc.driverDatabase driver URL jdbc.urlDatabase connection URL jdbc.usernameDatabase username jdbc.passwordDatabase password jdbc.databasenameDatabase name for MYSQL database APIKeyExpireTimeExpire time (in seconds) for API key -
In the next step, you are prompted to enter the docker password for the details entered in the
configuration.propertiesfile. Enter the password.Note: This step is optional and the prompt comes only when you have provided thedocker_repository.############################################################################## Login to xx.xx.x.xxx:5000 ############################################################################## Password:
-
Once you log in, you are prompted to push the docker images to the Docker repository.
Login Succeeded Do you want to push the TIBCO Foresight REST API docker image to 10.65.6.152:5000? If not, the TIBCO Foresight REST API docker image will still be built at 'local'. (y/n)
Enter 'y' or 'n' as per the following requirements:
-
If you enter 'y', the Foresight REST API docker image is built and pushed to the Docker repository.
-
If you enter 'n', the Foresight REST API docker image is built locally.
-