Skip to content

universal-application-haproxy-server

HAProxy Universal Application Server Profile

This profile implements a complete HAProxy deployment using the universal workflow pattern. It installs and configures HAProxy for a set of services using auto-discovery based on drpcli search filters.

Requirements

  • DRP universal content bundle
  • DRP community content v4.14.0 or later
  • Valid OS installation environment (see haproxy/base-install-os)

Operating Modes

Auto-Discovery Mode

Uses service discovery to automatically configure load balancing based on backend nodes. The services to load-balance are determined based on the haproxy/backend/services parameter set on backend nodes. Nodes are discovered using the haproxy/filters parameter.

Required parameters: - haproxy/role: load-balancer - haproxy/filters: filters to identify backend nodes - haproxy/frontend/config: (recommended) frontend service settings - haproxy/backend/config: (recommended) backend service settings

Example cluster configuration:

cluster/machines:
  load-balancer:
    pipeline: universal-application-haproxy-server
    names: ['lb01.example.com']
    Params:
      haproxy/role: load-balancer
      haproxy/filters:
        - Profiles=Eq(universal-application-apache-web-server) Params.haproxy/role=Eq(backend) Profiles=Eq({{ .Machine.Name }})
  web-backend:
    pipeline: universal-application-apache-web-server
    names: ['web01.example.com']
    Params:
      haproxy/role: backend
      haproxy/backend/services:
        http: 80
        ssl: [443, 80443]

Manual Override Mode

Bypasses service discovery by setting the haproxy/backend/map-override and haproxy/frontend/map-override parameters. This causes the configuration to be generated without service auto-discovery.

Required parameters: - haproxy/frontend/map-override: explicit frontend port mappings - haproxy/backend/map-override: explicit backend server configurations

Example standalone configuration:

Params:
  haproxy/frontend/map-override:
    http: [80, 8080]
    https: [443]
  haproxy/backend/map-override:
    http:
      - server web1.example.com 192.168.1.10:80 maxconn 32
      - server web2.example.com 192.168.1.11:80 maxconn 32
    https:
      - server web1.example.com 192.168.1.10:443 ssl verify none
      - server web2.example.com 192.168.1.11:443 ssl verify none

Usage

Standalone Mode

  1. Assign haproxy/backend/map-override and haproxy/frontend/map-override on a node
  2. Apply universal-application-haproxy-server profile
  3. Run the workflow

Cluster Mode

  1. Create a cluster profile that assigns load-balancer and backend roles
  2. Configure service discovery using haproxy/filters
  3. Define services using haproxy/backend/services on backend nodes
  4. Run the cluster workflow

Workflow

  1. OS Installation (using haproxy/base-install-os)
  2. Basic system setup (via universal workflow)
  3. HAProxy installation (haproxy-install blueprint)
  4. HAProxy configuration (haproxy-configure blueprint)