Lab 05: Capstone — HA Two-Node Cluster
Lab 05: Capstone — HA Two-Node Cluster Blueprint
Overview
Step 1: Install the Complete HA Stack
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y \
pacemaker corosync pcs \
haproxy keepalived \
python3 curl iproute2 \
2>/dev/null
echo "=== Installed versions ==="
echo -n "Pacemaker: "; pacemakerd --version 2>&1 | head -1
echo -n "Corosync: "; corosync -v 2>&1 | head -1
echo -n "HAProxy: "; haproxy -v 2>&1 | head -1
echo -n "Keepalived: "; keepalived --version 2>&1 | head -1
pcs --versionStep 2: Corosync Configuration
Step 3: Pacemaker Cluster Properties
Step 4: Virtual IP Resource Configuration
Step 5: HAProxy Configuration as Cluster Resource
Step 6: Health Check Scripts
Step 7: Failover Testing Procedure
Test 2: Node Standby (Graceful Failover)
Test 3: Service Kill (Application Failure Simulation)
Test 4: Hard Node Failure (Physical Simulation)
Test 5: VIP Failover Validation
Test 6: HAProxy Backend Failover
Expected Failover Times
Failure Type
Detection Time
Recovery Time
Total Outage
Post-Failover Checks
Cluster Failover Test Procedure
Pre-Test Checklist
3. Common Operations
3.1 Planned Maintenance (Node1)
3.2 HAProxy Config Update (Zero-Downtime)
3.3 Add New Backend Server
3.4 Emergency — Force Resource to Specific Node
4. Monitoring Commands
5. Troubleshooting
5.1 Resources Not Starting
5.2 Node Not Joining Cluster
5.3 STONITH Failure
5.4 Split-Brain Recovery
6. Emergency Contacts
Role
Contact
Phone
7. Runbook Sign-off
Date
Engineer
Change
Tested
HA Cluster Operational Runbook
Cluster: prod-ha-cluster
Version: 1.0 | Date: 2026-03-05
Maintainer: Operations Team [email protected]
1. Cluster Overview
Item
Value
2. Daily Health Checks
Last updated
