As discussed earlier, we will be installing a three-peer etcd
cluster on our computer.
Let's clone the project and get it running. Follow these steps:
In your terminal or command prompt, type this:
$ mkdir cluster $ cd cluster $ git clone https://github.com/coreos/coreos-vagrant.git $ cd coreos-vagrant $ cpconfig.rb.sampleconfig.rb $ cp user-data.sample user-data
Now we need to adjust some settings. Edit
config.rb
and change the file's top part to this example:# Size of the CoreOS cluster created by Vagrant $num_instances=3 # Used to fetch a new discovery token for a cluster of size $num_instances $new_discovery_url="https://discovery.etcd.io/new?size=#{$num_instances}" # To automatically replace the discovery token on 'vagrant up', uncomment # the lines below: # if File.exists?('user-data') &&ARGV[0].eql?('up') require 'open-uri' require 'yaml' token = open($new_discovery_url).read data = YAML.load(IO.readlines...