#!/bin/bash ################################################################################ # Downloads and runs an instance of Fedora for DfR testing. # # To run on dfrtest.duracloud.org, run this script on the host via: # # sudo ./download-and-run-test-fedora.sh dfrtest.duracloud.org 18081 8006 PASS # # ..where PASS is the actual value of duracloud.password we're currently using. ################################################################################ FEDORA_VERSION=3.5 INSTALL_DIR=/opt/fcrepo if [[ ! "$4" ]]; then echo "Usage: $0 HOSTNAME HTTP_PORT SHUTDOWN_PORT FEDORAADMIN_PASSWORD" exit 1 fi set -e rm -rf $INSTALL_DIR mkdir $INSTALL_DIR cd /tmp props=install.properties echo "fedora.serverHost=$1" > $props echo "tomcat.http.port=$2" >> $props echo "tomcat.shutdown.port=$3" >> $props echo "fedora.admin.pass=$4" >> $props echo "ri.enabled=true" >> $props echo "messaging.enabled=false" >> $props echo "apia.auth.required=false" >> $props echo "database.jdbcDriverClass=org.apache.derby.jdbc.EmbeddedDriver" >> $props echo "ssl.available=false" >> $props echo "database.jdbcURL=jdbc\:derby\:/opt/fcrepo/derby/fedora3;create\=true" >> $props echo "database.password=fedoraAdmin" >> $props echo "database.username=fedoraAdmin" >> $props echo "fesl.authz.enabled=false" >> $props echo "deploy.local.services=true" >> $props echo "xacml.enabled=false" >> $props echo "database=included" >> $props echo "database.driver=included" >> $props echo "fedora.serverContext=fedora" >> $props echo "llstore.type=akubra-fs" >> $props echo "tomcat.home=/opt/fcrepo/tomcat" >> $props echo "fesl.authn.enabled=true" >> $props echo "fedora.home=/opt/fcrepo" >> $props echo "install.type=custom" >> $props echo "servlet.engine=included" >> $props filename=fcrepo-installer-$FEDORA_VERSION.jar url=http://repo1.maven.org/maven2/org/fcrepo/fcrepo-installer/$FEDORA_VERSION/$filename wget -U MyBrowser/1.0 $url java -jar fcrepo-installer-$FEDORA_VERSION.jar install.properties $INSTALL_DIR/tomcat/bin/startup.sh