Created
December 30, 2015 18:19
-
-
Save bitoiu/46558a722f68c9f9b7fa to your computer and use it in GitHub Desktop.
Bash GitHub Enterprise setup
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Configuring GitHub Enterprise" | |
ghehost=`terraform output ghehost` | |
ghepass=`terraform output ghehost-admin-password` | |
gheport=8443 | |
echo "Checking for GitHub Enterprise availability..." | |
for i in `seq 1 100`; | |
do | |
statuscode=`curl -sk -o /dev/null -I -m 5 -w "%{http_code}\n" https://$ghehost:$gheport/setup/start || true` | |
if [ $statuscode = "200" ] | |
then | |
echo "Success on attempt $i connecting to https://$ghehost:$gheport/setup/api/start" | |
sleep 10 | |
break | |
else | |
echo "Attempt $i connecting to https://$ghehost:$gheport/setup/api/start failed" | |
fi | |
done | |
curl -kv -L -X POST "https://$ghehost:$gheport/setup/api/start" -F license=@etc/github-enterprise.ghl -F "password=$ghepass" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment