Skip to content

Commit

Permalink
Add FITS Web Service; Address #309. (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
ruebot authored and dannylamb committed Aug 9, 2016
1 parent 7673ccc commit 56c6cfb
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 7 deletions.
1 change: 1 addition & 0 deletions install/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision :shell, inline: "sudo sed -i '/tty/!s/mesg n/tty -s \\&\\& mesg n/' /root/.profile", :privileged =>false
config.vm.provision :shell, :path => "./scripts/bootstrap.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/lamp-server.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/fits.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/solr.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/composer.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/twigcextensions.sh", :args => home_dir
Expand Down
2 changes: 2 additions & 0 deletions install/configs/variables
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ SOLR_VERSION=4.10.3
SOLR_HOME="/var/lib/tomcat7/solr"
BLAZEGRAPH_VERSION=1.5.1
DRUPAL_HOME="/var/www/html/drupal"
FITS_VERSION=1.0.1
FITS_WS_VERSION=1.1.2
7 changes: 0 additions & 7 deletions install/scripts/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@ apt-get -y -qq install tomcat7 tomcat7-admin
usermod -a -G tomcat7 vagrant
sed -i '$i<user username="islandora" password="islandora" roles="manager-gui"/>' /etc/tomcat7/tomcat-users.xml

# Make the ingest directory
if [ ! -d "/mnt/ingest" ]; then
mkdir /mnt/ingest
fi

chown -R tomcat7:tomcat7 /mnt/ingest

# Wget and curl
apt-get -y -qq install wget curl

Expand Down
30 changes: 30 additions & 0 deletions install/scripts/fits.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
echo "Installing FITS Web Service and FITS"

HOME_DIR=$1

if [ -f "$HOME_DIR/islandora/install/configs/variables" ]; then
. "$HOME_DIR"/islandora/install/configs/variables
fi

if [ ! -f "$DOWNLOAD_DIR/fits-$FITS_VERSION.zip" ]; then
echo "Downloading FITS"
wget -q -O "$DOWNLOAD_DIR/fits-$FITS_VERSION.zip" "http://projects.iq.harvard.edu/files/fits/files/fits-$FITS_VERSION.zip"
fi

if [ ! -f "$DOWNLOAD_DIR/fits-$FITS_WS_VERSION.war" ]; then
echo "Downloading FITS Web Service"
wget -q -O "$DOWNLOAD_DIR/fits-$FITS_WS_VERSION.war" "http://projects.iq.harvard.edu/files/fits/files/fits-$FITS_WS_VERSION.war"
fi

unzip "$DOWNLOAD_DIR/fits-$FITS_VERSION.zip" -d /opt
mv /opt/fits-$FITS_VERSION /opt/fits
chown tomcat7:tomcat7 /opt/fits

cp "$DOWNLOAD_DIR/fits-$FITS_WS_VERSION.war" /var/lib/tomcat7/webapps/fits.war
chown tomcat7:tomcat7 /var/lib/tomcat7/webapps/fits.war

sed -i '$ifits.home=/opt/fits' /etc/tomcat7/catalina.properties
sed -i '$ishared.loader=${fits.home}/lib/*.jar' /etc/tomcat7/catalina.properties

service tomcat7 restart

0 comments on commit 56c6cfb

Please sign in to comment.