2014-03-04 02:08:51 +08:00
|
|
|
# -*- 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.box = "precise64"
|
|
|
|
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
|
|
|
|
|
2014-03-06 20:54:37 +08:00
|
|
|
config.vm.define :rgw do |rgw|
|
|
|
|
rgw.vm.network :private_network, ip: "192.168.0.2"
|
|
|
|
rgw.vm.host_name = "ceph-rgw"
|
2014-03-14 17:47:06 +08:00
|
|
|
rgw.vm.provider :virtualbox do |vb|
|
|
|
|
vb.customize ["modifyvm", :id, "--memory", "192"]
|
|
|
|
end
|
2014-03-06 20:54:37 +08:00
|
|
|
end
|
|
|
|
|
2014-03-04 02:08:51 +08:00
|
|
|
(0..2).each do |i|
|
|
|
|
config.vm.define "mon#{i}" do |mon|
|
|
|
|
mon.vm.hostname = "ceph-mon#{i}"
|
|
|
|
mon.vm.network :private_network, ip: "192.168.0.1#{i}"
|
2014-03-14 17:47:06 +08:00
|
|
|
mon.vm.provider :virtualbox do |vb|
|
|
|
|
vb.customize ["modifyvm", :id, "--memory", "192"]
|
|
|
|
end
|
2014-03-04 02:08:51 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
(0..2).each do |i|
|
|
|
|
config.vm.define "osd#{i}" do |osd|
|
|
|
|
osd.vm.hostname = "ceph-osd#{i}"
|
|
|
|
osd.vm.network :private_network, ip: "192.168.0.10#{i}"
|
|
|
|
osd.vm.network :private_network, ip: "192.168.0.20#{i}"
|
2014-03-11 21:22:11 +08:00
|
|
|
(0..5).each do |d|
|
2014-03-04 02:08:51 +08:00
|
|
|
osd.vm.provider :virtualbox do |vb|
|
2014-03-11 21:22:11 +08:00
|
|
|
vb.customize [ "createhd", "--filename", "disk-#{i}-#{d}", "--size", "1000" ]
|
2014-03-04 02:08:51 +08:00
|
|
|
vb.customize [ "storageattach", :id, "--storagectl", "SATA Controller", "--port", 3+d, "--device", 0, "--type", "hdd", "--medium", "disk-#{i}-#{d}.vdi" ]
|
2014-03-14 17:47:06 +08:00
|
|
|
vb.customize ["modifyvm", :id, "--memory", "192"]
|
2014-03-04 02:08:51 +08:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|