Permalink
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
grouper_training/internal/createNew.txt
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
19 lines (14 sloc)
794 Bytes
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
ami: amzn2-ami-hvm-2.0.20190508-x86_64-gp2 | |
t3a-large | |
network ends in 688 | |
subnet ends in 4a6 | |
auto assign public ip | |
storage 30gig | |
security group: gte-training | |
tag env training | |
user data script from https://github.internet2.edu/docker/grouper_training/raw/202106/internal/userdata.sh | |
ssh -i gte-training-master.pem ec2-user@3.136.154.33 | |
instance i-043829afce57f6da6 | |
3.21.41.203 | |
pip install awscli --user | |
aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | select(.State.Name!="terminated") | select((.Tags[]|select(.Key=="env")|.Value) =="training")] | .[] | .InstanceId' | xargs -n 1 -I{} aws ec2 get-console-output --instance-id {} | fmt | grep student | awk -F\\ '{print $1}' | awk -F , '{print $1 "\t" $2 "\t" $3 "\t\t\tssh -L 8443:localhost:8443 -l student"$1}' |