Help us grow and continue innovating!
flowchart TD
subgraph "HA Cluster Setup (ha_cluster_setup.sh)"
InstallTools["Install Critical HA Tools\n(corosync, pacemaker, pcs)"]
InstallSupport["Install Supporting Tools\n(ufw, haproxy, fail2ban, nginx, apache2)"]
StaticIP["Static IP Configuration\n(netplan guidance)"]
SSLCert["SSL Certificate Setup\n(Self-signed for Nginx/Apache2)"]
DefaultServices["Default Service Setup\n(Start & enable HAProxy, Fail2Ban, nginx, apache2)"]
ServiceStatus["Service Status Check\n(Display status of critical services)"]
ManualConfig["Manual Advanced Config\n(Corosync/PCS setup left for user)"]
end
InstallTools --> InstallSupport
InstallSupport --> StaticIP
StaticIP --> SSLCert
SSLCert --> DefaultServices
DefaultServices --> ServiceStatus
ServiceStatus --> ManualConfig
subgraph "Basic Security"
UFW["UFW Firewall"]
Haproxy["HAProxy\n(Load Balancer)"]
Fail2ban["Fail2Ban\n(Intrusion Prevention)"]
Haveged["Haveged\n(Randomness Generator)"]
end
DefaultServices --> UFW
DefaultServices --> Haproxy
DefaultServices --> Fail2ban
DefaultServices --> Haveged
subgraph "Web & SSH Setup"
NginxSetup["Nginx Setup & Config Guide"]
HTTPSSetup["Enable HTTPS\n(Self-signed Cert.)"]
SSHConn["Establish SSH Connections"]
end
DefaultServices --> NginxSetup
DefaultServices --> HTTPSSetup
DefaultServices --> SSHConn
ManualConfig -.-> |User customizes| InstallTools
ManualConfig -.-> |User customizes| InstallSupport
ManualConfig -.-> |User customizes| StaticIP
ManualConfig -.-> |User customizes| SSLCert
ManualConfig -.-> |User customizes| DefaultServices
%% Legend
classDef core fill:#f5f5dc,stroke:#333,stroke-width:2px;
class InstallTools,InstallSupport,StaticIP,SSLCert,DefaultServices,ServiceStatus,ManualConfig core;
classDef security fill:#e0f7fa,stroke:#333,stroke-width:2px;
class UFW,Haproxy,Fail2ban,Haveged security;
classDef webssh fill:#e6ee9c,stroke:#333,stroke-width:2px;
class NginxSetup,HTTPSSetup,SSHConn webssh;
The ha_cluster_setup.sh script is a beginner-friendly starting point for setting up a High Availability (HA) cluster. It simplifies and accelerates the installation process by automating the basic steps while skipping detailed configurations for advanced tools like corosync and pcs. This allows users to quickly install required components and focus on further customization later.
-
Basic Installation:
- Installs critical HA tools like
corosync,pacemaker,pcs, and supporting tools such asufw,haproxy,fail2ban,nginx, andapache2. - Automates dependency installation, reducing manual setup time.
- Installs critical HA tools like
-
Static IP Configuration:
- Guides users through setting up a static IP with a generated
netplanconfiguration. - Ensures the system is network-ready before starting advanced HA configurations.
- Guides users through setting up a static IP with a generated
-
SSL Certificate Setup:
- Includes a simple method for generating self-signed SSL certificates for Nginx and Apache2.
- Ensures HTTPS readiness without requiring external certificate management.
-
Default Service Setup:
- Starts and enables basic services like
HAProxy,Fail2Ban,nginx, andapache2with minimal configurations. - Provides example configurations for Nginx and Apache2 to get services running quickly.
- Starts and enables basic services like
-
Service Status Check:
- Displays the status of critical services at the end, helping users verify that the basic setup is complete.
- Corosync and PCS: While these tools are installed, no advanced cluster configuration is included. Users will need to configure
corosyncandpcsmanually based on their specific HA cluster requirements. - Purpose: The script is focused on speeding up the initial setup rather than providing a fully configured HA environment.
This script is an excellent tool for beginners who want to quickly set up the foundational components of an HA cluster and explore further configurations at their own pace.
- Nginx Setup — Nginx Configuration Guide
- Enable HTTPS with Self-Signed Certificate
- Establish SSH Connections
Basic Security (If needed,use this: SELKS)
- UFW -- UFW Firewall setup
- Haproxy -- Haproxy github repository: -- Haproxy and Load Balancing Concepts
- Fail2ban -- Protect WebServer with Fail2ban
- Haveged (Haveged inspired algorithm has been included in the Linux kernel )
apt install ufw haproxy fail2ban
systemctl enable ufw haproxy fail2ban