forked from dsariel/swiftacular
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
54 lines (42 loc) · 1.92 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
nodes = {
'swift-package-cache' => [1, 20],
'swift-keystone' => [1, 50],
# 'swift-lbssl' => [1, 30],
'swift-proxy' => [1, 100],
'swift-storage' => [3, 200],
}
Vagrant.configure("2") do |config|
#config.vm.box = "trusty64"
#config.vm.box_url = "https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-amd64-vagrant-disk1.box"
#config.vm.box = "centos65"
#config.vm.box_url = "http://puppet-vagrant-boxes.puppetlabs.com/centos-65-x64-virtualbox-nocm.box"
# config.vm.box = "precise64"
# config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.box = "eurolinux-vagrant/centos-stream-9"
config.vm.box_url = "https://app.vagrantup.com/eurolinux-vagrant/boxes/centos-stream-9/versions/9.0.28/providers/virtualbox.box"
nodes.each do |prefix, (count, ip_start)|
count.times do |i|
hostname = "%s-%02d" % [prefix, (i+1)]
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--memory", 512]
end
config.vm.define "#{hostname}" do |box|
puts "working on #{hostname} with ip of 192.168.100.#{ip_start+i}"
box.vm.hostname = "#{hostname}.example.com"
#
# Networks
#
# Public
box.vm.network :private_network, :ip => "192.168.100.#{ip_start+i}", :netmask => "255.255.255.0"
# SSL and loadbalancing
box.vm.network :private_network, :ip => "10.0.10.#{ip_start+i}", :netmask => "255.255.255.0"
# Internal
box.vm.network :private_network, :ip => "10.0.20.#{ip_start+i}", :netmask => "255.255.255.0"
# Replication
box.vm.network :private_network, :ip => "10.0.30.#{ip_start+i}", :netmask => "255.255.255.0"
end
end
end
end