From 9684f5cc88639effb9a310a891217ce13a599485 Mon Sep 17 00:00:00 2001 From: Paul Caskey Date: Wed, 1 Nov 2017 13:48:11 -0500 Subject: [PATCH] modify config output structure --- configBuilder.sh | 67 ++++++++++++++++++++++++------------------------ 1 file changed, 33 insertions(+), 34 deletions(-) diff --git a/configBuilder.sh b/configBuilder.sh index b5a95d2..041d373 100644 --- a/configBuilder.sh +++ b/configBuilder.sh @@ -293,31 +293,30 @@ done # # Ask the installer about burned versus mountedd config # -echo "" -echo "" -echo "Would you like your Shibboleth IdP containers to utilize a " -echo "Shibboleth config which has been \"burned\" (copied) into each " -echo "container, or would you like your IdP containers to instead " -echo "mount all of their configuration from the container host's local " -echo "filesystem or would you like to use a hybrid config utilizing secrets (requires a swarm)?" -echo "" -while [ ${BURNMOUNT} == "None" ]; do - echo -n "Please select your choice (please enter either \"burn\" or \"mount\" or \"hybrid\", if you aren't sure, enter hybrid): " - read response - case $response in - Mount|mount|M|m) - BURNMOUNT=mount - ;; - Burn|burn|B|b) - BURNMOUNT=burn - ;; - Hybrid|hybrid|H|h) +#echo "" +#echo "Would you like your Shibboleth IdP containers to utilize a " +#echo "Shibboleth config which has been \"burned\" (copied) into each " +#echo "container, or would you like your IdP containers to instead " +#echo "mount all of their configuration from the container host's local " +#echo "filesystem or would you like to use a hybrid config utilizing secrets (requires a swarm)?" +#echo "" +#while [ ${BURNMOUNT} == "None" ]; do +# echo -n "Please select your choice (please enter either \"burn\" or \"mount\" or \"hybrid\", if you aren't sure, enter hybrid): " +# read response +# case $response in +# Mount|mount|M|m) +# BURNMOUNT=mount +# ;; +# Burn|burn|B|b) +# BURNMOUNT=burn +# ;; +# Hybrid|hybrid|H|h) BURNMOUNT=hybrid - ;; - *) - echo "You must choose either \"burn\" or \"mount\" or \"hybrid\"." - esac -done +# ;; +# *) +# echo "You must choose either \"burn\" or \"mount\" or \"hybrid\"." +# esac +#done #echo "Burn/Mount option choice is: $BURNMOUNT" @@ -517,16 +516,16 @@ if [ ${BURNMOUNT} == "hybrid" ]; then echo "" echo "Creating sanitized config for hybrid build..." echo "" - destPath=./ConfigNoSecrets - destPathName=ConfigNoSecrets + destPath=${PWD} + #destPathName=ConfigNoSecrets # check for rsync - command -v rsync >/dev/null 2>&1 || { echo >&2 "ERROR: rsync is required, but doesn't appear to be installed. Aborting..."; exit 1; } - rsync -a . ${destPath} --exclude ${destPathName} + #command -v rsync >/dev/null 2>&1 || { echo >&2 "ERROR: rsync is required, but doesn't appear to be installed. Aborting..."; exit 1; } + #rsync -a . ${destPath} --exclude ${destPathName} mkdir -p ${destPath}/SECRETS - rm -f ${destPath}/Dockerfile - rm -f ${destPath}/configBuilder.sh - rm -f ${destPath}/setup.log +# rm -f ${destPath}/Dockerfile +# rm -f ${destPath}/configBuilder.sh +# rm -f ${destPath}/setup.log # move secrets @@ -545,7 +544,7 @@ mv -f $destPath/config/shib-idp/conf/attribute-resolver.xml $destPath/SECRETS/at mv -f $destPath/config/shib-idp/conf/metadata-providers.xml $destPath/SECRETS/metadata-providers.xml > /dev/null echo "" -echo Your secrets were removed from the main config and stored in $destPath/SECRETS +echo "Your 'secrets' were removed from the main config and stored in the 'SECRETS' directory" echo "" fi @@ -573,7 +572,7 @@ rmdir /output-tmp #zip -d /output/${FILENAME:2} "configBuilder.sh" #zip -d /output/${FILENAME:2} "Dockerfile" #zip -d /output/${FILENAME:2} "setup.log" -echo wrote config to output location... +echo "wrote config to output location (typically PWD)"... @@ -582,7 +581,7 @@ echo wrote config to output location... ### notify user of next steps (docker build and docker run commands, based on burn/mount and chosen directory locations) ### ############################################################################################################################ echo "" -echo "Your initial configuration has been successfully setup. The entire configuration has been archived to ${PWD}/shib-idp-config_`date +%m%d%Y-%H%M%S`.zip" +echo "Your initial configuration has been successfully setup." echo "" echo "" if [ ${BURNMOUNT} == "burn" ]; then