Building TIBCO Foresight REST API Docker Images
- Procedure
-
Navigate to <folder>/fsrest-1.2.0/images/config folder.
-
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.
-
Save and close the configuration.properties file.
-
Navigate to <folder>/fsrest-1.2.0/images/scripts folder.
-
Open the
build-fsrest-image-silent.propertiesfile 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.
instreamPathEnter 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'.
translatorPathEnter 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'.
dockerInstallDirEnter 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/fsengdockerInstallDir for the above path is
/usr/share/tomcat/tibco/instream/fsengcleanGuidelinesY/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.
copyGuidelinesSpecify 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.xsdfound 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= TIcleanMapsY/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.
copyMapsY/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.
enableSSLY/y or N/n
Enter Y/y if you want to enable SSL. Enter the given properties related to the SSL:
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.Enter N/n if you do not want to enable SSL.
Note: This release of Foresight REST API only supports server-side SSL authentication.dockerPushY/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.
removeOldDockerImageY/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.
secureWithAPIKeyEnter Y/y if you want to enable API Key Security. Enter the given properties related to the key:
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 Enter N/n if you do not want to enable API Key Security.
For more information, see the TIBCO Foresight® REST API User Guide.
mountDirInput the path or N/n
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.The following is the example:
# Specify the mount directory of FSREST root folder.
# When mount directory is n or N, no mount folder will be set.
#
mountDir=/fsmount
# mountDir=n - Run the following command:
./build-fsrest-image-silent.sh
-
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 thedocker_repository.############################################################################## Login to xx.xx.x.xxx:5000 ############################################################################## Password:
-
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.