OndrejHome.ha-cluster-rgmanager
ha-cluster-rgmanager
This role helps set up a basic high-availability cluster using rgmanager on CentOS/RHEL 5/6 systems.
ROLE RETIREMENT NOTICE
Since 'rgmanager' hasn't seen any updates for a long time, there are no new developments planned for this role.
The last time the role was tested was on September 27, 2022, with these setups:
- A CentOS 7.9 host running Ansible 2.4
- Creating a cluster on CentOS 6.10 machines
- Creating a cluster on RHEL 6.10 machines
Requirements
For RHEL: The machines should already be registered and subscribed to the 'High Availability' or 'Resilient Storage' channels.
For CentOS 5.x: You need to install the python-simplejson.x86_64
package before running Ansible.
Role Variables
User and group for the ricci daemon (usually doesn't need changes except for the password).
cluster_user: 'ricci'
cluster_user_pass: 'testtest'
cluster_group: 'ricci'
Name of the cluster
cluster_name: 'rgmanager'
Set up the firewall for clustering. Note: this will replace the iptables config file!
cluster_firewall: true
Enable the cluster to start on boot
cluster_enable_service: true
Configure the cluster with the fence_xvm fencing device. This will copy
/etc/cluster/fence_xvm.key
to the nodes and add fencing devices to the cluster. Make sure to define 'vm_name' in the inventory for each cluster node.cluster_configure_fence_xvm: true
Use a custom multicast address for cluster communication (by default, the cluster generates a multicast address based on the cluster ID).
multicast_address: '239.192.1.2'
For RHEL only, enable the repositories containing the required packages.
enable_repos: true
For RHEL only, enable the extended update (EUS) repositories.
enable_eus_repos: false
For RHEL only, enable Beta repositories.
enable_beta_repos: false
For RHEL only, specify the type of repositories to enable:
- ha - High Availability
- rs - Resilient Storage
repos_type: 'ha'
Cluster transport protocol options: 'udp' (UDP multicast) or 'udpu' (UDP unicast).
cluster_transport: 'udp'
Example Playbook
Here's an example playbook to create a cluster called 'test1', which starts on boot, includes fence_xvm, and has firewall settings:
- hosts: servers
roles:
- { role: 'ondrejhome.ha-cluster-rgmanager', cluster_name: 'test1' }
For creating a cluster named 'test2' without firewall settings and without fence_xvm. Make sure the firewall is either already configured or disabled for proper authorization.
- hosts: servers
roles:
- { role: 'ondrejhome.ha-cluster-rgmanager', cluster_name: 'test2', cluster_firewall: false, cluster_configure_fence_xvm: false }
An example of an inventory file for CentOS/RHEL:
[cluster-el]
192.168.22.21 vm_name=fastvm-centos-6.10-21
192.168.22.22 vm_name=fastvm-centos-6.10-22
License
GPLv3
Author Information
To contact the author, you can email ondrej-xa2iel8u@famera.cz or open an issue on GitHub.
ansible-galaxy install OndrejHome.ha-cluster-rgmanager