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

Commit

Permalink
Use standalone activemq in claw_vagrant; Resolves Islandora/documenta…
Browse files Browse the repository at this point in the history
…tion#660 (#46)

* Adds a standalone ActiveMQ installation
* Updates Fedora to use external ActiveMQ
* Adds some documentation
* Cleans up some cruft I noticed
  • Loading branch information
ruebot authored and dannylamb committed Jun 13, 2017
1 parent 16b5c4f commit 20ce269
Show file tree
Hide file tree
Showing 10 changed files with 64 additions and 18 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,15 @@ The default VM login details are:
* username: ubuntu
* password: ubuntu

### ActiveMQ

The default ActiveMQ login details are:

* username: admin
* password: admin

You can access the ActiveMQ administrative interface at: http://localhost:8161/admin

### Cantaloupe

You can access the Canataloupe admin interface at: http://localhost:8080/cantaloupe/admin
Expand Down Expand Up @@ -118,6 +127,7 @@ the following header in HTTP requests:
- PHP 7.0.15
- Java 8 (Oracle)
- Cantaloupe IIIF Server v3.3
- ActiveMQ 5.14.5

## Windows Troubleshooting

Expand Down
3 changes: 2 additions & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.network :forwarded_port, guest: 8282, host: 8282 # Islandora Microservices
config.vm.network :forwarded_port, guest: 3306, host: 3306 # MySQL
config.vm.network :forwarded_port, guest: 5432, host: 5432 # PostgreSQL
#config.vm.network :forwarded_port, guest: 8383, host: 8383 # Loris
config.vm.network :forwarded_port, guest: 8161, host: 8161 # activemq
config.vm.network :forwarded_port, guest: 8983, host: 8983 # Solr
config.vm.network :forwarded_port, guest: 8081, host: 8081 # API-X
config.vm.provider "virtualbox" do |vb|
Expand All @@ -46,6 +46,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
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/activemq.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/composer.sh", :args => home_dir, :privileged =>false
config.vm.provision :shell, :path => "./scripts/drupal.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/fcrepo.sh", :args => home_dir
Expand Down
25 changes: 25 additions & 0 deletions configs/activemq.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:amq="http://activemq.apache.org/schema/core"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd
http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core.xsd">

<context:property-placeholder/>

<!--
The <broker> element is used to configure the ActiveMQ broker.
-->
<broker xmlns="http://activemq.apache.org/schema/core" brokerName="localhost">
<networkConnectors>
<networkConnector name="fedora_bridge" dynamicOnly="true" uri="static:(tcp://localhost:61616)">
<dynamicallyIncludedDestinations>
<topic physicalName="fedora"/>
<queue physicalName="fedora"/>
</dynamicallyIncludedDestinations>
</networkConnector>
</networkConnectors>
</broker>
</beans>
9 changes: 0 additions & 9 deletions configs/karaf/activemq-osgi-fix.script

This file was deleted.

1 change: 0 additions & 1 deletion configs/karaf/alpaca.script
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ config:property-set -p org.fcrepo.apix.registry.http timeout.socket.ms 1000
feature:repo-add file:/home/ubuntu/Alpaca/karaf/build/resources/main/features.xml
feature:repo-add mvn:org.fcrepo.apix/fcrepo-api-x-karaf/0.2.0/xml/features

feature:install fcrepo-service-activemq
feature:install fcrepo-service-camel

feature:install islandora-connector-broadcast
Expand Down
1 change: 1 addition & 0 deletions configs/variables
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ FITS_WS_VERSION=1.1.3
MYSQL_USER=root
MYSQL_PASS=islandora
MYSQL_CONNECTOR_VERSION=6.0.4
ACTIVEMQ_VERSION=5.14.5
19 changes: 19 additions & 0 deletions scripts/activemq.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/sh
echo "Installing ActiveMQ"

HOME_DIR=$1

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

if [ ! -f "$DOWNLOAD_DIR/apache-activemq-$ACTIVEMQ_VERSION-bin.tar.gz" ]; then
echo "Downloading ActiveMQ"
wget -q -O "$DOWNLOAD_DIR/apache-activemq-$ACTIVEMQ_VERSION-bin.tar.gz" "http://archive.apache.org/dist/activemq/5.14.5/apache-activemq-$ACTIVEMQ_VERSION-bin.tar.gz"
fi

cp "$DOWNLOAD_DIR/apache-activemq-$ACTIVEMQ_VERSION-bin.tar.gz" /tmp
tar -xzf "$DOWNLOAD_DIR/apache-activemq-$ACTIVEMQ_VERSION-bin.tar.gz" -C /opt
mv /opt/apache-activemq-$ACTIVEMQ_VERSION /opt/activemq
chown -hR ubuntu:ubuntu /opt/activemq
/opt/activemq/bin/activemq start
3 changes: 1 addition & 2 deletions scripts/blazegraph.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ if [ ! -f "$DOWNLOAD_DIR/bigdata-$BLAZEGRAPH_VERSION.war" ]; then
fi

cd /var/lib/tomcat8/webapps
cp -v "$DOWNLOAD_DIR/bigdata-$BLAZEGRAPH_VERSION.war" "/var/lib/tomcat8/webapps/bigdata.war"
cp "$DOWNLOAD_DIR/bigdata-$BLAZEGRAPH_VERSION.war" "/var/lib/tomcat8/webapps/bigdata.war"
chown tomcat8:tomcat8 /var/lib/tomcat8/webapps/bigdata.war

cd /opt
Expand All @@ -29,7 +29,6 @@ sleep 15
sed -i 's|log4j.appender.ruleLog.File=rules.log|log4j.appender.ruleLog.File=/var/log/tomcat8/rules.log|g' /var/lib/tomcat8/webapps/bigdata/WEB-INF/classes/log4j.properties
sed -i 's|com.bigdata.journal.AbstractJournal.file=blazegraph.jnl|com.bigdata.journal.AbstractJournal.file=/opt/blazegraph/blazegraph.jnl|g' /var/lib/tomcat8/webapps/bigdata/WEB-INF/RWStore.properties
service tomcat8 restart
service tomcat7 restart

cd "$HOME_DIR"/islandora/configs
echo "Creating namespace with inferencing"
Expand Down
9 changes: 6 additions & 3 deletions scripts/fcrepo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,18 @@ fi

cd /opt
mkdir -p fcrepo/configs
cp -v $HOME_DIR/islandora/configs/repository.json /opt/fcrepo/configs
cp -v $HOME_DIR/islandora/configs/claw.cnd /opt/fcrepo/configs
cp $HOME_DIR/islandora/configs/repository.json /opt/fcrepo/configs
cp $HOME_DIR/islandora/configs/claw.cnd /opt/fcrepo/configs
chown -hR tomcat8:tomcat8 /opt/fcrepo

chown tomcat8:tomcat8 /var/lib/tomcat8/fcrepo4-data

echo "CATALINA_OPTS=\"\${CATALINA_OPTS} -Dfcrepo.modeshape.configuration=file:///opt/fcrepo/configs/repository.json\"" >> /etc/default/tomcat8;

cp -v "$DOWNLOAD_DIR/fcrepo-$FEDORA_VERSION.war" /var/lib/tomcat8/webapps/fcrepo.war
cp "$DOWNLOAD_DIR/fcrepo-$FEDORA_VERSION.war" /var/lib/tomcat8/webapps/fcrepo.war
chown tomcat8:tomcat8 /var/lib/tomcat8/webapps/fcrepo.war
sed -i 's#JAVA_OPTS="-Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC"#JAVA_OPTS="-Djava.awt.headless=true -Dfile.encoding=UTF-8 -server -Xms512m -Xmx1024m -XX:NewSize=256m -XX:MaxNewSize=256m -XX:PermSize=256m -XX:MaxPermSize=256m"#g' /etc/default/tomcat8
service tomcat8 restart
sleep 60
cp "$HOME_DIR"/islandora/configs/activemq.xml /var/lib/tomcat8/webapps/fcrepo/WEB-INF/classes/config/activemq.xml
service tomcat8 restart
2 changes: 0 additions & 2 deletions scripts/post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,3 @@ service tomcat8 restart

# Clear drupal cache
$DRUSH_CMD cache-rebuild

$KARAF_CLIENT -f $KARAF_CONFIGS/activemq-osgi-fix.script

0 comments on commit 20ce269

Please sign in to comment.