Skip to content

modify config output structure #12

Merged
merged 1 commit into from
Nov 1, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 33 additions & 34 deletions configBuilder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"


Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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)"...



Expand All @@ -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
Expand Down