Cherre uses looker as part of its services.
For this reason, Looker came up with an awkward solution.
An API to give you the URL which will give you URL to the binary.
In this case, you can copy the script below and save it as some file, for example upgrade.sh
#!/bin/bash
set -euo pipefail
# this script will download looker
# you might want to move the following variables outside the script
[email protected]
LICENSE=123456789_YOUR_LOOKER_LICENSE_1234567989
echo "INFO: 'sudo su - looker' must be run before this script"
cd /home/looker/looker
#call API in order to obtain the URL and MD5
CURL_RESPONSE=$(curl --silent -X POST -H 'Content-Type: application/json' -d '{"lic": "B5E5D289DBC2EA58C530", "email": "
[email protected]", "latest":"latest"}' https:$
URL_TO_DOWNLOAD=$(echo $CURL_RESPONSE| jq -r '.url')
MD5SUM_EXPECTED=$(echo $CURL_RESPONSE| jq -r '.md5')
curl -o looker-latest.jar $URL_TO_DOWNLOAD
#validate file
echo "$MD5SUM_EXPECTED looker-latest.jar" |md5sum -c -
#should return 'looker-latest.jar: OK'
#show downloaded version
LOOKER_PREUPGRADE_VERSION=$(java -jar looker.jar version)
echo "looker version before upgrade $LOOKER_PREUPGRADE_VERSION"
LOOKER_NEW_VERSION=$(java -jar looker-latest.jar version)
echo "looker version after upgrade will be $LOOKER_NEW_VERSION"
echo "looker will now be stopped"
/home/looker/looker stop
echo "looker files will now be swapped"
mv -v looker.jar looker-$LOOKER_PREUPGRADE_VERSION.jar
mv -v looker-latest.jar looker.jar
echo "looker will now be started"
/home/looker/looker start
-Ben