Data Intellect
Historically, TorQ and its corresponding packages have had a method of installation that meant unzipping the packages and copying them on top of each other. That was an easy method, and is still fine for test or trial applications. For production applications we have tended to separate TorQ, the application that sits on top of it and the data into separate locations. To formalise this, we have created an installation script. The advantages of the installation script compared to the previous approach:
After the installation the layout on disc will be the following:
The script will create a folder for every TorQ and TorQ application versions.
Installing a newer version of TorQ a new version folder is added and the latest soft link is pointed toward the most recent TorQ folder. If rollback is necessary due to version upgrade then can repoint the latest soft link toward the most recent working version.
wget https://raw.githubusercontent.com/AquaQAnalytics/TorQ-Finance-Starter-Pack/master/installlatest.sh
bash installlatest.sh
That is the most basic installation of TorQ and one of its applications.
All the TorQ packages that have the installlatest.sh script on GitHub work with the install script.
An example with extra parameters, changing the data folder directory and configuring environment variables.
wget https://raw.githubusercontent.com/AquaQAnalytics/TorQ-Finance-Starter-Pack/master/installlatest.sh
# This does replacements in bin and TorQApp directories only
# Replace KDBBASEPORT in all .sh scripts
find $1 -type f -name "*.sh" -exec sed -i "s/export KDBBASEPORT=.*/export KDBBASEPORT=7373/g" {} \
# Replace hdb1 in all .csv files
find $1 -type f -name "*.csv" -exec sed -i "s/hdb1/hdb_pri/g" {} \;
# This does replacements in bin and TorQApp directories only
# Replace KDBBASEPORT in all .sh scripts
find $1 -type f -name "*.sh" -exec sed -i "s/export KDBBASEPORT=.*/export KDBBASEPORT=3535/g" {} \;
# Replace hdb1 in all .csv files
find $1 -type f -name "*.csv" -exec sed -i "s/hdb1/hdb_dr/g" {} \;
bash installtorqapp.sh --torq TorQ-$torq_latest.tar.gz --releasedir deploy_pri --data fsp_data_pri --installfile TorQ-Finance-Starter-Pack-$torq_fsp_latest.tar.gz --env env_pri.sh
bash installtorqapp.sh --torq TorQ-$torq_latest.tar.gz --releasedir deploy_dr --data fsp_data_dr --installfile TorQ-Finance-Starter-Pack-$torq_fsp_latest.tar.gz --env env_dr.sh
bash installlatest.sh
This will install two separate instances of TorQ and its application on the same server for different configurations:
Running the TorQ stacks can be seen in the diagram below:
The databases above are separated with the –data installation parameter. In this example, one database is stored in fsp_data_pri and the other in fsp_data_dr.
The env parameter can be extended to set all the process names for an environment and also the required variables for feeds, or any other environment specific configurations.
Instead of a .tar.gz file for TorQ, it also accepts the full path to an unpacked TorQ. This way multiple TorQ applications can use the same TorQ basecode if required. The script accepts both full path parameters and relative path parameters for all command line arguments.
Further technical documentation and updates can be found here.
The installation script is currently tested to work with the below versions, and will likely work with some earlier versions:
Share this: