Skip to content

Commit

Permalink
Merge pull request #1 from ruebot/cxf
Browse files Browse the repository at this point in the history
Break these out into separate files.
  • Loading branch information
daniel-dgi committed Nov 19, 2015
2 parents ee8409d + 34e7e00 commit 3ff11a4
Show file tree
Hide file tree
Showing 22 changed files with 70 additions and 42 deletions.
4 changes: 2 additions & 2 deletions camel/component/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
<name>Islandora Camel Component</name>

<properties>
<camel.version>2.16.0</camel.version>
<camel.version.range>[2.16,3)</camel.version.range>
<camel.version>2.15.1</camel.version>
<camel.version.range>[2.15.1,3)</camel.version.range>
<commons-io.version>2.4</commons-io.version>
<compiler.plugin.version>2.5.1</compiler.plugin.version>
<java.version>1.8</java.version>
Expand Down
4 changes: 2 additions & 2 deletions camel/services/basic-image-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<camel.version>2.16.0</camel.version>
<camel.version.range>[2.16,3)</camel.version.range>
<camel.version>2.15.1</camel.version>
<camel.version.range>[2.15.1,3)</camel.version.range>
<fcrepo.camel.version>4.4.0</fcrepo.camel.version>
<cxf.version>3.1.4</cxf.version>
<slf4j.version>1.7.12</slf4j.version>
Expand Down
4 changes: 2 additions & 2 deletions camel/services/collection-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<camel.version>2.16.0</camel.version>
<camel.version.range>[2.16,3)</camel.version.range>
<camel.version>2.15.1</camel.version>
<camel.version.range>[2.15.1,3)</camel.version.range>
<fcrepo.camel.version>4.4.0</fcrepo.camel.version>
<cxf.version>3.1.4</cxf.version>
<slf4j.version>1.7.12</slf4j.version>
Expand Down
4 changes: 2 additions & 2 deletions camel/sync/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<camel.version>2.16.0</camel.version>
<camel.version.range>[2.16, 3)</camel.version.range>
<camel.version>2.15.1</camel.version>
<camel.version.range>[2.15.1,3)</camel.version.range>
<fcrepo.camel.version>4.4.0</fcrepo.camel.version>
<activemq.version>5.12.1</activemq.version>
<slf4j.version>1.7.12</slf4j.version>
Expand Down
15 changes: 11 additions & 4 deletions camel/sync/src/main/resources/OSGI-INF/blueprint/eventGateway.xml
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,17 @@
<route>
<from uri="direct:upsertNonRdfResource"/>
<transform><simple>${property.rdf}</simple></transform>
<setProperty propertyName="parentUri"><jsonpath>$[1]['http://fedora.info/definitions/v4/repository#hasParent'][0]['@id']</jsonpath></setProperty>
<to uri="direct:getParentUUID"/>
<to uri="direct:fedoraGetBinary"/>
<to uri="direct:drupalAddMediumSize"/>
<doTry>
<setProperty propertyName="parentUri"><jsonpath>$[0]['http://fedora.info/definitions/v4/repository#hasParent'][0]['@id']</jsonpath></setProperty>
<to uri="direct:getParentUUID"/>
<to uri="direct:fedoraGetBinary"/>
<to uri="direct:drupalAddMediumSize"/>
<doCatch>
<exception>java.lang.Exception</exception>
<log message="Error upserting NonRdfResource. Aborting node upsert event.\n\nException message: ${exception.message}\n\nRDF from Fedora:\n${property.rdf}" loggingLevel="WARN"/>
<stop/>
</doCatch>
</doTry>
</route>

<route>
Expand Down
5 changes: 3 additions & 2 deletions install/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,9 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision :shell, :path => "./scripts/drupal.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/fcrepo.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/blazegraph.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/fcrepo-camel-toolbox.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/islandora-commands.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/karaf.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/fcrepo-camel-toolbox.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/hawtio.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/camel.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/cxf.sh", :args => home_dir
Expand All @@ -75,6 +75,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision :shell, :path => "./scripts/config.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/islandora-component.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/sync.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/services.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/collection-service.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/basic-image-service.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/post-install.sh", :args => home_dir
end
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
feature:repo-add file:/home/vagrant/islandora/camel/services/collection-service/target/classes/features.xml
feature:install islandora-collection-service
feature:repo-add file:/home/vagrant/islandora/camel/services/basic-image-service/target/classes/features.xml
feature:install islandora-basic-image-service
logout
2 changes: 1 addition & 1 deletion install/configs/karaf/camel.script
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
feature:repo-add camel 2.16.0
feature:repo-add camel 2.15.1
logout
3 changes: 3 additions & 0 deletions install/configs/karaf/collection-service.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
feature:repo-add file:/home/vagrant/islandora/camel/services/collection-service/target/classes/features.xml
feature:install islandora-collection-service
logout
6 changes: 6 additions & 0 deletions install/configs/karaf/fcrepo-camel-toolbox.script
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
feature:repo-add mvn:org.fcrepo.camel/fcrepo-camel-toolbox/4.4.0/xml/features
feature:install fcrepo-indexing-triplestore
feature:install fcrepo-audit-triplestore
feature:install fcrepo-reindexing
feature:install fcrepo-fixity
logout
2 changes: 1 addition & 1 deletion install/configs/variables
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ KARAF_VERSION=4.0.2
KARAF_CLIENT="/opt/karaf/bin/client"
KARAF_CONFIGS="$HOME_DIR/islandora/install/configs/karaf/"
FCREPO_CAMEL_VERSION=4.4.0
CAMEL_VERSION=2.16.0
CAMEL_VERSION=2.15.1
SOLR_VERSION=4.10.3
SOLR_HOME="/var/lib/tomcat7/solr"
BLAZEGRAPH_VERSION=1.5.1
Expand Down
2 changes: 1 addition & 1 deletion install/scripts/activemq.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ if [ -f "$HOME_DIR/islandora/install/configs/variables" ]; then
. "$HOME_DIR"/islandora/install/configs/variables
fi

"$KARAF_CLIENT" < "$KARAF_CONFIGS/activemq.script"
"$KARAF_CLIENT" -u karaf -h localhost -a 8101 -f "$KARAF_CONFIGS/activemq.script"
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,7 @@ chown -R vagrant:vagrant "$HOME_DIR/.m2"

cd "$HOME_DIR"/islandora/camel/services

cd collection-service
sudo -u vagrant mvn install

cd "$HOME_DIR"/islandora/camel/services

cd basic-image-service
sudo -u vagrant mvn install

"$KARAF_CLIENT" < "$KARAF_CONFIGS/services.script"
"$KARAF_CLIENT" -u karaf -h localhost -a 8101 -f "$KARAF_CONFIGS/basic-image-service.script"
2 changes: 1 addition & 1 deletion install/scripts/camel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ if [ -f "$HOME_DIR/islandora/install/configs/variables" ]; then
. "$HOME_DIR"/islandora/install/configs/variables
fi

"$KARAF_CLIENT" < "$KARAF_CONFIGS/camel.script"
"$KARAF_CLIENT" -u karaf -h localhost -a 8101 -f "$KARAF_CONFIGS/camel.script"
17 changes: 17 additions & 0 deletions install/scripts/collection-service.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
echo "Installing Islandora Services"

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

# Chown everything over to the vagrant user just in case
chown -R vagrant:vagrant "$HOME_DIR/.m2"

cd "$HOME_DIR"/islandora/camel/services

cd collection-service
sudo -u vagrant mvn install

"$KARAF_CLIENT" -u karaf -h localhost -a 8101 -f "$KARAF_CONFIGS/collection-service.script"
3 changes: 1 addition & 2 deletions install/scripts/cxf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@ if [ -f "$HOME_DIR/islandora/install/configs/variables" ]; then
. "$HOME_DIR"/islandora/install/configs/variables
fi

"$KARAF_CLIENT" < "$KARAF_CONFIGS/cxf.script"

"$KARAF_CLIENT" -u karaf -h localhost -a 8101 -f "$KARAF_CONFIGS/cxf.script"
20 changes: 11 additions & 9 deletions install/scripts/fcrepo-camel-toolbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,23 @@ echo "Installing Fcrepo-Camel-Toolbox"

HOME_DIR=$1

cd "$HOME_DIR"

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

if [ ! -f "$DOWNLOAD_DIR/fcrepo-camel-toolbox.war" ]; then
if [ ! -f "$DOWNLOAD_DIR/fcrepo-camel-toolbox.tar.gz" ]; then
echo "Downloading fcrepo-camel-toolbox"
wget -O "$DOWNLOAD_DIR/fcrepo-camel-toolbox.war" "https://github.com/fcrepo4-labs/fcrepo-camel-toolbox/releases/download/fcrepo-camel-toolbox-$FCREPO_CAMEL_VERSION/fcrepo-camel-webapp-at-is-it-$FCREPO_CAMEL_VERSION.war"
wget -O "$DOWNLOAD_DIR/fcrepo-camel-toolbox.tar.gz" https://github.com/fcrepo4-exts/fcrepo-camel-toolbox/archive/fcrepo-camel-toolbox-"$FCREPO_CAMEL_VERSION".tar.gz
fi

cd /var/lib/tomcat7/webapps
cp -v "$DOWNLOAD_DIR/fcrepo-camel-toolbox.war" "/var/lib/tomcat7/webapps"
chown tomcat7:tomcat7 /var/lib/tomcat7/webapps/fcrepo-camel-toolbox.war
cd "$DOWNLOAD_DIR"
tar -xzvf fcrepo-camel-toolbox.tar.gz
sed -i 's#fuseki/test/update#bigdata/sparql#g' "$DOWNLOAD_DIR"/fcrepo-camel-toolbox-fcrepo-camel-toolbox-4.4.0/fcrepo-indexing-triplestore/src/main/cfg/org.fcrepo.camel.indexing.triplestore.cfg "$DOWNLOAD_DIR"/fcrepo-camel-toolbox-fcrepo-camel-toolbox-4.4.0/fcrepo-audit-triplestore/src/main/cfg/org.fcrepo.camel.audit.cfg
cd fcrepo-camel-toolbox-fcrepo-camel-toolbox-"$FCREPO_CAMEL_VERSION"
MAVEN_OPTS="-Xmx1024m" sudo -u vagrant mvn install

if [ $(grep -c '\-Dtriplestore.baseUrl=' /etc/default/tomcat7) -eq 0 ]; then
echo "JAVA_OPTS=\"\$JAVA_OPTS -Dtriplestore.baseUrl=localhost:8080/bigdata/sparql\"" >> /etc/default/tomcat7
fi
"$KARAF_CLIENT" -u karaf -h localhost -a 8101 -f "$KARAF_CONFIGS/fcrepo-camel-toolbox.script"

service tomcat7 restart
sed -i 's#fuseki/test/update#bigdata/sparql#g' /opt/karaf/etc/org.fcrepo.camel.indexing.triplestore.cfg
2 changes: 1 addition & 1 deletion install/scripts/hawtio.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ if [ -f "$HOME_DIR/islandora/install/configs/variables" ]; then
. "$HOME_DIR"/islandora/install/configs/variables
fi

"$KARAF_CLIENT" < "$KARAF_CONFIGS/hawtio.script"
"$KARAF_CLIENT" -u karaf -h localhost -a 8101 -f "$KARAF_CONFIGS/hawtio.script"
2 changes: 1 addition & 1 deletion install/scripts/islandora-component.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ chown -R vagrant:vagrant "$HOME_DIR/.m2"
cd "$HOME_DIR"/islandora/camel/component

sudo -u vagrant mvn install
"$KARAF_CLIENT" < "$KARAF_CONFIGS/component.script"
"$KARAF_CLIENT" -u karaf -h localhost -a 8101 -f "$KARAF_CONFIGS/component.script"
2 changes: 1 addition & 1 deletion install/scripts/karaf.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ln -s /opt/apache-karaf-"$KARAF_VERSION" /opt/karaf
# Run a setup script to add some feature repos and prepare it for running as a service
/opt/karaf/bin/start
sleep 60
"$KARAF_CLIENT" < "$KARAF_CONFIGS/setup.script"
"$KARAF_CLIENT" -u karaf -h localhost -a 8101 -f "$KARAF_CONFIGS/setup.script"
/opt/karaf/bin/stop

# Add it as a Linux service
Expand Down
2 changes: 1 addition & 1 deletion install/scripts/post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ service tomcat7 restart
# Cycle karaf and watch the maven bundles
service karaf-service restart
sleep 60
"$KARAF_CLIENT" < "$KARAF_CONFIGS/watch.script"
"$KARAF_CLIENT" -u karaf -h localhost -a 8101 -f "$KARAF_CONFIGS/watch.script"

# Fix ApacheSolr config
drush -r "$DRUPAL_HOME" sqlq "update apachesolr_environment set url='http://localhost:8080/solr' where url='http://localhost:8983/solr'"
Expand Down
2 changes: 1 addition & 1 deletion install/scripts/sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ chown -R vagrant:vagrant "$HOME_DIR/.m2"
cd "$HOME_DIR/islandora/camel/sync"

sudo -u vagrant mvn install
"$KARAF_CLIENT" < "$KARAF_CONFIGS/sync.script"
"$KARAF_CLIENT" -u karaf -h localhost -a 8101 -f "$KARAF_CONFIGS/sync.script"

0 comments on commit 3ff11a4

Please sign in to comment.