Firts version with ceph-install in provisioning. Nodes synchronization is working. Nodes' iP in /etc/hosts to avoid confusion with dnsmasq.
This commit is contained in:
Vendored
+30
-9
@@ -5,17 +5,36 @@ Vagrant.configure("2") do |config|
|
||||
# Get the VagrantFile directory
|
||||
vagrant_root = File.dirname(__FILE__)
|
||||
|
||||
# Trigger the Vagrant preflight script before uping the first VM only
|
||||
# Trigger the Vagrant pre-up 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"
|
||||
run "pre-up.sh"
|
||||
end
|
||||
|
||||
# Trigger the Vagrant post-destroy script aftre destroying the last VM only
|
||||
# config.trigger.after :destroy, :vm => ["node-admin"], :append_to_path => ["#{vagrant_root}/scripts"] do
|
||||
run "post-destroy.sh"
|
||||
# end
|
||||
|
||||
# Shell provisionner for all VMs
|
||||
config.vm.provision "shell", path: "scripts/ceph-preflight.sh"
|
||||
config.vm.provision "shell", path: "scripts/provision.sh"
|
||||
|
||||
# All VMs are based on the same box
|
||||
config.vm.box = "bento/ubuntu-16.04"
|
||||
|
||||
# Use nfs for shared folder
|
||||
config.vm.synced_folder ".", "/vagrant",
|
||||
nfs: true,
|
||||
linux__nfs_options: ['rw','no_subtree_check','all_squash','async'],
|
||||
nfs_version: 4,
|
||||
nfs_udp: false
|
||||
|
||||
# Public host bridge
|
||||
# config.vm.network "public_network",
|
||||
# network_name: "public-network",
|
||||
# dev: "br0",
|
||||
# type: "bridge",
|
||||
# mode: "bridge"
|
||||
|
||||
# Standard configuration for all VMs
|
||||
config.vm.provider :libvirt do |libvirt|
|
||||
libvirt.memory = 1024
|
||||
@@ -30,16 +49,17 @@ Vagrant.configure("2") do |config|
|
||||
end
|
||||
|
||||
# osd1 VM with private cluster network
|
||||
# 5 additional disks: 1 for ceph journal and 4 for osd
|
||||
# 3 additional disks: 1 for journals and 2 for osd
|
||||
config.vm.define "node-osd1" do |osd1|
|
||||
osd1.vm.hostname = "node-osd1"
|
||||
osd1.vm.network :private_network,
|
||||
:type => "dhcp",
|
||||
:type => "dhcp",
|
||||
:mac => "52:54:00:79:1e:b0",
|
||||
:libvirt__dhcp_start => "172.28.128.10",
|
||||
:libvirt__dhcp_stop => "172.28.128.250",
|
||||
:libvirt__network_address => "172.28.128.0",
|
||||
:libvirt__netmask => "255.255.255.0",
|
||||
:libvirt__network_name => "cluster-net"
|
||||
:libvirt__network_name => "cluster-network"
|
||||
osd1.vm.provider :libvirt do |libvirt|
|
||||
libvirt.storage :file,
|
||||
:size => "30G",
|
||||
@@ -57,12 +77,13 @@ Vagrant.configure("2") do |config|
|
||||
end
|
||||
|
||||
# osd2 VM with private cluster network
|
||||
# 5 additional disks: 1 for ceph journal and 4 for osd
|
||||
# 3 additional disks: 1 for journals and 2 for osd
|
||||
config.vm.define "node-osd2" do |osd2|
|
||||
osd2.vm.hostname = "node-osd2"
|
||||
osd2.vm.network :private_network,
|
||||
:type => "dhcp",
|
||||
:libvirt__network_name => "cluster-net"
|
||||
:type => "dhcp",
|
||||
:mac => "52:54:00:dc:51:7c",
|
||||
:libvirt__network_name => "cluster-network"
|
||||
osd2.vm.provider :libvirt do |libvirt|
|
||||
libvirt.storage :file,
|
||||
:size => "30G",
|
||||
|
||||
Reference in New Issue
Block a user