|
1 | 1 | # -*- mode: ruby -*-
|
2 |
| -# vi: set ft=ruby : |
| 2 | +# vi: set ft=ruby et sw=2 : |
3 | 3 |
|
4 | 4 | Vagrant.configure(2) do |config|
|
5 |
| - config.vm.box = "http://files.vagrantup.com/precise64.box" |
6 |
| - |
7 |
| - config.vm.network "private_network", ip: "192.168.112.10" |
8 | 5 |
|
9 | 6 | config.vm.synced_folder ".", "/phongo"
|
10 | 7 |
|
11 | 8 | config.vm.provider "vmware_workstation" do |vmware, override|
|
12 | 9 | vmware.vmx["memsize"] = "8192"
|
13 | 10 | vmware.vmx["numvcpus"] = "2"
|
14 |
| - |
15 |
| - override.vm.box_url = 'http://files.vagrantup.com/precise64_vmware.box' |
16 |
| - override.vm.provision "shell", inline: <<-SHELL |
17 |
| -# Ensure that VMWare Tools recompiles kernel modules |
18 |
| -# when we update the linux images |
19 |
| -sed -i.bak 's/answer AUTO_KMODS_ENABLED_ANSWER no/answer AUTO_KMODS_ENABLED_ANSWER yes/g' /etc/vmware-tools/locations |
20 |
| -sed -i.bak 's/answer AUTO_KMODS_ENABLED no/answer AUTO_KMODS_ENABLED yes/g' /etc/vmware-tools/locations |
21 |
| -SHELL |
22 |
| - |
| 11 | + override.vm.provision "shell", path: "scripts/vmware/kernel.sh" |
23 | 12 | end
|
24 | 13 |
|
| 14 | + config.vm.define "default", primary: true do |mo| |
| 15 | + mo.vm.network "private_network", ip: "192.168.112.10" |
25 | 16 |
|
26 |
| - config.vm.provision "shell", inline: <<-SHELL |
27 |
| -# Enable MongoDB Enterprise repo |
28 |
| -sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10 |
29 |
| -echo 'deb http://repo.mongodb.com/apt/ubuntu precise/mongodb-enterprise/stable multiverse' | sudo tee /etc/apt/sources.list.d/mongodb-enterprise.list |
30 |
| -sudo apt-get update |
| 17 | + mo.vm.box = "http://files.vagrantup.com/precise64.box" |
| 18 | + mo.vm.provider "vmware_workstation" do |vmware, override| |
| 19 | + override.vm.box_url = 'http://files.vagrantup.com/precise64_vmware.box' |
| 20 | + end |
31 | 21 |
|
32 |
| -# Tools you can't live without |
33 |
| -sudo apt-get install -y build-essential git vim |
34 |
| -
|
35 |
| -# I can't stand emacs |
36 |
| -echo 'set -o vi' | sudo tee /etc/profile.d/vishell.sh |
37 |
| -
|
38 |
| -# Python stuff for mongo-orchestration |
39 |
| -sudo apt-get install -y python python-dev python-pip |
| 22 | + mo.vm.provision "shell", path: "scripts/ubuntu/essentials.sh" |
| 23 | + mo.vm.provision "shell", path: "scripts/ubuntu/mongo-orchestration.sh" |
| 24 | + end |
40 | 25 |
|
41 |
| -# Latest MongoDB Enterprise |
42 |
| -sudo apt-get install -y mongodb-enterprise |
43 | 26 |
|
44 |
| -# FIXME Replace the DELETE ME with this line when PR#153 has been merged |
45 |
| -# pip install mongo-orchestration |
46 |
| -####### DELETE ME |
47 |
| -# Checkout orchestration from VCS and the latest pip doesn't support -b |
48 |
| -git clone https://github.com/10gen/mongo-orchestration.git |
49 |
| -pushd mongo-orchestration |
50 |
| -wget https://github.com/10gen/mongo-orchestration/pull/153.patch |
51 |
| -git am 153.patch |
52 |
| -sudo python setup.py install |
53 |
| -popd |
54 |
| -####### DELETE ME |
55 | 27 |
|
56 |
| -# Launch mongo-orchestration |
57 |
| -mongo-orchestration -b 192.168.112.10 start |
58 |
| -SHELL |
59 | 28 |
|
60 | 29 | end
|
61 | 30 |
|
0 commit comments