blob: fdd1852ff5c3770aaab2b874d005817a65258614 [file] [log] [blame]
Ianf869bc32014-05-13 17:11:48 -07001# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
4# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
5VAGRANTFILE_API_VERSION = "2"
6
7Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
8 config.vm.provider "virtualbox" do |v|
9 v.memory =2048
10 v.cpus = 2
11 end
12 config.vm.provision "file", source: "id_rsa", destination: "/home/vagrant/.ssh/id_rsa"
13 config.vm.provision "file", source: "known_hosts", destination: "/home/vagrant/.ssh/known_hosts"
14 config.vm.provision "file", source: "hosts", destination: "/home/vagrant/hosts"
15
16 config.vm.provision "shell", inline: "mv /home/vagrant/hosts /etc/hosts"
17 config.vm.provision "shell", privileged: false, inline: "chmod 400 /home/vagrant/.ssh/id_rsa"
18 $java_inst = <<-END
19 wget -q --no-cookies --no-check-certificate \
20 --header 'Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie' \
21 'http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.rpm' \
22 -O /tmp/jdk.rpm;
23
24 sudo yum -y localinstall /tmp/jdk.rpm;
25 sudo yum -y install unzip;
26
27 END
28 config.vm.provision "shell", inline: $java_inst
29
30 config.vm.define "nc3" do |nc|
31 nc.vm.box = "chef/centos-6.5"
32 nc.vm.hostname = "nc3"
33 nc.vm.network "private_network", ip: "10.10.0.5"
34 end
35 config.vm.define "nc2" do |nc|
36 nc.vm.box = "chef/centos-6.5"
37 nc.vm.hostname = "nc2"
38 nc.vm.network "private_network", ip: "10.10.0.4"
39 end
40 config.vm.define "nc1" do |nc|
41 nc.vm.box = "chef/centos-6.5"
42 nc.vm.hostname = "nc1"
43 nc.vm.network "private_network", ip: "10.10.0.3"
44 end
45
46 config.vm.define "cc" do |cc|
47 cc.vm.box = "chef/centos-6.5"
48 cc.vm.hostname = "cc"
49 cc.vm.network "private_network", ip: "10.10.0.2"
50 end
51
52end