forked from apache/trafficserver
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
139 lines (124 loc) · 4.93 KB
/
Vagrantfile
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
# 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.
$network = {
# The VM host is 192.168.100.1
"raring64" => "192.168.100.11",
"quantal64" => "192.168.100.12",
"precise64" => "192.168.100.13",
"lucid64" => "192.168.100.14",
"centos63" => "192.168.100.15",
"freebsd" => "192.168.100.16",
"omnios" => "192.168.100.17",
"raring32" => "192.168.200.11",
"quantal32" => "192.168.200.12",
"precise32" => "192.168.200.13",
"lucid32" => "192.168.200.14",
"fedora18" => "192.168.200.15",
"centos59" => "192.168.200.16",
"centos64" => "192.168.200.17",
"debian7" => "192.168.200.18",
"sles11" => "192.168.200.19",
"oel63" => "192.168.200.20",
"saucy64" => "192.168.100.21",
"saucy32" => "192.168.100.22",
}
$vmspec = {
"lucid64" => [ # Ubuntu 10.04 LTS (Lucid Lynx)
"http://files.vagrantup.com/lucid64.box", "debian.pp"
],
"fedora18" => [
"http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210.box", "redhat.pp"
],
"centos63" => [
"https://dl.dropbox.com/u/7225008/Vagrant/CentOS-6.3-x86_64-minimal.box", "redhat.pp"
],
"centos59" => [
"http://puppet-vagrant-boxes.puppetlabs.com/centos-59-x64-vbox4210.box", "redhat.pp",
],
"centos64" => [
"http://puppet-vagrant-boxes.puppetlabs.com/centos-64-x64-vbox4210.box", "redhat.pp",
],
"debian7" => [
"http://puppet-vagrant-boxes.puppetlabs.com/debian-70rc1-x64-vbox4210.box", "debian.pp",
],
"sles11" => [
"http://puppet-vagrant-boxes.puppetlabs.com/sles-11sp1-x64-vbox4210.box", "redhat.pp",
],
"oel63" => [
"http://ats.boot.org/vagrant/vagrant-oel63-x64.box", "redhat.pp",
],
}
Vagrant.configure("2") do |config|
# Default all VMs to 1GB.
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", 1024]
end
# Mount the Traffic Server source code in a fixed location everywhere. Use NFS
# because it's faster and vboxfs doesn't support links.
config.vm.synced_folder ".", "/opt/src/trafficserver.git", :nfs => true
# Always forward SSH keys to VMs.
config.ssh.forward_agent = true
# Ubuntu 13.04 (Raring Ringtail)
# Ubuntu 12.10 (Quantal Quetzal)
# Ubuntu 12.04 LTS (Precise Pangolin)
["i386", "amd64"].each { |arch|
['saucy', 'raring', 'quantal', 'precise'].each { |release|
n = { "i386" => "32", "amd64" => "64" }[arch]
config.vm.define "#{release}#{n}" do | config |
config.vm.box = "#{release}#{n}"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/#{release}/current/#{release}-server-cloudimg-#{arch}-vagrant-disk1.box"
config.vm.network :private_network, ip: $network["#{release}#{n}"]
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "contrib/manifests"
puppet.manifest_file = "debian.pp"
end
end
}
}
config.vm.define :freebsd do | config |
config.vm.box = "freebsd"
config.vm.synced_folder ".", "/opt/src/trafficserver.git", :nfs => false
# Force the FreeBSD VM to use a network driver that actually works.
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--nictype1", "82543GC"]
v.customize ["modifyvm", :id, "--nictype2", "82543GC"]
end
config.vm.network :private_network, ip: $network["freebsd"]
config.vm.box_url = "https://github.com/downloads/xironix/freebsd-vagrant/freebsd_amd64_zfs.box"
end
# Current OmniOS release, see http://omnios.omniti.com/wiki.php/Installation
config.vm.define :omnios do | config |
config.vm.box = "omnios"
config.vm.guest = :solaris
config.vm.network :private_network, ip: $network["omnios"]
config.vm.synced_folder ".", "/opt/src/trafficserver.git", :nfs => false
config.vm.box_url = "http://omnios.omniti.com/media/omnios-latest.box"
config.vm.provision :shell, :path => "contrib/manifests/omnios.sh"
end
$vmspec.each do | name, spec |
config.vm.define name do | config |
config.vm.box = name
config.vm.box_url = spec[0]
config.vm.network :private_network, ip: $network[name]
config.vm.provision :puppet do |puppet|
puppet.manifests_path = "contrib/manifests"
puppet.manifest_file = spec[1]
end
end
end
end
# -*- mode: ruby -*-
# vi: set ft=ruby :