| # -*- mode: ruby -*- |
| # vi: set ft=ruby : |
| |
| # Vagrantfile API/syntax version. Don't touch unless you know what you're doing! |
| VAGRANTFILE_API_VERSION = "2" |
| |
| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| |
| config.vm.provider "virtualbox" do |v| |
| v.memory =2048 |
| v.cpus = 2 |
| end |
| config.vm.provision "file", source: "id_rsa", destination: "/home/vagrant/.ssh/id_rsa" |
| config.vm.provision "file", source: "known_hosts", destination: "/home/vagrant/.ssh/known_hosts" |
| config.vm.provision "file", source: "hosts", destination: "/home/vagrant/hosts" |
| |
| config.vm.provision "shell", inline: "mv /home/vagrant/hosts /etc/hosts" |
| config.vm.provision "shell", privileged: false, inline: "chmod 400 /home/vagrant/.ssh/id_rsa" |
| $java_inst = <<-END |
| wget -q --no-cookies --no-check-certificate \ |
| --header 'Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie' \ |
| 'http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.rpm' \ |
| -O /tmp/jdk.rpm; |
| |
| sudo yum -y localinstall /tmp/jdk.rpm; |
| sudo yum -y install unzip; |
| |
| END |
| config.vm.provision "shell", inline: $java_inst |
| |
| config.vm.define "nc3" do |nc| |
| nc.vm.box = "chef/centos-6.5" |
| nc.vm.hostname = "nc3" |
| nc.vm.network "private_network", ip: "10.10.0.5" |
| end |
| config.vm.define "nc2" do |nc| |
| nc.vm.box = "chef/centos-6.5" |
| nc.vm.hostname = "nc2" |
| nc.vm.network "private_network", ip: "10.10.0.4" |
| end |
| config.vm.define "nc1" do |nc| |
| nc.vm.box = "chef/centos-6.5" |
| nc.vm.hostname = "nc1" |
| nc.vm.network "private_network", ip: "10.10.0.3" |
| end |
| |
| config.vm.define "cc" do |cc| |
| cc.vm.box = "chef/centos-6.5" |
| cc.vm.hostname = "cc" |
| cc.vm.network "private_network", ip: "10.10.0.2" |
| end |
| |
| end |