universal-application-haproxy-server

This Profile installs and configures HA Proxy for a set of services using autodiscovery based on drpcli serch filters. The services to load-balance are determined based on the haproxy/backend/services parameter set on a node. Nodes are determined based on the haproxy/filters parameter.

Alternatively, to use in "standalone mode", the haproxy/backend/map-override and haproxy/frontend/map-override parameters can be set, which will cause the config to be generated without service autodiscovery.

To use in Standalone Mode:

  • Assign haproxy/backend/map-override and haproxy/frontend/map-override on a node
  • Apply universal-application-haproxy-server

To use in Cluster Mode: refer to the Apache content bundle for a full clustered example.

  • Create a cluter profile that assigns a load-balancer and a backend role.

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 }}) backend: pipeline: universal-application-apache-web-server names: 'web01.example.com' Params: haproxy/role: backend haproxy/backend/services: http: 80 ssl: [443, 80443]