This project deploys a complete edge computing solution in AWS consisting of:
- EKS Cluster for container orchestration
- VPC with availability zones in AWS Wavelength
- HAProxy Enterprise (HAPEE) in Wavelength zones for load balancing pods in the EKS cluster
This architecture enables low-latency load balancing at the network edge, allowing clients to efficiently access applications running in EKS clusters through AWS Wavelength zones.
Before deployment, ensure you have:
- HAPEE License: Valid license for HAProxy Enterprise Edition
- AWS Access:
- AWS Wavelength services access
- EKS creation and management permissions
- EC2 management permissions
- Carrier Gateway access (if using AWS Wavelength's Carrier Gateway)
cluster_name
: EKS cluster nameworker_key_name
: EC2 key pair for node accessregion
: AWS region for deploymentwavelength_zones
: Wavelength zones compatible with your regionha
: Boolean to determine HAProxy installation mode (HA or standalone)
Open-source infrastructure as code (IaC) tool used to define and deploy the AWS resources.
High-performance TCP/HTTP load balancer and proxy that manages ingress traffic for Kubernetes workloads, integrated with AWS Wavelength for edge computing.
Brings AWS services to the edge of telecom networks, enabling ultra-low latency applications by running them closer to mobile devices.
Managed Kubernetes service that simplifies running containerized applications on AWS.
Provides compute capacity for both the EKS worker nodes and supporting services.
Command-line tool for programmatic interaction with AWS services.
# Install via Homebrew
brew install terraform
# Or manually
tar -xvzf terraform_*.zip
sudo mv terraform /usr/local/bin/
unzip terraform_*.zip
sudo mv terraform /usr/local/bin/
- Download the .zip file from the Terraform website.
- Extract to a directory of your choice.
- Add the directory to your system PATH environment variable.
terraform -v
# Clone repository
git clone https://github.com/haproxytech/Terraform-HAPEE-AWS-Wavelength.git
cd wavelength-terraform-hapee-aws
# Modify configuration files:
# - Copy example.tfvars to terraform.tfvars
# - Adjust settings in terraform.tfvars for your environment
# Initialize Terraform
terraform init
# Configure AWS credentials (if not already configured)
aws configure
# Alternatively, set environment variables:
export AWS_ACCESS_KEY_ID="your-access-key-id"
export AWS_SECRET_ACCESS_KEY="your-secret-access-key"
export AWS_DEFAULT_REGION="your-region"
# Create a Terraform plan
terraform plan -out planfile
# Apply the Terraform plan
terraform apply -auto-approve planfile
After successful deployment, follow these instructions to complete the configuration:
# Update your kubeconfig
aws eks update-kubeconfig --name YOUR-EKS-CLUSTER-NAME --region YOUR-REGION
# Verify cluster access
kubectl get nodes
# View your Wavelength Zone nodes
kubectl get nodes -L topology.kubernetes.io/zone
# Apply the sample workload
kubectl apply -f sample-workload.yaml
# Visit the HAProxy endpoint to view your application
# http://HAPROXY-FLOATING-IP (Floating HA IP)
Note: Ensure your AWS CLI is configured with the correct region and credentials.
To configure VRRP for high availability between your HAProxy instances:
# SSH into your primary instance
ssh ec2-user@PRIMARY-INSTANCE-IP
# Run the following command to configure the primary instance
sudo bash /etc/hapee-extras/wavelength_vrrp.sh -e PRIMARY-ENI-ID -f FLOATING-IP -l PRIMARY-LOCAL-IP -p SECONDARY-IP -i INTERFACE-NAME -r PRIORITY-VALUE -g YOUR-REGION
# SSH into your secondary instance
ssh ec2-user@SECONDARY-INSTANCE-IP
# Run the following command to configure the secondary instance
sudo bash /etc/hapee-extras/wavelength_vrrp.sh -e SECONDARY-ENI-ID -f FLOATING-IP -l SECONDARY-LOCAL-IP -p PRIMARY-IP -i INTERFACE-NAME -r PRIORITY-VALUE -g YOUR-REGION
# Verify the setup by checking the status of keepalived on both instances
sudo systemctl status hapee-extras-vrrp
Replace the placeholder values with your actual configuration values from the Terraform output.
HAProxy Technologies