No description
Find a file
Mauritz Uphoff f3effc247a
All checks were successful
CI / Terraform Format & Validate (push) Successful in 12s
CI / TruffleHog Secrets Scan (push) Successful in 36s
fmt code
2025-06-17 11:45:29 +02:00
.forgejo/workflows Initial commit 2025-06-10 16:32:16 +02:00
docs Initial commit 2025-06-10 16:32:16 +02:00
.gitignore clean up repo 2025-06-12 12:26:59 +02:00
.terraform.lock.hcl fmt code 2025-06-17 11:30:56 +02:00
00-provider.tf fmt code 2025-06-17 11:30:56 +02:00
01-config.tf fmt code 2025-06-17 11:30:56 +02:00
02-network.tf fmt code 2025-06-17 11:30:56 +02:00
03-master.tf fmt code 2025-06-17 11:45:29 +02:00
04-backup.tf fmt code 2025-06-17 11:45:29 +02:00
05-ha.tf fmt code 2025-06-17 11:45:29 +02:00
06-outputs.tf fmt code 2025-06-17 11:30:56 +02:00
cloud-init.yaml fmt code 2025-06-17 11:30:56 +02:00
keepalive.conf Initial commit 2025-06-10 16:32:16 +02:00
README.md fmt code 2025-06-17 11:45:29 +02:00
STACKIT-CLI-GUIDE.md cleanup repository 2025-06-11 15:07:19 +02:00
test-setup.sh fmt code 2025-06-17 11:30:56 +02:00

Basic High Availability (HA) Setup Using VRRP

This guide provides a comprehensive, step-by-step process for setting up a Basic High Availability (HA) cluster using the Virtual Router Redundancy Protocol (VRRP) with the STACKIT CLI. In this HA configuration, one virtual machine (VM) functions as the active primary node while the secondary remains on standby.

For setup instructions using the STACKIT CLI instead of Terraform, please refer to the STACKIT CLI Guide.

Testing the Setup

After completing the setup, use the test-setup.sh script to verify that the Apache server is operational on each machine. Executing this script should yield the following results:

Performing curl on IP: 193.148.177.243
<center><h1>example01</h1>

Performing curl on IP: 193.148.161.92
<center><h1>example02</h1>

Performing curl on IP: 193.148.169.230
<center><h1>example01</h1>

The output indicates a successfully functional VRRP setup.

Failover Testing

To test failover, stop the master VM and perform another curl request to the vIP WAN IP:

vip01_wan_ip=$(terraform output -raw vip01-wan-ip)
curl $vip01_wan_ip

<center><h1>example02</h1>

The response confirms that the fail-over from the master to the backup has occurred.

Diagrams

  • HA Traffic Flow: HA Traffic Flow Diagram

  • vIP Binding Concept: vIP Binding Diagram