-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathVagrantfile2hosts
More file actions
executable file
·39 lines (34 loc) · 1.33 KB
/
Vagrantfile2hosts
File metadata and controls
executable file
·39 lines (34 loc) · 1.33 KB
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
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "ubuntu-opscode"
config.vm.box_url = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_ubuntu-12.04_chef-provisionerless.box"
if Vagrant.has_plugin?('vagrant-cachier')
config.cache.enable :apt
else
printf("** Install vagrant-cachier plugin `vagrant plugin install vagrant-cachier` to speedup deploy.**\n")
end
if Vagrant.has_plugin?('vagrant-hostmanager')
config.hostmanager.enabled = true
config.hostmanager.manage_host = true
else
raise "** Install vagrant-hostmanager plugin `vagrant plugin install vagrant-hostmanager`.**\n"
end
config.vm.define "hadoopmaster" do |c|
c.vm.hostname = "hadoopmaster"
c.vm.network :private_network, ip: "192.168.50.11"
c.hostmanager.aliases = %w(hadoopmaster.local)
c.vm.provider :virtualbox do |vb|
vb.customize ['modifyvm', :id, '--memory', 512]
vb.customize ['modifyvm', :id, '--cpus', 1]
end
end
config.vm.define "hadoopslave1" do |c|
c.vm.hostname = "hadoopslave1"
c.vm.network :private_network, ip: "192.168.50.12"
c.hostmanager.aliases = %w(hadoopslave1.local)
c.vm.provider :virtualbox do |vb|
vb.customize ['modifyvm', :id, '--memory', 512]
vb.customize ['modifyvm', :id, '--cpus', 1]
end
end
end