From 0c6e9a13311bc9c4d7e881367b5bfef0a619e08e Mon Sep 17 00:00:00 2001 From: Jared Whiklo Date: Thu, 24 Sep 2015 14:55:20 -0500 Subject: [PATCH] Include default username/password for triplestore and Solr indexing. - Remove fcrepo-audit feature from karaf script (tmp fix) Related to: https://jira.duraspace.org/browse/FCREPO-1735 --- install_scripts/fedora_camel_toolbox.script | 1 - install_scripts/fedora_camel_toolbox.sh | 35 ++++++++++++++++++++- install_scripts/karaf.sh | 2 +- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/install_scripts/fedora_camel_toolbox.script b/install_scripts/fedora_camel_toolbox.script index 5c60b8a..bc70150 100644 --- a/install_scripts/fedora_camel_toolbox.script +++ b/install_scripts/fedora_camel_toolbox.script @@ -1,6 +1,5 @@ feature:repo-add mvn:org.fcrepo.camel/fcrepo-camel-toolbox/LATEST/xml/features feature:install fcrepo-indexing-solr feature:install fcrepo-indexing-triplestore -feature:install fcrepo-audit-triplestore feature:install fcrepo-reindexing feature:install fcrepo-fixity diff --git a/install_scripts/fedora_camel_toolbox.sh b/install_scripts/fedora_camel_toolbox.sh index 87985f8..9ae9b6f 100644 --- a/install_scripts/fedora_camel_toolbox.sh +++ b/install_scripts/fedora_camel_toolbox.sh @@ -12,6 +12,39 @@ fi cd $HOME_DIR -/opt/karaf/bin/client < "$SHARED_DIR/install_scripts/fedora_camel_toolbox.script" +/opt/karaf/bin/client -u karaf -h localhost -a 8101 -f "$SHARED_DIR/install_scripts/fedora_camel_toolbox.script" +# Solr indexing +if [ ! -f "/opt/karaf/etc/org.fcrepo.camel.indexing.solr.cfg" ]; then + /opt/karaf/bin/client -u karaf -h localhost -a 8101 "feature:install fcrepo-indexing-solr" +fi sed -i 's|solr.baseUrl=localhost:8983/solr/collection1|solr.baseUrl=localhost:8080/solr/collection1|' /opt/karaf/etc/org.fcrepo.camel.indexing.solr.cfg +sed -i 's|fcrepo.authUsername=$|fcrepo.authUsername=fedoraAdmin|' /opt/karaf/etc/org.fcrepo.camel.indexing.solr.cfg +sed -i 's|fcrepo.authPassword=$|fcrepo.authPassword=secret3|' /opt/karaf/etc/org.fcrepo.camel.indexing.solr.cfg + +# Triplestore indexing +if [ ! -f "/opt/karaf/etc/org.fcrepo.camel.indexing.triplestore.cfg" ]; then + /opt/karaf/bin/client -u karaf -h localhost -a 8101 "feature:install fcrepo-indexing-triplestore" +fi +sed -i 's|fcrepo.authUsername=$|fcrepo.authUsername=fedoraAdmin|' /opt/karaf/etc/org.fcrepo.camel.indexing.triplestore.cfg +sed -i 's|fcrepo.authPassword=$|fcrepo.authPassword=secret3|' /opt/karaf/etc/org.fcrepo.camel.indexing.triplestore.cfg + +# Audit service +if [ ! -f "/opt/karaf/etc/org.fcrepo.camel.audit.cfg" ]; then + /opt/karaf/bin/client -u karaf -h localhost -a 8101 "feature:install fcrepo-audit-triplestore" +fi + +# Fixity service +if [ ! -f "/opt/karaf/etc/org.fcrepo.camel.fixity.cfg" ]; then + /opt/karaf/bin/client -u karaf -h localhost -a 8101 "feature:install fcrepo-fixity" +fi +sed -i 's|fcrepo.authUsername=$|fcrepo.authUsername=fedoraAdmin|' /opt/karaf/etc/org.fcrepo.camel.fixity.cfg +sed -i 's|fcrepo.authPassword=$|fcrepo.authPassword=secret3|' /opt/karaf/etc/org.fcrepo.camel.fixity.cfg + +# Reindexing service +if [ ! -f "/opt/karaf/etc/org.fcrepo.camel.reindexing.cfg" ]; then + /opt/karaf/bin/client -u karaf -h localhost -a 8101 "feature:install fcrepo-reindexing" +fi +sed -i 's|fcrepo.authUsername=$|fcrepo.authUsername=fedoraAdmin|' /opt/karaf/etc/org.fcrepo.camel.reindexing.cfg +sed -i 's|fcrepo.authPassword=$|fcrepo.authPassword=secret3|' /opt/karaf/etc/org.fcrepo.camel.reindexing.cfg + diff --git a/install_scripts/karaf.sh b/install_scripts/karaf.sh index 92366d2..16d991d 100644 --- a/install_scripts/karaf.sh +++ b/install_scripts/karaf.sh @@ -43,7 +43,7 @@ if [ ! -L "/etc/init.d/karaf-service" ]; then # Run a setup script to add some feature repos and prepare it for running as a service /opt/karaf/bin/start sleep 60 - /opt/karaf/bin/client < $SHARED_DIR/install_scripts/karaf_service.script + /opt/karaf/bin/client -f $SHARED_DIR/install_scripts/karaf_service.script /opt/karaf/bin/stop # Add it as a Linux service