diff --git a/README.md b/README.md index 6a984f3..503f35a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +# Note: This project is not currently being maintained. + # cockpit-gluster A [cockpit](https://github.com/cockpit-project/cockpit) plugin that provides a status view and volume actions for a gluster cluster with [glusterd2](https://github.com/gluster/glusterd2)(GD2) based bricks. diff --git a/Vagrantfile b/Vagrantfile index ce16d62..f6a768d 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -3,18 +3,21 @@ cluster_count = 1 -node_disk_count = 2 #Changing this won't do anything because creating disks in a loop doesn't seem to work. +node_data_disk_count = 2 +driveletters = ('a'..'z').to_a disk_size = 20 #GB +cpus = 2 +memory = 2048 node_count = cluster_count * 3 -total_disks = node_count * node_disk_count +total_disks = node_count * node_data_disk_count total_disk_usage = total_disks * disk_size enable_glusterd2_rest_auth = false Vagrant.configure(2) do |config| puts "Creating #{cluster_count} clusters." puts "Creating #{node_count} nodes." - puts "Creating #{node_disk_count} disks(#{disk_size}G) each." + puts "Creating #{node_data_disk_count} data disks (#{disk_size}G) each." puts "Using #{total_disk_usage} GB!." (1..node_count).reverse_each do |num| @@ -23,35 +26,33 @@ Vagrant.configure(2) do |config| node.vm.box = "centos/7" node.vm.synced_folder ".", "/vagrant", disabled: true - node.vm.network "private_network", ip: vm_ip + node.vm.network "private_network", + :ip => vm_ip, + :libvirt__driver_queues => "#{cpus}" node.vm.post_up_message = "VM private ip: #{vm_ip}" node.vm.hostname = "gd2-node-#{num}" node.vm.provider "libvirt" do |lvt| - lvt.memory = 1024 - lvt.nested = true - lvt.cpu_mode = "host-model" + lvt.memory = "#{memory}" + lvt.cpus = "#{cpus}" + lvt.nested = false + lvt.cpu_mode = "host-passthrough" + lvt.volume_cache = "writeback" + lvt.graphics_type = "none" + lvt.video_type = "vga" + lvt.video_vram = 1024 + # lvt.usb_controller :model => "none" # (requires vagrant-libvirt 0.44 which is not in Fedora yet) + lvt.random :model => 'random' + lvt.channel :type => 'unix', :target_name => 'org.qemu.guest_agent.0', :target_type => 'virtio' #disk_config - lvt.storage :file, :size => "#{disk_size}G" - lvt.storage :file, :size => "#{disk_size}G" + disks = [] + (2..(node_data_disk_count+1)).each do |d| + lvt.storage :file, :device => "vd#{driveletters[d]}", :size => "#{disk_size}G" + disks.push "/dev/vd#{driveletters[d]}" + end end - - #broken - # node.vm.provider "virtualbox" do |vb| - # vb.memory = 1024 - # vb.customize ['storagectl', :id, '--name', 'SATA Controller', '--add', 'sata', '--portcount', node_disk_count] - # (1..node_disk_count).each do |disk_num| - # disk_path = "./virtualbox_disks/node-#{num}-disk-#{disk_num}.vdi" - # if not File.exists?(disk_path) - # vb.customize ['createhd', '--filename', disk_path, '--variant', 'Standard', '--size', node_disk_count * 1024] - # end - # vb.customize ['storageattach', :id, '--storagectl', 'SATA Controller', '--port', disk_num, '--device', 0, '--type', 'hdd', '--medium', disk_path] - # end - # end - - if num == 1 node.vm.synced_folder "./dist", "/root/.local/share/cockpit/gluster-management", type: "rsync", create: true, rsync__args: ["--verbose", "--archive", "--delete", "-z"] node.vm.synced_folder "./ansible/", "/etc/ansible//", type: "rsync", create: true, rsync__args: ["--verbose","--archive"] @@ -62,8 +63,9 @@ Vagrant.configure(2) do |config| node.vm.provision "shell", inline: <<-SHELL set -u - yum update -y - yum install -y util-linux # for chfn + + yum update -y --disableplugin=subscription-manager --downloaddir=/dev/shm + yum install -y --disableplugin=subscription-manager --downloaddir=/dev/shm util-linux echo foobar | passwd --stdin root getent passwd admin >/dev/null || useradd -c Administrator -G wheel admin @@ -73,7 +75,7 @@ Vagrant.configure(2) do |config| - yum install -y \ + yum install -y --disableplugin=subscription-manager --downloaddir=/dev/shm \ storaged \ storaged-lvm2 \ yum-utils \ @@ -85,7 +87,7 @@ Vagrant.configure(2) do |config| curl -o /etc/yum.repos.d/gd2-master.repo http://artifacts.ci.centos.org/gluster/gd2-nightly/gd2-master.repo curl -o /etc/yum.repos.d/sac-gluster-ansible-epel-7.repo https://copr.fedorainfracloud.org/coprs/sac/gluster-ansible/repo/epel-7/sac-gluster-ansible-epel-7.repo curl -o /etc/yum.repos.d/glusterfs-nightly-master.repo http://artifacts.ci.centos.org/gluster/nightly/master.repo - yum install -y \ + yum install -y --disableplugin=subscription-manager --downloaddir=/dev/shm \ glusterd2 \ gluster-ansible python-gluster-mgmt-client \ glusterfs-server glusterfs-fuse glusterfs-api @@ -105,6 +107,8 @@ Vagrant.configure(2) do |config| ssh-keygen -t rsa -N "" -f ~/.ssh/id_rsa fi + rm -rf /dev/shm/yumdb + if [[ #{num} -eq 1 ]] then for i in {10..#{node_count+10}} diff --git a/screenshots/ExpandClusterMultipleAddHosts.png b/screenshots/ExpandClusterMultipleAddHosts.png new file mode 100644 index 0000000..995725c Binary files /dev/null and b/screenshots/ExpandClusterMultipleAddHosts.png differ diff --git a/screenshots/ExpandClusterMultipleHostSelectionandDisperseVolumes.png b/screenshots/ExpandClusterMultipleHostSelectionandDisperseVolumes.png new file mode 100644 index 0000000..e947c6b Binary files /dev/null and b/screenshots/ExpandClusterMultipleHostSelectionandDisperseVolumes.png differ diff --git a/screenshots/ExpandClusterOptionalVolumeCreationChecked.png b/screenshots/ExpandClusterOptionalVolumeCreationChecked.png new file mode 100644 index 0000000..d1552c8 Binary files /dev/null and b/screenshots/ExpandClusterOptionalVolumeCreationChecked.png differ diff --git a/screenshots/ExpandClusterOptionalVolumeCreationUnchecked.png b/screenshots/ExpandClusterOptionalVolumeCreationUnchecked.png new file mode 100644 index 0000000..8f84ea7 Binary files /dev/null and b/screenshots/ExpandClusterOptionalVolumeCreationUnchecked.png differ diff --git a/screenshots/GlusterManagementUpdates.png b/screenshots/GlusterManagementUpdates.png new file mode 100644 index 0000000..a1ebc0e Binary files /dev/null and b/screenshots/GlusterManagementUpdates.png differ diff --git a/screenshots/cockpit-gluster-update-plans.md b/screenshots/cockpit-gluster-update-plans.md new file mode 100644 index 0000000..88361e2 --- /dev/null +++ b/screenshots/cockpit-gluster-update-plans.md @@ -0,0 +1,32 @@ +# Cockpit Gluster Update! + +Hey! We are adding a few features to cockpit-gluster. +Adding a few mockups along with it for review and comments. +The mockups are rather rough and just depict the solution a little roughly. +The CSS Styling will be inline with patternfly as before + +* Adding more options and actions to Gluster Management Page + Adding an option to start/stop volumes, setting gluster volume options. + +![Gluster Management Dashboard Image](GlusterManagementUpdates.png?raw=true "Gluster Management Dashboard") + +* Adding multi-host support. Until now you could expand only 3 hosts at a time through the expand cluster wizard. Planning to change it to a multi-host support. + Now there will be only a single field as default in the first step, and a Add Host button which will add more hosts as needed + +![Expand Cluster Multiple Add Host](ExpandClusterMultipleAddHosts.png?raw=true "Expand Cluster Multiple Add Host") + +* Volume Creation is optional + All fields are inactive when the Add Volumes checkbox is unchecked + +![Expand Cluster Optional Volume Creation Unchecked](ExpandClusterOptionalVolumeCreationUnchecked.png?raw=true "Expand Cluster Optional Volume Creation Unchecked") + +* When the volume is checked, the fields are activated and multiple volumes can be added similar to the multiple hosts. + +![Expand Cluster Optional Volume Creation Checked](ExpandClusterOptionalVolumeCreationChecked.png?raw=true "Expand Cluster Optional Volume Creation Checked") + +* EC and Replica volume support. + Since there are multiple hosts and volume will not be created on all hosts like before. Providing options to select the hosts on which the replica volume need to be created through a multiple select checkbox. In case of EC Volumes, Taking inputs as Redundancy Count and Disperse Data Count and also selecting the hosts on which the bricks for the volumes will be formed + +![Expand Cluster Multiple Host Selection and Disperse Volumes](ExpandClusterMultipleHostSelectionandDisperseVolumes.png?raw=true "Expand Cluster Multiple Host Selection and Disperse Volumes") + +Now taking information from volumes tab we will automatically list bricks on each host according to the volume configurations mentioned in the volumes tab. The user won’t be able to add/delete bricks on the bricks tab. In case there are any changes that need to be made after reviewing the bricks tab, the user will have to make the changes under the volumes tab again.