Cantaloupe standalone server (Ubuntu 18.04, Cantaloupe 4.0.3) over KVM

* Ubuntu server 18.04 LTS (from ISO)
* 20GB virtualdisk mounted as / (root)
* 1TB virtualdisk mounted as /srv
* 2.5TB iScsi mounted as /mnt/data
* Set IPv4 (2 interfaces) and IPv6
* Java 8
apt install openjdk-8-jdk
  • download
wget https://github.com/medusa-project/cantaloupe/releases/download/v4.0.3/cantaloupe-4.0.3.zip
unzip cantaloupe-4.0.3.zip
sudo mv cantaloupe-4.0.3 /opt/

sudo useradd -d /srv/home -s /bin/false cantaloupe
sudo mkdir /srv/cache /srv/log /srv/home /srv/tmp

sudo chown -R cantaloupe:cantaloupe /opt/cantaloupe-4.0.3 /srv/cache /srv/log /srv/home /srv/tmp
  • Kakadu Native libraries (Optional)
Check Java Library Path with:
java -XshowSettings:properties

sudo cp /opt/cantaloupe-4.0.3/deps/Linux-x86-64/lib/libkdu_* /usr/lib/
  • settings
cd /opt/cantaloupe-4.0.3
sudo cp cantaloupe.properties.sample cantaloupe.properties
sudo nano -w cantaloupe.properties
  • Start as service
nano -w /etc/systemd/system/cantaloupe.service
[Unit]
Description=Cantaloupe Image Server

[Service]
Type=simple
User=cantaloupe
ExecStart=/usr/bin/java -Dcantaloupe.config=/opt/cantaloupe-4.0.3/cantaloupe.properties -Xmx12g -jar /opt/cantaloupe-4.0.3/cantaloupe-4.0.3.war
ExecStop=/usr/bin/killall -9 cantaloupe-4.0.3.war
Restart=on-failure

[Install]
WantedBy=multi-user.target
systemctl daemon-reload
systemctl enable cantaloupe.service

service cantaloupe start
  • enable delegates script
sudo nano -w cantaloupe.properties
delegate_script.enabled = true
source.delegate = true
FilesystemSource.BasicLookupStrategy.path_prefix = /mnt/
sudo nano -w delegates.rb
  def source(options = {})
       identifier = context['identifier']
       if identifier.include? "http"
               'HttpSource'
       else
               'FilesystemSource'
       end
  end

The identifier for local file in /mnt/data (i.e. test.png) must be data%2Ftest.png

  • share data with front-end

Local:

sudo chown -R IIIF_user:IIIF_user /mnt/data

On front-end:

apt install sshfs
mkdir /mnt/datac
chown -R FE_user:FE_user /mnt/datac

sudo -u FE_user sshfs -o idmap=user -o IdentityFile=/somepath/id_rsa IIIF_user@IIIF_IP:/mnt/data /mnt/datac

or

nano -w /etc/fstab

sshfs#IIIF_user@IIIF_IP:/mnt/data /mnt/datac fuse defaults,_netdev,user,idmap=user,IdentityFile=/somepath/id_rsa,allow_other,default_permissions,uid=FE_user_UID,gid=FE_user_GID 0 0
 
 
archipelago/canta_base.txt ยท Last modified: 2019/02/18 18:26 by giancarlo

Developers: CNR IRCrES IT Office and Library
Giancarlo Birello (giancarlo.birello _@_ ircres.cnr.it) and Anna Perin (anna.perin _@_ ircres.cnr.it)
DigiBess is licensed under: Creative Commons License
Recent changes RSS feed Creative Commons License Valid XHTML 1.0 Valid CSS Driven by DokuWiki
Drupal Garland Theme for Dokuwiki