Provisioning OK - Start install

This commit is contained in:
Denis Lambolez
2017-12-03 20:19:25 +01:00
parent a90e859390
commit aec00ed62f
11 changed files with 297 additions and 42 deletions
Vendored
+31 -33
View File
@@ -2,8 +2,21 @@
Vagrant.configure("2") do |config|
config.vm.box = "bento/ubuntu-17.04"
# Get the VagrantFile directory
vagrant_root = File.dirname(__FILE__)
# Trigger the Vagrant preflight script before uping the first VM only
config.trigger.before :up, :vm => ["node-admin"], :append_to_path => ["#{vagrant_root}/scripts"] do
run "vagrant-preflight.sh"
end
# Shell provisionner for all VMs
config.vm.provision "shell", path: "scripts/ceph-preflight.sh"
# All VMs are based on the same box
config.vm.box = "bento/ubuntu-16.04"
# Standard configuration for all VMs
config.vm.provider :libvirt do |libvirt|
libvirt.memory = 1024
libvirt.volume_cache = "writeback"
@@ -11,30 +24,25 @@ Vagrant.configure("2") do |config|
libvirt.video_type = "qxl"
end
config.vm.define "admin", primary: true do |admin|
admin.vm.hostname = "admin.local"
# admin VM
config.vm.define "node-admin", primary: true do |admin|
admin.vm.hostname = "node-admin"
end
config.vm.define "osd1" do |osd1|
osd1.vm.hostname = "osd1.local"
# osd1 VM with private cluster network
# 5 additional disks: 1 for ceph journal and 4 for osd
config.vm.define "node-osd1" do |osd1|
osd1.vm.hostname = "node-osd1"
osd1.vm.network :private_network,
:type => "dhcp",
:libvirt__dhcp_start => "172.28.128.10",
:libvirt__dhcp_stop => "172.28.128.250",
:libvirt__network_address => "172.28.128.0",
:libvirt__domain_name => "osd.private",
:libvirt__network_name => "osd-private"
:libvirt__network_address => "172.28.128.0",
:libvirt__netmask => "255.255.255.0",
:libvirt__network_name => "cluster-net"
osd1.vm.provider :libvirt do |libvirt|
libvirt.storage :file,
:size => "40G",
:type => "raw",
:cache => "writeback"
libvirt.storage :file,
:size => "20G",
:type => "raw",
:cache => "writeback"
libvirt.storage :file,
:size => "20G",
:size => "30G",
:type => "raw",
:cache => "writeback"
libvirt.storage :file,
@@ -48,26 +56,16 @@ Vagrant.configure("2") do |config|
end
end
config.vm.define "osd2" do |osd2|
osd2.vm.hostname = "osd2.local"
# osd2 VM with private cluster network
# 5 additional disks: 1 for ceph journal and 4 for osd
config.vm.define "node-osd2" do |osd2|
osd2.vm.hostname = "node-osd2"
osd2.vm.network :private_network,
:type => "dhcp",
:libvirt__dhcp_start => "172.28.128.10",
:libvirt__dhcp_stop => "172.28.128.250",
:libvirt__network_address => "172.28.128.0",
:libvirt__domain_name => "osd.private",
:libvirt__network_name => "osd-private"
:libvirt__network_name => "cluster-net"
osd2.vm.provider :libvirt do |libvirt|
libvirt.storage :file,
:size => "40G",
:type => "raw",
:cache => "writeback"
libvirt.storage :file,
:size => "20G",
:type => "raw",
:cache => "writeback"
libvirt.storage :file,
:size => "20G",
:size => "30G",
:type => "raw",
:cache => "writeback"
libvirt.storage :file,