my dotz
0

Configure Feed

Select the types of activity you want to include in your feed.

Add env vars, s/tabs/spaces

+22 -21
+2 -1
.shinit
··· 17 17 alias be='bundle exec' 18 18 export HISTFILE="$HOME/.mksh-history" 19 19 export CHEFUSER="jolson" 20 - export CHEF_ENV="browse_test" 20 + export CHEF_ENV="browse_test" # just for .chef/config.rb 21 + export AWS_ENV="browse_test" # just for aws cli 21 22 export SSHUSER="jolson" 22 23 export SSHKEY="~/.ssh/id_rsa" 23 24 export PASH_CLIP="pbcopy"
+20 -20
bin/MACC02VK5ECHTD7/jws-fetch
··· 2 2 3 3 date=$(date +%s) 4 4 for r in us-east-1 us-west-2; do 5 - for p in browse cgraph; do 6 - for e in test stage prod; do 7 - dir="/tmp/jws/${r}/${p}/${e}" 8 - mkdir -p "$dir" 9 - echo "Fetching ${r}/${p}/${e}" 10 - aws ec2 describe-instances --profile "${p}_${e}" --region "$r" --output text --query "Reservations[*].Instances[*].{ 11 - Instance:InstanceId, 12 - Type:InstanceType, 13 - AZ:Placement.AvailabilityZone, 14 - Name:Tags[?Key==\`Name\`]|[0].Value, 15 - pubIP:PublicIpAddress, 16 - IP:PrivateIpAddress, 17 - State:State.Name, 18 - VPC:VpcId 19 - }" | sed "s/$/ ${p}_${e}/" > "$dir/$date" & 20 - # add profile to end for easy greppin' 21 - # link current for other scripts 22 - ln -fs "$dir/$date" "$dir/current" 23 - done 24 - done 5 + for p in browse cgraph; do 6 + for e in test stage prod; do 7 + dir="/tmp/jws/${r}/${p}/${e}" 8 + mkdir -p "$dir" 9 + echo "Fetching ${r}/${p}/${e}" 10 + aws ec2 describe-instances --profile "${p}_${e}" --region "$r" --output text --query "Reservations[*].Instances[*].{ 11 + Instance:InstanceId, 12 + Type:InstanceType, 13 + AZ:Placement.AvailabilityZone, 14 + Name:Tags[?Key==\`Name\`]|[0].Value, 15 + pubIP:PublicIpAddress, 16 + IP:PrivateIpAddress, 17 + State:State.Name, 18 + VPC:VpcId 19 + }" | sed "s/$/ ${p}_${e}/" > "$dir/$date" & 20 + # add profile to end for easy greppin' 21 + # link current for other scripts 22 + ln -fs "$dir/$date" "$dir/current" 23 + done 24 + done 25 25 done 26 26 27 27 wait