@@ -55,15 +55,15 @@ SLEEPTIME=10
5555COUNTER=1
5656INSTANCE_IDS=" "
5757until [ $( wc -w <<< $INSTANCE_IDS ) -eq $DEIS_NUM_INSTANCES -a " $STACK_STATUS " = " CREATE_COMPLETE" ]; do
58- if [ $COUNTER -gt $ATTEMPTS ]; then
58+ if [ $COUNTER -gt $ATTEMPTS ]; then
5959 echo " Provisioning instances failed (timeout, $( wc -w <<< $INSTANCE_IDS ) of $DEIS_NUM_INSTANCES provisioned after 10m)"
6060 echo " Destroying stack $STACK_NAME "
6161 bailout
6262 exit 1
6363 fi
6464
6565 STACK_STATUS=$( aws --output text cloudformation describe-stacks --stack-name $STACK_NAME --query ' Stacks[].StackStatus' )
66- if [ $STACK_STATUS != " CREATE_IN_PROGRESS" -a $STACK_STATUS != " CREATE_COMPLETE" ] ; then
66+ if [ $STACK_STATUS != " CREATE_IN_PROGRESS" -a $STACK_STATUS != " CREATE_COMPLETE" ] ; then
6767 echo " error creating stack: "
6868 aws --output text cloudformation describe-stack-events \
6969 --stack-name $STACK_NAME \
@@ -127,3 +127,20 @@ echo "Using ELB $ELB_NAME at $ELB_DNS_NAME"
127127
128128echo_green " Your Deis cluster has been successfully deployed to AWS CloudFormation and is started."
129129echo_green " Please continue to follow the instructions in the documentation."
130+
131+ FIRST_INSTANCE=$( aws ec2 describe-instances \
132+ --filters Name=tag:aws:cloudformation:stack-name,Values=$STACK_NAME Name=instance-state-name,Values=running \
133+ --query ' Reservations[].Instances[].[PublicIpAddress]' \
134+ --output text | head -1)
135+ echo_green " Setting DEISCTL_TUNNEL=$FIRST_INSTANCE "
136+ export DEISCTL_TUNNEL=$FIRST_INSTANCE
137+ echo_green " Enabling proxy protocol"
138+
139+ if ! deisctl config router set proxyProtocol=1; then
140+ echo_red " #"
141+ echo_red " # Enabling proxy protocol failed, please enable proxy protocol "
142+ echo_red " # manually after finishing your deis cluster installation."
143+ echo_red " #"
144+ echo_red " # deisctl config router set proxyProtocol=1"
145+ echo_red " #"
146+ fi
0 commit comments