-
Notifications
You must be signed in to change notification settings - Fork 3
/
Vagrantfile
86 lines (70 loc) · 2.77 KB
/
Vagrantfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# -*- mode: ruby -*-
# vi: set ft=ruby :
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |cluster|
# Ensure latest version of Chef is installed
cluster.omnibus.chef_version = :latest
# Utilize the Cachier plugin to cache downloaded packages
if Vagrant.has_plugin?("vagrant-cachier") && !ENV["RINAMO_USE_CACHE"].nil?
cluster.cache.scope = :box
end
# Utilize the Berkshelf plugin to resolve cookbook dependencies
cluster.berkshelf.enabled = true
cluster.vm.define "rinamo-base".to_sym do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cpus", "2"]
vb.customize ["modifyvm", :id, "--pae", "on"]
vb.customize ["modifyvm", :id, "--memory", "2048"]
vb.customize ["modifyvm", :id, "--acpi", "on"]
vb.customize ["modifyvm", :id, "--hpet", "on"]
vb.customize ["modifyvm", :id, "--hwvirtex", "on"]
end
# Network
config.vm.hostname = "rinamo-base"
config.vm.network :private_network, ip: "10.0.0.2"
# SSH agent forwarding
config.ssh.forward_agent = true
# Provision using Chef
config.vm.provision :chef_solo do |chef|
chef.roles_path = "deploy/roles"
chef.add_role "base"
chef.json = { }
end
end
cluster.vm.define "rinamo-dev".to_sym do |config|
config.vm.box = "rinamo-base"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cpus", "2"]
vb.customize ["modifyvm", :id, "--pae", "on"]
vb.customize ["modifyvm", :id, "--memory", "2048"]
vb.customize ["modifyvm", :id, "--acpi", "on"]
vb.customize ["modifyvm", :id, "--hpet", "on"]
vb.customize ["modifyvm", :id, "--hwvirtex", "on"]
end
# Network
config.vm.hostname = "rinamo"
config.vm.network :private_network, ip: "10.0.0.2"
# SSH agent forwarding
config.ssh.forward_agent = true
config.vm.provision "shell", path: "deploy/provision_rinamo.sh"
end
cluster.vm.define "keystone-dev".to_sym do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
vb.customize ["modifyvm", :id, "--cpus", "2"]
vb.customize ["modifyvm", :id, "--pae", "on"]
vb.customize ["modifyvm", :id, "--memory", "2048"]
vb.customize ["modifyvm", :id, "--acpi", "on"]
vb.customize ["modifyvm", :id, "--hpet", "on"]
vb.customize ["modifyvm", :id, "--hwvirtex", "on"]
end
# Network
config.vm.hostname = "keystone"
config.vm.network :private_network, ip: "10.0.0.3"
config.vm.network "forwarded_port", guest: 35357, host: 35357
# SSH agent forwarding
config.ssh.forward_agent = true
config.vm.provision "shell", path: "deploy/provision_keystone.sh"
end
end