Working v1

This commit is contained in:
Cory Hawkless 2021-03-23 20:35:29 +10:30
parent afeb2bac22
commit 7c2f8b188e
4 changed files with 2600 additions and 678 deletions

38
Vagrantfile vendored
View File

@ -34,6 +34,8 @@ Vagrant.configure("2") do |config|
libvirt.volume_cache = "writeback" libvirt.volume_cache = "writeback"
libvirt.graphics_type = "spice" libvirt.graphics_type = "spice"
libvirt.video_type = "qxl" libvirt.video_type = "qxl"
libvirt.storage_pool_name="cephlab"
# libvirt.snapshot_pool_name="cephlab"
end end
# admin VM # admin VM
@ -59,15 +61,15 @@ Vagrant.configure("2") do |config|
:libvirt__network_name => "cluster-network" :libvirt__network_name => "cluster-network"
osd1.vm.provider :libvirt do |libvirt| osd1.vm.provider :libvirt do |libvirt|
libvirt.storage :file, libvirt.storage :file,
:size => "20G", :size => "10G",
:type => "raw", :type => "raw",
:cache => "writeback" :cache => "writeback"
libvirt.storage :file, libvirt.storage :file,
:size => "40G", :size => "10G",
:type => "raw", :type => "raw",
:cache => "writeback" :cache => "writeback"
libvirt.storage :file, libvirt.storage :file,
:size => "40G", :size => "10G",
:type => "raw", :type => "raw",
:cache => "writeback" :cache => "writeback"
end end
@ -83,17 +85,41 @@ Vagrant.configure("2") do |config|
:libvirt__network_name => "cluster-network" :libvirt__network_name => "cluster-network"
osd2.vm.provider :libvirt do |libvirt| osd2.vm.provider :libvirt do |libvirt|
libvirt.storage :file, libvirt.storage :file,
:size => "20G", :size => "10G",
:type => "raw", :type => "raw",
:cache => "writeback" :cache => "writeback"
libvirt.storage :file, libvirt.storage :file,
:size => "40G", :size => "10G",
:type => "raw", :type => "raw",
:cache => "writeback" :cache => "writeback"
libvirt.storage :file, libvirt.storage :file,
:size => "40G", :size => "10G",
:type => "raw", :type => "raw",
:cache => "writeback" :cache => "writeback"
end end
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 end

3141
log.log

File diff suppressed because it is too large Load Diff

View File

@ -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 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 ssh $NODE sudo chown ceph:ceph /var/lib/ceph/bootstrap-osd/ceph.keyring
$OUTPUT_LOG "Create OSDs on $NODE" $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 --bluestore --data /dev/vdb
ssh $NODE sudo ceph-volume lvm create --filestore --data /dev/vdc --journal /dev/vda2 ssh $NODE sudo ceph-volume lvm create --bluestore --data /dev/vdc
ssh $NODE sudo ceph-volume lvm create --bluestore --data /dev/vdd
done; done;
# wait 10 seconds and get cluster status # wait 10 seconds and get cluster status

View File

@ -38,7 +38,7 @@ CEPH_ADMIN_USER="ceph-admin"
# Nodes # Nodes
ADMIN_NODE="node-admin" ADMIN_NODE="node-admin"
OSD_NODES="node-osd1 node-osd2" OSD_NODES="node-osd1 node-osd2 node-osd3"
NODES="$ADMIN_NODE $OSD_NODES" NODES="$ADMIN_NODE $OSD_NODES"
# Networks # Networks