Skip to content

Commit

Permalink
Merge pull request #74 from AquaQAnalytics/torqinstallscript
Browse files Browse the repository at this point in the history
adding installlatest file to the branch
  • Loading branch information
SanderRoomus authored Oct 5, 2020
2 parents 287cff1 + 044a782 commit b7118ab
Show file tree
Hide file tree
Showing 3 changed files with 95 additions and 14 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,13 @@ An example production ready market data capture system, using randomly generated

Assuming that the [free 32 bit version of kdb+](http://kx.com/software-download.php) is already set up and available from the command prompt as q, then:

1. Download a zip of the latest version of [TorQ](https://github.com/AquaQAnalytics/TorQ/archive/master.zip)
2. Download a zip of [this starter pack](https://github.com/AquaQAnalytics/TorQ-Finance-Starter-Pack/archive/master.zip)
3. Unzip TorQ
4. Unzip the starter pack over the top (this will replace some files)
5. Run the appropriate starts script: start_torq_demo.bat for Windows, start_torq_demo_mac.sh for macOS, and torq.sh with the command line argument start all for Linux.
1. Download and install kdb+ from [Kx Systems](http://kx.com)

2. Download the install script in the directory where you want the TorQ to be installed using:

`wget https://raw.githubusercontent.com/AquaQAnalytics/TorQ-Finance-Starter-Pack/master/installlatest.sh`

3. Run the appropriate starts script: start_torq_demo.bat for Windows, start_torq_demo_mac.sh for macOS, and torq.sh in the bin directory with the command line argument start all for Linux.

For more information on how to configure and get started, go to [this site](https://aquaqanalytics.github.io/TorQ-Finance-Starter-Pack/). You will need to make some modifications if you wish to send emails from the system.

Expand Down
14 changes: 5 additions & 9 deletions docs/gettingstarted.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,12 @@ Installation and Configuration

1. Download and install kdb+ from [Kx Systems](http://kx.com)

2. Download the main TorQ codebase from
[here](https://github.com/AquaQAnalytics/TorQ/archive/master.zip)
2. Download the install script in the directory where you want the TorQ to be installed using:

3. Download the TorQ Finance Starter Pack from
[here](https://github.com/AquaQAnalytics/TorQ-Finance-Starter-Pack/archive/master.zip)[

4. Unzip the TorQ package

5. Unzip the Demo Pack over the top of the main TorQ package
`wget https://raw.githubusercontent.com/AquaQAnalytics/TorQ-Finance-Starter-Pack/master/installlatest.sh`

3. bash installlatest.sh


### Configuration

Expand Down Expand Up @@ -283,4 +280,3 @@ Make It Your Own
The system is production ready. To customize it for a specific data set,
modify the schema file and replace the feed process with a feed of data
from a live system.

83 changes: 83 additions & 0 deletions installlatest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
#!/bin/bash

#example usage:
#bash installlatest.sh

get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | grep -Po '"tag_name": "\K.*?(?=")'
}

wget https://raw.githubusercontent.com/AquaQAnalytics/TorQ/master/installtorqapp.sh

torq_latest=`get_latest_release "AquaQAnalytics/TorQ"`

if [[ $torq_latest == *?.?.? ]] || [[ $torq_latest == *?.??.?? ]];
then
echo "============================================================="
echo "Latest TorQ release"
echo $torq_latest
echo "Getting the latest TorQ .tar.gz file"
echo "============================================================="


else
echo "the tag for Torq release: "
echo $torq_latest
echo "Is not in the right format, exiting script."
exit 1
fi

wget --content-disposition https://github.com/AquaQAnalytics/TorQ/archive/$torq_latest.tar.gz

echo $torq_latest

if [ "${torq_latest%%v*}" ]
then
echo "tag doesn't start with v"
else
torq_latest=${torq_latest#?}
fi

echo $torq_latest

torq_fsp_latest=`get_latest_release "AquaQAnalytics/TorQ-Finance-Starter-Pack"`

echo "============================================================="
echo "Latest TorQ-FSP release"
echo $torq_fsp_latest
echo "Getting the latest TorQ-FSP .tar.gz file"
echo "============================================================="

if [[ $torq_fsp_latest == *?.?.? ]] || [[ $torq_fsp_latest == *?.??.?? ]];
then
echo "============================================================="
echo "Latest TorQ-FSP release"
echo $torq_fsp_latest
echo "Getting the latest TorQ-FSP .tar.gz file"
echo "============================================================="


else
echo "the tag for Torq release: "
echo $torq_fsp_latest
echo "Is not in the right format, exiting script."
exit 1
fi


wget --content-disposition https://github.com/AquaQAnalytics/TorQ-Finance-Starter-Pack/archive/$torq_fsp_latest.tar.gz

echo $torq_fsp_latest

if [ "${torq_fsp_latest%%v*}" ]
then
echo "tag doesn't start with v"
else
torq_fsp_latest=${torq_fsp_latest#?}
fi

echo $torq_fsp_latest

echo "Files downloaded. Executing install script"

bash installtorqapp.sh --torq TorQ-$torq_latest.tar.gz --releasedir deploy --data datatemp --installfile TorQ-Finance-Starter-Pack-$torq_fsp_latest.tar.gz

0 comments on commit b7118ab

Please sign in to comment.