Skip to content

Instantly share code, notes, and snippets.

@charlesmarshall
Created September 18, 2014 11:03
Show Gist options
  • Save charlesmarshall/6eb674bb247ef71bad10 to your computer and use it in GitHub Desktop.
Save charlesmarshall/6eb674bb247ef71bad10 to your computer and use it in GitHub Desktop.
vagrant up for coreos
#!/bin/bash
vagrant destroy -f
vagrant box update
ssh-keygen -f ~/.ssh/known_hosts -R 172.17.8.101
oldIFS="$IFS"
IFS="¬"
content="$(cat ./user-data)"
discovery="$(curl -s https://discovery.etcd.io/new)"
echo "new token: ${discovery}"
echo ${content} | sed -E "s#discovery: (.*)#discovery: ${discovery}#g" > ./user-data
IFS="$oldIFS"
vagrant up
ssh [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment