From c10d74112ed0c307f21c95609dbacb575792a8ad Mon Sep 17 00:00:00 2001 From: Graham Taylor Date: Tue, 5 May 2015 21:08:31 +0100 Subject: [PATCH] Fix packer build versions --- Vagrantfile | 6 +++--- docs/getting-started-guides/vagrant.md | 11 +++++++++++ packer/ubuntu-14.04_amd64-amis.json | 2 +- packer/ubuntu-14.04_amd64-droplet.json | 2 +- packer/ubuntu-14.04_amd64.json | 2 +- vagrant.yml | 13 +++++++++---- 6 files changed, 26 insertions(+), 10 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index c703e834..5156ccd2 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -35,11 +35,11 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Mesos master nodes master_n = conf['master_n'] - master_infos = (1..master_n).map do |i| + master_infos = (1..3).map do |i| node = { :zookeeper_id => i, :hostname => "master#{i}", - :ip => conf['master_ipbase'] + "#{10+i}", + :ip => conf["master#{i}_ip"], :mem => conf['master_mem'], :cpus => conf['master_cpus'], } @@ -53,7 +53,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| slave_infos = (1..slave_n).map do |i| node = { :hostname => "slave#{i}", - :ip => conf['slave_ipbase'] + "#{10+i}", + :ip => conf["slave#{i}_ip"], :mem => conf['slave_mem'], :cpus => conf['slave_cpus'], } diff --git a/docs/getting-started-guides/vagrant.md b/docs/getting-started-guides/vagrant.md index 956ee178..df9701b9 100644 --- a/docs/getting-started-guides/vagrant.md +++ b/docs/getting-started-guides/vagrant.md @@ -44,3 +44,14 @@ sh bootstrap/apollo-down.sh #### Interacting with your Apollo cluster with Vagrant You can interact with your Apollo cluster via the normal vagrant commands - ```vagrant up``` ```vagrant halt``` ```vagrant destroy``` etc... + +#### Adding more slave machines + +Edit ``vagrant.yml``` + +Change ```slave_n:``` to the desired number of slave machines. + +Add a ```slave2_ip:``` replacing 2 with the slave number. + +In the ```Vagrantfile``` update the ```ansible_groups``` to reference the new +slave hostnames added (will be in the format slave2, slave3, etc...) diff --git a/packer/ubuntu-14.04_amd64-amis.json b/packer/ubuntu-14.04_amd64-amis.json index 1e5e9e6a..075822e4 100644 --- a/packer/ubuntu-14.04_amd64-amis.json +++ b/packer/ubuntu-14.04_amd64-amis.json @@ -6,7 +6,7 @@ "marathon_version": "0.8.1-1.0.171.ubuntu1404", "consul_version": "0.5.0", "weave_version": "v0.10.0", - "version": "0.22.1" + "version": "0.22.0" }, "builders": [{ "type": "amazon-ebs", diff --git a/packer/ubuntu-14.04_amd64-droplet.json b/packer/ubuntu-14.04_amd64-droplet.json index e2fdca54..fd3a624e 100644 --- a/packer/ubuntu-14.04_amd64-droplet.json +++ b/packer/ubuntu-14.04_amd64-droplet.json @@ -7,7 +7,7 @@ "marathon_version": "0.8.1-1.0.171.ubuntu1404", "consul_version": "0.5.0", "weave_version": "v0.10.0", - "version": "0.22.1" + "version": "0.22.0" }, "builders": [{ "type": "digitalocean", diff --git a/packer/ubuntu-14.04_amd64.json b/packer/ubuntu-14.04_amd64.json index f92506aa..2c86e3b0 100644 --- a/packer/ubuntu-14.04_amd64.json +++ b/packer/ubuntu-14.04_amd64.json @@ -3,7 +3,7 @@ "ssh_name": "vagrant", "ssh_pass": "vagrant", "hostname": "ubuntu", - "version": "0.22.1", + "version": "0.22.0", "mesos_version": "0.22.0-1.0.ubuntu1404", "marathon_version": "0.8.1-1.0.171.ubuntu1404", "consul_version": "0.5.0", diff --git a/vagrant.yml b/vagrant.yml index bdc0d2f9..8c5b8480 100644 --- a/vagrant.yml +++ b/vagrant.yml @@ -1,8 +1,7 @@ -mesos_version: "0.22.1" +mesos_version: "0.22.0" # The numbers of servers ######################### -master_n: 3 # hostname will be master1,master2,… slave_n: 1 # hostname will be slave1,slave2,… # Memory and Cpus setting @@ -12,5 +11,11 @@ master_cpus: 1 slave_mem : 1024 slave_cpus : 2 -master_ipbase: "172.31.1." -slave_ipbase : "172.31.2." +# Master IPs +master1_ip: "172.31.1.11" +master2_ip: "172.31.1.12" +master3_ip: "172.31.1.13" + +# Slave IPs - must be in the same private address range as the master instances +# See http://en.wikipedia.org/wiki/Private_network#Private_IPv4_address_spaces +slave1_ip: "172.31.1.101"