Vagrantfile
and cloud-config
to play with CoreOS on DigitalOcean.
To use this Vagrantfile
, you need some setting.
You need to set below environmental variables:
export TOKEN=""
export SSH_KEY_NAME=""
You can get TOKEN
from DigitalOcean console (you should make it with read and write autority). SSH_KEY_NAME
is your ssh-key registered in DigitalOcean.
And you need to generate new etcd
token and write it in user-data.yml
's etcd.service
:
$ curl -w "\n" https://discovery.etcd.io/new
Now (2014.11), vagrant-digitalocean plugin is still 0.7 and we can't use user-data
posting. But if you build it by yourself, you can use it.
$ git clone https://github.com/smdahlen/vagrant-digitalocean
$ gem build vagrant-digitalocean.gemspec
$ vagrant plugin install vagrant-digitalocean-0.7.0.gem
Decide how many cluste do you up:
$ export NUM_INSTANCES=3
And up it,
$ vagrant up --provider=digital_ocean