blob: 11f6cbe8fa471fd11138c032ef5f68b6364148f4 [file] [log] [blame]
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# 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