Building TIBCO Foresight REST API Docker Images
Perform the following steps to build Foresight REST API components docker images:
- Procedure
- If you have not already done so, download the
TIB_fs-restapi_1.2.0.tar.gzfile from the TIBCO eDelivery site, and extract the file contents to a folder.To download the installation package, you require a username and password. In case you do not have a username, contact TIBCO Technical Support.
- Build the Foresight REST API Foresight Instream/Foresight Translator Engine as described in the previous section.
- Navigate to
<folder>/fsrest-1.2.0/images/configfolder. - 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 speciDockern <docker_registry_ip>.
Note: If this parameter is not needed, remove the preceding colon (:).docker_username= Optional.
Specify the username of the Docker login.
- Save and close the
configuration.propertiesfile. - Navigate to <folder>/fsrest-1.2.0/images/scripts folder.
- Run the following command:
./build-images.sh
If 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 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.
-
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.
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
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: An API key security is a code used to authenticate an application.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 or Oracle database APIKeyExpireTimeExpire time (in seconds) for API key -
After the configuration of the API key, you are prompted to configure a mount path.
Do you want to mount the FSREST resource directory outside of the container? Please input the path or (n)o.
You need to input the host mount path, then the content under
images/services/fsrest/misc/FSRestDirsgets copied to the mount path before the FSREST image is running, if there is no mount path, then you can input n or N. -
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 <machine-id>: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.
-