Working v1
This commit is contained in:
parent
afeb2bac22
commit
7c2f8b188e
|
@ -4,7 +4,7 @@ Vagrant.configure("2") do |config|
|
|||
|
||||
# Get the VagrantFile directory
|
||||
vagrant_root = File.dirname(__FILE__)
|
||||
|
||||
|
||||
# Trigger the Vagrant pre-up script before uping the first VM only
|
||||
|
||||
|
||||
|
@ -34,6 +34,8 @@ Vagrant.configure("2") do |config|
|
|||
libvirt.volume_cache = "writeback"
|
||||
libvirt.graphics_type = "spice"
|
||||
libvirt.video_type = "qxl"
|
||||
libvirt.storage_pool_name="cephlab"
|
||||
# libvirt.snapshot_pool_name="cephlab"
|
||||
end
|
||||
|
||||
# admin VM
|
||||
|
@ -59,15 +61,15 @@ Vagrant.configure("2") do |config|
|
|||
:libvirt__network_name => "cluster-network"
|
||||
osd1.vm.provider :libvirt do |libvirt|
|
||||
libvirt.storage :file,
|
||||
:size => "20G",
|
||||
:size => "10G",
|
||||
:type => "raw",
|
||||
:cache => "writeback"
|
||||
libvirt.storage :file,
|
||||
:size => "40G",
|
||||
:size => "10G",
|
||||
:type => "raw",
|
||||
:cache => "writeback"
|
||||
libvirt.storage :file,
|
||||
:size => "40G",
|
||||
:size => "10G",
|
||||
:type => "raw",
|
||||
:cache => "writeback"
|
||||
end
|
||||
|
@ -83,17 +85,41 @@ Vagrant.configure("2") do |config|
|
|||
:libvirt__network_name => "cluster-network"
|
||||
osd2.vm.provider :libvirt do |libvirt|
|
||||
libvirt.storage :file,
|
||||
:size => "20G",
|
||||
:size => "10G",
|
||||
:type => "raw",
|
||||
:cache => "writeback"
|
||||
libvirt.storage :file,
|
||||
:size => "40G",
|
||||
:size => "10G",
|
||||
:type => "raw",
|
||||
:cache => "writeback"
|
||||
libvirt.storage :file,
|
||||
:size => "40G",
|
||||
:size => "10G",
|
||||
:type => "raw",
|
||||
:cache => "writeback"
|
||||
end
|
||||
end
|
||||
|
||||
# osd3 VM with private cluster network
|
||||
# 3 additional disks: 1 for journals and 2 for osd
|
||||
config.vm.define "node-osd3" do |osd3|
|
||||
osd3.vm.hostname = "node-osd3"
|
||||
osd3.vm.network :private_network,
|
||||
:type => "dhcp",
|
||||
:libvirt__network_name => "cluster-network"
|
||||
osd3.vm.provider :libvirt do |libvirt|
|
||||
libvirt.storage :file,
|
||||
:size => "10G",
|
||||
:type => "raw",
|
||||
:cache => "writeback"
|
||||
libvirt.storage :file,
|
||||
:size => "10G",
|
||||
:type => "raw",
|
||||
:cache => "writeback"
|
||||
libvirt.storage :file,
|
||||
:size => "10G",
|
||||
:type => "raw",
|
||||
:cache => "writeback"
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -102,8 +102,9 @@ for NODE in $OSD_NODES; do
|
|||
ssh $NODE sudo cp /home/$CEPH_ADMIN_USER/ceph.bootstrap-osd.keyring /var/lib/ceph/bootstrap-osd/ceph.keyring
|
||||
ssh $NODE sudo chown ceph:ceph /var/lib/ceph/bootstrap-osd/ceph.keyring
|
||||
$OUTPUT_LOG "Create OSDs on $NODE"
|
||||
ssh $NODE sudo ceph-volume lvm create --filestore --data /dev/vdb --journal /dev/vda1
|
||||
ssh $NODE sudo ceph-volume lvm create --filestore --data /dev/vdc --journal /dev/vda2
|
||||
ssh $NODE sudo ceph-volume lvm create --bluestore --data /dev/vdb
|
||||
ssh $NODE sudo ceph-volume lvm create --bluestore --data /dev/vdc
|
||||
ssh $NODE sudo ceph-volume lvm create --bluestore --data /dev/vdd
|
||||
done;
|
||||
|
||||
# wait 10 seconds and get cluster status
|
||||
|
|
|
@ -38,7 +38,7 @@ CEPH_ADMIN_USER="ceph-admin"
|
|||
|
||||
# Nodes
|
||||
ADMIN_NODE="node-admin"
|
||||
OSD_NODES="node-osd1 node-osd2"
|
||||
OSD_NODES="node-osd1 node-osd2 node-osd3"
|
||||
NODES="$ADMIN_NODE $OSD_NODES"
|
||||
|
||||
# Networks
|
||||
|
|
Loading…
Reference in New Issue