Skip to content

Instantly share code, notes, and snippets.

@alexhanna
Created November 9, 2020 01:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexhanna/0ac8ca3f9ab801ea08b86ac4db63e1b3 to your computer and use it in GitHub Desktop.
Save alexhanna/0ac8ca3f9ab801ea08b86ac4db63e1b3 to your computer and use it in GitHub Desktop.
Code to get CLIFF working on a GCP instance after installing Tomcat8 using GCP Deployment Manager
#!/bin/sh
## This is copy-pasta from the original Medialab script with some mods
## https://raw.githubusercontent.com/mediacloud/cliff-docker/master/launch.sh
echo "Getting CLIFF..."
echo " downloading Cliff WAR file from GitHub"
wget https://github.com/mitmedialab/CLIFF/releases/download/v2.6.1/cliff-2.6.1.war
sudo mv cliff-2.6.1.war /var/lib/tomcat8/webapps/
echo " done (copied /var/lib/tomcat8/webapps/)"
echo "Downloading pre-built IndexDirectory and putting in /etc/cliff2/"
cd; wget https://github.com/mediacloud/mediacloud-clavin-build-geonames-index/releases/download/2019-09-06/IndexDirectory.tar.gz
tar xfz IndexDirectory.tar.gz
sudo mkdir /etc/cliff2
sudo mv IndexDirectory /etc/cliff2/IndexDirectory
export INDEX_PATH="/etc/cliff2/IndexDirectory"
echo " set INDEX_PATH to /etc/cliff2/IndexDirectory"
echo "Restart Tomcat..."
sudo systemctl restart tomcat8.service
echo " done - you should try hitting a URL now to see if it works!"
echo " try:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment