Skip to content

Commit

Permalink
Fix packer build versions
Browse files Browse the repository at this point in the history
  • Loading branch information
tayzlor committed May 5, 2015
1 parent f1a8e67 commit c10d741
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 10 deletions.
6 changes: 3 additions & 3 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'],
}
Expand All @@ -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'],
}
Expand Down
11 changes: 11 additions & 0 deletions docs/getting-started-guides/vagrant.md
Original file line number Diff line number Diff line change
Expand Up @@ -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...)
2 changes: 1 addition & 1 deletion packer/ubuntu-14.04_amd64-amis.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packer/ubuntu-14.04_amd64-droplet.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packer/ubuntu-14.04_amd64.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
13 changes: 9 additions & 4 deletions vagrant.yml
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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"

0 comments on commit c10d741

Please sign in to comment.