Skip to content

Instantly share code, notes, and snippets.

@binarytemple
Last active August 29, 2015 14:03
Show Gist options
  • Save binarytemple/e09cbc125416e93736dd to your computer and use it in GitHub Desktop.
Save binarytemple/e09cbc125416e93736dd to your computer and use it in GitHub Desktop.
ssh provisioning
./list_all_instances.py | cut -d, -f 6 | sed 1d |\
while read i; do ssh -n -i /Users/bryanhunt/Downloads/ee_training_day_1.pem "ubuntu@${i}" \
"sudo apt-get install nginx; sudo sed -i '/root[ ]*\//{/#/!{s_.*_root /var/cache/munin/www/;_}}' /etc/nginx/sites-available/default; sudo service nginx restart"; done
END=$(date  --date="10 minutes" +"%s"); while [ $(date +"%s") -lt $END ]; do sleep 1;  curl -d 'test2' -H "Content-Type: text/plain" http://127.0.0.1:8098/buckets/foo/keys/test$(date +"%s" )    ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment