blob: 11f6cbe8fa471fd11138c032ef5f68b6364148f4 [file] [log] [blame]
Ianf869bc32014-05-13 17:11:48 -07001# -*- mode: ruby -*-
2# vi: set ft=ruby :
3
Till Westmann0f6ee0a2015-10-02 17:10:19 -07004# Licensed to the Apache Software Foundation (ASF) under one
5# or more contributor license agreements. See the NOTICE file
6# distributed with this work for additional information
7# regarding copyright ownership. The ASF licenses this file
8# to you under the Apache License, Version 2.0 (the
9# "License"); you may not use this file except in compliance
10# with the License. You may obtain a copy of the License at
11#
12# http://www.apache.org/licenses/LICENSE-2.0
13#
14# Unless required by applicable law or agreed to in writing,
15# software distributed under the License is distributed on an
16# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17# KIND, either express or implied. See the License for the
18# specific language governing permissions and limitations
19# under the License.
20
Ianf869bc32014-05-13 17:11:48 -070021# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
22VAGRANTFILE_API_VERSION = "2"
23
24Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
25 config.vm.provider "virtualbox" do |v|
26 v.memory =2048
27 v.cpus = 2
28 end
29 config.vm.provision "file", source: "id_rsa", destination: "/home/vagrant/.ssh/id_rsa"
30 config.vm.provision "file", source: "known_hosts", destination: "/home/vagrant/.ssh/known_hosts"
31 config.vm.provision "file", source: "hosts", destination: "/home/vagrant/hosts"
32
33 config.vm.provision "shell", inline: "mv /home/vagrant/hosts /etc/hosts"
34 config.vm.provision "shell", privileged: false, inline: "chmod 400 /home/vagrant/.ssh/id_rsa"
35 $java_inst = <<-END
36 wget -q --no-cookies --no-check-certificate \
37 --header 'Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie' \
38 'http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.rpm' \
39 -O /tmp/jdk.rpm;
40
41 sudo yum -y localinstall /tmp/jdk.rpm;
42 sudo yum -y install unzip;
43
44 END
45 config.vm.provision "shell", inline: $java_inst
46
47 config.vm.define "nc3" do |nc|
48 nc.vm.box = "chef/centos-6.5"
49 nc.vm.hostname = "nc3"
50 nc.vm.network "private_network", ip: "10.10.0.5"
51 end
52 config.vm.define "nc2" do |nc|
53 nc.vm.box = "chef/centos-6.5"
54 nc.vm.hostname = "nc2"
55 nc.vm.network "private_network", ip: "10.10.0.4"
56 end
57 config.vm.define "nc1" do |nc|
58 nc.vm.box = "chef/centos-6.5"
59 nc.vm.hostname = "nc1"
60 nc.vm.network "private_network", ip: "10.10.0.3"
61 end
62
63 config.vm.define "cc" do |cc|
64 cc.vm.box = "chef/centos-6.5"
65 cc.vm.hostname = "cc"
66 cc.vm.network "private_network", ip: "10.10.0.2"
67 end
68
69end