-
Notifications
You must be signed in to change notification settings - Fork 0
/
Vagrantfile
47 lines (41 loc) · 1.74 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
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
# We don't use ubuntu/xenial64 because of https://bugs.launchpad.net/cloud-images/+bug/1569237
config.vm.box = "bento/ubuntu-16.04"
config.ssh.forward_agent = true
config.ssh.insert_key = false
config.hostmanager.enabled = true
config.cache.scope = :box
config.cache.synced_folder_opts = {
owner: "_apt",
group: "_apt"
}
# We need one Ceph admin machine to manage the cluster
config.vm.define "ceph-admin" do |admin|
admin.vm.hostname = "ceph-admin"
admin.vm.network :private_network, ip: "172.21.12.10"
admin.vm.provision :shell, :inline => "wget -q -O- 'https://download.ceph.com/keys/release.asc' | apt-key add -", :privileged => true
admin.vm.provision :shell, :inline => "echo deb http://download.ceph.com/debian/ $(lsb_release -sc) main | tee /etc/apt/sources.list.d/ceph.list", :privileged => true
admin.vm.provision :shell, :inline => "DEBIAN_FRONTEND=noninteractive apt-get update && apt-get install -yq ntp ceph-deploy", :privileged => true
end
# The Ceph client will be our client machine to mount volumes and interact with the cluster
config.vm.define "ceph-client" do |client|
client.vm.hostname = "ceph-client"
client.vm.network :private_network, ip: "172.21.12.11"
end
# We provision three nodes to be Ceph mon
(1..3).each do |i|
config.vm.define "mon-#{i}" do |config|
config.vm.hostname = "mon-#{i}"
config.vm.network :private_network, ip: "172.21.12.#{i+11}"
end
end
# We provision four nodes to be Ceph osd
(1..3).each do |i|
config.vm.define "osd-#{i}" do |config|
config.vm.hostname = "osd-#{i}"
config.vm.network :private_network, ip: "172.21.12.#{i+15}"
end
end
end