How to install cluster Pacemaker on linux CentOS 7 for SQL Server High Availability

How to install cluster Pacemaker on linux CentOS 7 for SQL Server High Availability

How to Install cluster pacemaker on linux CentOS 7 for SQL Server High Availability video explains below Validating Nodes IP address Disable firewall and SELINUX (for Installation Only) -- Not Recommended for Prod Installing pacemaker Configuring Cluster User, i.e. hacluster Starting and Enabling Pacemaker services Adding members node to cluster Creating and starting cluster Confuring cluster resources a) Virtual IP of the cluster b) Apache Services -httpd-- Just to test the failover cluster Create Constraint of cluster resources Test Fail-over Script used in this video: #How to create Pacemaker Cluster on Linux CentoS 7 # IP Configuration verification of all possible nodes # installing httpd to verify in the end of cluster on both nodes yum install httpd -y # Disable SELINUX and Firewall vi /etc/sysconfig/selinux Change SELINUX=enforcing to Permissive and save the file on both nodes and setenforce 0 systemctl stop firewalld systemctl disable firewalld # Install Pacemaker software on both nodes yum install pacemaker pcs fence-agents-all -y # Once installed, you will see user created named hacluster - we need reset the password for this user on both nodes tail /etc/passwd --- To see if user is created passwd hacluster # Start and Enable PaceMaker Services on both nodes systemctl start pcsd systemctl enable pcsd # Add membership of the cluster using hacluster username pcs cluster auth TBSLinuxNode1 TBSLinuxNode2 -u hacluster # Create Cluster named "LinuxSQLCluster" in my case pcs cluster setup --name LinuxSQLCluster TBSLinuxNode1 TBSLinuxNode2 # View Configuration of the Cluster on both nodes Cat /etc/corosync/corosync.conf #Start the cluster pcs cluster start --all #Check the status of the cluster and enable the cluster pcs status pcs cluster enable -all # Configure the resources of the cluster a) Virtual IP of the cluster pcs resource create VirtIP IPAddr ip=192.168.1.102 cidr_netmask=24 op monitor interval=60 b) apache services (To check the failover, not necessary for SQL Server) pcs resource create Httpd apache Configuration="/etc/httpd/conf/httpd.conf" op monitor interval=60s -- # Check the status again to see if resources are configured right and you will notice both resources are created and in stopped state # Let's create Constraint and Policies on the cluster pcs constraint colocation add Httpd with VirtIP INFINITY pcs property set stonith-enabled=false pcs property set no-quorum-policy=ignore pcs property set default-resource-stickiness="INFINITY" # Check the status again to see if resources are online pcs status # Check virtual IP on active node ip a # Now let's create an HTML page to see where which node our resources are running vi /var/www/html/index.html #Type anything for example Hey I am TBSClusterNode1 (if creating on TBSLinuxNode1 in my case) etc. and save it on each node # Now let's view the page using IE or any browser # Let's failover the cluster and recheck the html page file we just created pcs cluster stop TBSLinuxNode1 (If it is running on node1, if node2, stop cluster services on that node)

How to Install cluster pacemaker on Linux CentOS 7 for SQL Server High Availability



No comments:

Post a Comment