UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Commit edf6de44 authored by kevin.wilder's avatar kevin.wilder Committed by Micah Nagel
Browse files

K3d script tweaks

parent 1c42effa
No related branches found
No related tags found
1 merge request!948K3d script tweaks
...@@ -62,7 +62,7 @@ k3d-dev.sh -b -p -m -d -h ...@@ -62,7 +62,7 @@ k3d-dev.sh -b -p -m -d -h
``` ```
2. If you get a failure from the script study and correct the error. Then run script with "-d" option to clean up resources. Then re-run your original command. 2. If you get a failure from the script study and correct the error. Then run script with "-d" option to clean up resources. Then re-run your original command.
3. On a Mac you might experience some pop-up widnows. If that happens just quit the windows by typing the letter 'q'. The script should continue successfully. 3. Occasionally a ssh command will fail because of connection problems. If this happens the script will fail with "unexpected EOF". Simply try again. Run the script with ```-d``` to clean up resources. Then re-run your original command.
...@@ -257,8 +257,11 @@ PublicIP=`aws ec2 describe-instances --output json --no-cli-pager --instance-ids ...@@ -257,8 +257,11 @@ PublicIP=`aws ec2 describe-instances --output json --no-cli-pager --instance-ids
# Get the private IP address of our instance # Get the private IP address of our instance
PrivateIP=`aws ec2 describe-instances --output json --no-cli-pager --instance-ids ${InstId} | jq -r '.Reservations[0].Instances[0].PrivateIpAddress'` PrivateIP=`aws ec2 describe-instances --output json --no-cli-pager --instance-ids ${InstId} | jq -r '.Reservations[0].Instances[0].PrivateIpAddress'`
echo Instance private IP is ${PrivateIP} echo
echo Instance at ${PublicIP} is ready. echo "Instance ${InstId} is ready!"
echo "Instance private IP is ${PrivateIP}"
echo "Instance public IP is ${PublicIP}"
echo
# Remove previous keys related to this IP from your SSH known hosts so you don't end up with a conflict # Remove previous keys related to this IP from your SSH known hosts so you don't end up with a conflict
ssh-keygen -f "${HOME}/.ssh/known_hosts" -R "${PublicIP}" ssh-keygen -f "${HOME}/.ssh/known_hosts" -R "${PublicIP}"
...@@ -417,7 +420,8 @@ if [[ "$METAL_LB" == true ]]; then ...@@ -417,7 +420,8 @@ if [[ "$METAL_LB" == true ]]; then
ENDSSH ENDSSH
fi fi
echo
echo "====================== DEPLOYMENT FINISHED ====================================="
# ending instructions # ending instructions
echo echo
echo "ssh to instance:" echo "ssh to instance:"
...@@ -428,14 +432,10 @@ if [[ "$METAL_LB" == true ]] ...@@ -428,14 +432,10 @@ if [[ "$METAL_LB" == true ]]
then then
echo "Start sshuttle:" echo "Start sshuttle:"
echo "sshuttle --dns -vr ubuntu@${PublicIP} 172.31.0.0/16 --ssh-cmd 'ssh -i ~/.ssh/${KeyName}.pem -D 127.0.0.1:12345'" echo "sshuttle --dns -vr ubuntu@${PublicIP} 172.31.0.0/16 --ssh-cmd 'ssh -i ~/.ssh/${KeyName}.pem -D 127.0.0.1:12345'"
echo "You must use Firefox browser with with manual SOCKsv5 proxy configuration to localhost with port 12345"
echo
elif [[ "$PRIVATE_IP" == true ]] elif [[ "$PRIVATE_IP" == true ]]
then then
echo "Start sshuttle:" echo "Start sshuttle:"
echo "sshuttle --dns -vr ubuntu@${PublicIP} 172.31.0.0/16 --ssh-cmd 'ssh -i ~/.ssh/${KeyName}.pem'" echo "sshuttle --dns -vr ubuntu@${PublicIP} 172.31.0.0/16 --ssh-cmd 'ssh -i ~/.ssh/${KeyName}.pem'"
echo
fi fi
echo echo
...@@ -448,8 +448,16 @@ then ...@@ -448,8 +448,16 @@ then
echo "To access apps from a browser edit your /etc/hosts to add the private IP of your instance with application hostnames. Example:" echo "To access apps from a browser edit your /etc/hosts to add the private IP of your instance with application hostnames. Example:"
echo "${PrivateIP} gitlab.bigbang.dev logging.bigbang.dev kibana.bigbang.dev" echo "${PrivateIP} gitlab.bigbang.dev logging.bigbang.dev kibana.bigbang.dev"
echo echo
elif [[ "$METAL_LB" == true ]]
then
echo "Do not edit /etc/hosts on your local workstation."
echo "To access apps from a browser edit /etc/hosts on the EC2 instance. Sample /etc/host entries have already been added there."
echo "The IPs to use come from the istio-system services of type LOADBALANCER EXTERNAL-IP that are created when Istio is deployed."
echo "You must use Firefox browser with with manual SOCKs v5 proxy configuration to localhost with port 12345"
echo
else #default is to use the public ip else #default is to use the public ip
echo "To access apps from a browser edit your /etc/hosts to add the public IP of your instance with application hostnames. Example:" echo "To access apps from a browser edit your /etc/hosts to add the public IP of your instance with application hostnames."
echo "Example:"
echo "${PublicIP} gitlab.bigbang.dev logging.bigbang.dev kibana.bigbang.dev" echo "${PublicIP} gitlab.bigbang.dev logging.bigbang.dev kibana.bigbang.dev"
echo echo
fi fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment