Skip to content
Permalink
Browse files

modify config output structure

  • Loading branch information
pcaskey committed Nov 1, 2017
1 parent e3b7c44 commit 9684f5cc88639effb9a310a891217ce13a599485
Showing with 33 additions and 34 deletions.
  1. +33 −34 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

0 comments on commit 9684f5c

Please sign in to comment.
You can’t perform that action at this time.