11.. _readme :
22
33haproxy-formula
4- ================
4+ ===============
55
66|img_travis | |img_sr |
77
@@ -14,8 +14,7 @@ haproxy-formula
1414 :scale: 100%
1515 :target: https://github.com/semantic-release/semantic-release
1616
17- A SaltStack formula that is empty. It has dummy content to help with a quick
18- start on a new formula and it serves as a style guide.
17+ Install, configure and run ``haproxy ``.
1918
2019.. contents :: **Table of Contents**
2120 :depth: 1
@@ -46,7 +45,8 @@ Please see `How to contribute <https://github.com/saltstack-formulas/.github/blo
4645Special notes
4746-------------
4847
49- None
48+ Use the supplied haproxy.cfg for a flat file approach,
49+ or the jinja template and the pillar for a salt approach.
5050
5151Available states
5252----------------
@@ -74,6 +74,51 @@ This state will install the haproxy package only.
7474This state will configure the haproxy service and has a dependency on ``haproxy.install ``
7575via include list.
7676
77+ Currently, only a handful of options can be set using the pillar:
78+
79+ - Global
80+
81+ + stats: enable stats, currently only via a unix socket which can be set to a path with custom permissions and optional extra bind arguments
82+ + user: sets the user haproxy shall run as
83+ + group: sets the group haproxy shall run as
84+ + chroot: allows you to turn on chroot and set a directory
85+ + daemon: allows you to turn daemon mode on and off
86+
87+ - Default
88+
89+ + log: set the default log
90+ + mode: sets the mode (i.e. http)
91+ + retries: sets the number of retries
92+ + options: an array of options that is simply looped with no special treatment
93+ + timeouts: an array of timeouts that is simply looped with no special treatment
94+ + errorfiles: an array of k:v errorfiles to point to the correct file matching an HTTP error code
95+
96+ - Frontend; Frontend(s) is a list of the frontends you desire to have in your haproxy setup
97+ Per frontend you can set:
98+
99+ + name: the name haproxy will use for the frontend
100+ + bind: the bind string: this allows you to set the IP, Port and other paramters for the bind
101+ + redirect: add a redirect line, an unparsed string like in the backend
102+ + reqadd: an array of reqadd statements. Looped over and put in the configuration, no parsing
103+ + default_backend: sets the default backend
104+ + acls: a list of acls, not parsed, simply looped and put in to the configuration
105+ + blocks: a list of block statements, not parsed, simply looped and put in to the configuration
106+ + use_backends: a list of use_backend statements, looped over, not parsed
107+
108+ - Backend; Backend(s) is a list of the backends you desire to have in your haproxy setup, per backend you can set:
109+
110+ + name: set the backend name, used in the frontend references by haproxy
111+ + balance: set the balance type, string
112+ + redirect: if set, can be used to redirect; simply a string, not parsed
113+ + servers: a list of servers this backend will contact, is looped over; per server you can set:
114+
115+ + name: name of the server for haproxy
116+ + host: the host to be contacted
117+ + port: the port to contact the server on
118+ + check: set to check to enable checking
119+
120+ - For global, default, frontend, listener, backend and server it is possible to use the "extra" option for more rare settings not mentioned above.
121+
77122``haproxy.service ``
78123^^^^^^^^^^^^^^^^^^^^
79124
0 commit comments