Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit be41a78

Browse files
whiklojdannylamb
authored andcommitted
Issue 572 (#50)
* Install openseadragon and fix cantaloupe. * Configure cantaloupe and install openseadragon * Switch to Islandora-CLAW organization
1 parent 4662c37 commit be41a78

File tree

6 files changed

+61
-24
lines changed

6 files changed

+61
-24
lines changed

Vagrantfile

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
4949
config.vm.provision :shell, :path => "./scripts/activemq.sh", :args => home_dir
5050
config.vm.provision :shell, :path => "./scripts/composer.sh", :args => home_dir, :privileged =>false
5151
config.vm.provision :shell, :path => "./scripts/drupal.sh", :args => home_dir
52+
config.vm.provision :shell, :path => "./scripts/openseadragon.sh", :args => home_dir
5253
config.vm.provision :shell, :path => "./scripts/fcrepo.sh", :args => home_dir
5354
config.vm.provision :shell, :path => "./scripts/blazegraph.sh", :args => home_dir
5455
config.vm.provision :shell, :path => "./scripts/syn.sh", :args => home_dir

configs/cantaloupe/cantaloupe.properties

+2-2
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ FilesystemResolver.lookup_strategy = BasicLookupStrategy
126126

127127
# Server-side path that will be prefixed to the identifier in the URL.
128128
# Trailing slash is important.
129-
FilesystemResolver.BasicLookupStrategy.path_prefix = /opt/cantaloupe/images/
129+
FilesystemResolver.BasicLookupStrategy.path_prefix = /var/www/html/drupal/web/
130130

131131

132132
# Server-side path or extension that will be suffixed to the identifier in
@@ -321,7 +321,7 @@ KakaduProcessor.path_to_binaries =
321321

322322
# Optional absolute path of the directory containing the OpenJPEG binaries.
323323
# Overrides the PATH.
324-
OpenJpegProcessor.path_to_binaries = /usr/local/bin
324+
OpenJpegProcessor.path_to_binaries = /opt/openjpeg/bin
325325

326326
#----------------------------------------
327327
# PdfBoxProcessor

configs/variables

+3
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,6 @@ MYSQL_USER=root
1818
MYSQL_PASS=islandora
1919
MYSQL_CONNECTOR_VERSION=6.0.4
2020
ACTIVEMQ_VERSION=5.14.5
21+
OPENSEADRAGON_VERSION=2.2.1
22+
CANTALOUPE_VERSION=3.3.1
23+
OPENJPEG_VERSION=2.1.2

scripts/activemq.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,7 @@ cp "$DOWNLOAD_DIR/apache-activemq-$ACTIVEMQ_VERSION-bin.tar.gz" /tmp
1616
tar -xzf "$DOWNLOAD_DIR/apache-activemq-$ACTIVEMQ_VERSION-bin.tar.gz" -C /opt
1717
mv /opt/apache-activemq-$ACTIVEMQ_VERSION /opt/activemq
1818
chown -hR ubuntu:ubuntu /opt/activemq
19-
/opt/activemq/bin/activemq start
19+
20+
ln -snf /opt/activemq/bin/activemq /etc/init.d/activemq
21+
update-rc.d activemq defaults
22+
service activemq start

scripts/cantaloupe.sh

+15-21
Original file line numberDiff line numberDiff line change
@@ -7,36 +7,30 @@ if [ -f "$HOME_DIR/islandora/configs/variables" ]; then
77
. "$HOME_DIR"/islandora/configs/variables
88
fi
99

10-
if [ ! -f "$DOWNLOAD_DIR/cantaloupe.zip" ]; then
11-
echo "Downloading Cantaloupe"
12-
wget -q -O "$DOWNLOAD_DIR/cantaloupe.zip" "https://github.com/medusa-project/cantaloupe/releases/download/v3.3/Cantaloupe-3.3.zip"
10+
if [ ! -f "$DOWNLOAD_DIR/Cantaloupe-${CANTALOUPE_VERSION}.zip" ]; then
11+
echo "Downloading Cantaloupe version ${CANTALOUPE_VERSION}"
12+
wget -q -O "$DOWNLOAD_DIR/Cantaloupe-${CANTALOUPE_VERSION}.zip" "https://github.com/medusa-project/cantaloupe/releases/download/v${CANTALOUPE_VERSION}/Cantaloupe-${CANTALOUPE_VERSION}.zip"
1313
fi
1414

15-
if [ ! -f "$DOWNLOAD_DIR/openjpeg-source.tar.gz" ]; then
16-
echo "Downloading OpenJPEG"
17-
wget -q -O "$DOWNLOAD_DIR/openjpeg-source.tar.gz" "https://github.com/uclouvain/openjpeg/archive/v2.1.2.tar.gz"
15+
if [ ! -f "$DOWNLOAD_DIR/openjpeg-v${OPENJPEG_VERSION}-linux-x86_64.tar.gz" ]; then
16+
echo "Downloading OpenJPEG ${OPENJPEG_VERSION}"
17+
wget -q -O "$DOWNLOAD_DIR/openjpeg-v${OPENJPEG_VERSION}-linux-x86_64.tar.gz" "https://github.com/uclouvain/openjpeg/releases/download/v${OPENJPEG_VERSION}/openjpeg-v${OPENJPEG_VERSION}-linux-x86_64.tar.gz"
1818
fi
1919

20-
apt-get -y -qq install liblcms2-dev
21-
apt-get -y -qq install libpng-dev
22-
apt-get -y -qq install libtiff-dev
23-
apt-get -y -qq install cmake
24-
25-
tar -xvzf "$DOWNLOAD_DIR/openjpeg-source.tar.gz" -C /tmp
26-
mkdir "/tmp/openjpeg-2.1.2/build"
27-
cd "/tmp/openjpeg-2.1.2/build"
28-
cmake ..
29-
make
30-
make install
31-
ldconfig
20+
tar xf "$DOWNLOAD_DIR/openjpeg-v${OPENJPEG_VERSION}-linux-x86_64.tar.gz" -C /opt
21+
mv "/opt/openjpeg-v${OPENJPEG_VERSION}-linux-x86_64" /opt/openjpeg
3222

3323
mkdir /opt/cantaloupe
3424
mkdir /opt/cantaloupe/images
3525
mkdir /var/log/cantaloupe
36-
unzip "$DOWNLOAD_DIR/cantaloupe.zip" -d /opt/cantaloupe
26+
unzip "$DOWNLOAD_DIR/Cantaloupe-${CANTALOUPE_VERSION}.zip" -d /opt/cantaloupe
3727
cp "$HOME_DIR/islandora/configs/cantaloupe/cantaloupe.properties" "/opt/cantaloupe/cantaloupe.properties"
38-
echo 'CATALINA_OPTS="${CATALINA_OPTS} -Dcantaloupe.config=/opt/cantaloupe/cantaloupe.properties"' >> /etc/default/tomcat8
28+
echo 'CATALINA_OPTS="${CATALINA_OPTS} -Dcantaloupe.config=/opt/cantaloupe/cantaloupe.properties -Dorg.apache.tomcat.util.buf.UDecoder.ALLOW_ENCODED_SLASH=true"' >> /etc/default/tomcat8
3929
chown -R tomcat8:tomcat8 /opt/cantaloupe
4030
chown -R tomcat8:tomcat8 /var/log/cantaloupe
4131
service tomcat8 restart
42-
mv /opt/cantaloupe/Cantaloupe-3.3/Cantaloupe-3.3.war /var/lib/tomcat8/webapps/cantaloupe.war
32+
mv /opt/cantaloupe/Cantaloupe-${CANTALOUPE_VERSION}/Cantaloupe-${CANTALOUPE_VERSION}.war /var/lib/tomcat8/webapps/cantaloupe.war
33+
34+
cd $DRUPAL_HOME
35+
$DRUPAL_CMD config:override openseadragon.settings iiif_server "http://localhost:8080/cantaloupe/iiif/2"
36+

scripts/openseadragon.sh

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
echo "Installing OpenSeadragon module and libraries"
4+
5+
HOME_DIR=$1
6+
7+
if [ -f "$HOME_DIR/islandora/configs/variables" ]; then
8+
. "$HOME_DIR"/islandora/configs/variables
9+
fi
10+
11+
cd $DRUPAL_HOME
12+
composer require drupal/libraries dev-3.x
13+
14+
cd "$DRUPAL_HOME/web/modules/contrib"
15+
# Cloning openseadragon module down
16+
git clone https://github.com/Islandora-CLAW/openseadragon.git
17+
cd openseadragon
18+
$DRUSH_CMD en -y openseadragon
19+
20+
# Copy openseadragon library definition to correct location.
21+
cp openseadragon.json "$DRUPAL_HOME/web/sites/default/files/library-definitions/"
22+
23+
if [ ! -f "$DOWNLOAD_DIR/openseadragon-bin-${OPENSEADRAGON_VERSION}.tar.gz" ]; then
24+
wget -O "$DOWNLOAD_DIR/openseadragon-bin-${OPENSEADRAGON_VERSION}.tar.gz" "https://github.com/openseadragon/openseadragon/releases/download/v${OPENSEADRAGON_VERSION}/openseadragon-bin-${OPENSEADRAGON_VERSION}.tar.gz"
25+
fi
26+
27+
cd "$DRUPAL_HOME/web/sites/"
28+
if [ ! -d "all/assets/vendor" ]; then
29+
mkdir -p all/assets/vendor
30+
fi
31+
32+
cp "$DOWNLOAD_DIR/openseadragon-bin-${OPENSEADRAGON_VERSION}.tar.gz" .
33+
tar xf "$DOWNLOAD_DIR/openseadragon-bin-${OPENSEADRAGON_VERSION}.tar.gz" -C "$DRUPAL_HOME/web/sites/all/assets/vendor"
34+
cd "$DRUPAL_HOME/web/sites/all/assets/vendor"
35+
mv "openseadragon-bin-${OPENSEADRAGON_VERSION}" openseadragon
36+

0 commit comments

Comments
 (0)