All Projects → sous-chefs → Haproxy

sous-chefs / Haproxy

Licence: apache-2.0
Development repository for the haproxy cookbook

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Haproxy

Docker
Development repository for the docker cookbook
Stars: ✭ 1,253 (+807.97%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Iis
Development repository for the iis cookbook
Stars: ✭ 79 (-42.75%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Nginx
Development repository for the nginx cookbook
Stars: ✭ 528 (+282.61%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Etcd
Development repository for the etcd cookbook
Stars: ✭ 71 (-48.55%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Homebrew
Development repository for the homebrew cookbook
Stars: ✭ 137 (-0.72%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Erlang
Development repository for the erlang cookbook
Stars: ✭ 78 (-43.48%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Openssh
Development repository for the openssh cookbook
Stars: ✭ 108 (-21.74%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Rvm
Development repository for the rvm cookbook
Stars: ✭ 525 (+280.43%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Logrotate
Development repository for the logrotate cookbook
Stars: ✭ 122 (-11.59%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Percona
Development repository for the percona cookbook
Stars: ✭ 117 (-15.22%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Chef Splunk
Development repository for the chef-splunk cookbook
Stars: ✭ 70 (-49.28%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Nagios
Development repository for the nagios cookbook
Stars: ✭ 127 (-7.97%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Grafana
Development repository for the grafana cookbook
Stars: ✭ 69 (-50%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Openvpn
Development repository for the openvpn cookbook
Stars: ✭ 102 (-26.09%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Rsyslog
Development repository for the rsyslog cookbook
Stars: ✭ 66 (-52.17%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Powershell
Development repository for the powershell cookbook
Stars: ✭ 104 (-24.64%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Jenkins
Development repository for the jenkins cookbook
Stars: ✭ 416 (+201.45%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Aws
Development repository for the aws cookbook
Stars: ✭ 473 (+242.75%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Git
Development repository for the git cookbook
Stars: ✭ 117 (-15.22%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource
Ruby build
Development repository for the ruby_build cookbook
Stars: ✭ 124 (-10.14%)
Mutual labels:  hacktoberfest, chef, chef-cookbook, chef-resource

haproxy Cookbook

CI State Cookbook Version OpenCollective OpenCollective License

Installs and configures HAProxy.

Maintainers

This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.

Requirements

  • HAProxy stable or LTS
  • Chef 13.9+

Platforms

This cookbook officially supports and is tested against the following platforms:

  • debian: 8 & 9
  • ubuntu: 16.04 & 18.04
  • centos: 7
  • amazonlinux: 2

PRs are welcome to add support for additional platforms.

Examples

Please check for working examples in TEST

Common Resource Features

HAProxy has many configurable options available, this cookbook makes the most popular options available as resource properties.

If you wish to use a HAProxy property that is not listed the extra_options hash is available to take in any number of additional values.

For example, the ability to disable listeners is not provided out of the box. Further examples can be found in either test/fixtures/recipes or spec/test/recipes. If you have questions on how this works or would like to add more examples so it is easier to understand, please come talk to us on the Chef Community Slack on the #sous-chefs channel.

haproxy_listen 'disabled' do
  bind '0.0.0.0:1337'
  mode 'http'
  extra_options('disabled': '')
end

The extra_options hash is of String => String or String => Array. When an Array value is provided. The values are looped over mapping the key to each value in the config.

For example:

haproxy_listen 'default' do
  extra_options(
    'http-request' => [ 'set-header X-Public-User yes', 'del-header X-Bad-Header' ]
    )
end

Becomes:

listen default
  ...
  http-request set-header X-Public-User yes
  http-request del-header X-Bad-Header

Resources

Configuration Validation

The haproxy.cfg file has a few specific rule orderings that will generate validation errors if not loaded properly. If using any combination of the below rules, avoid the errors by loading the rules via extra_options to specify the top down order as noted below in config file.

frontend & listen

  tcp-request connection
  tcp-request session
  tcp-request content
  monitor fail
  block (deprecated)
  http-request
  reqxxx (any req excluding reqadd, e.g. reqdeny, reqallow)
  reqadd
  redirect
  use_backend
  extra_options(
    'tcp-request' => 'connection set-src src,ipmask(24)',
    'reqdeny' => '^Host:\ .*\.local',
    'reqallow' => '^Host:\ www\.',
    'use_backend' => 'dynamic'
  )

backend

  http-request
  reqxxx (any req excluding reqadd, e.g. reqdeny, reqallow)
  reqadd
  redirect
  extra_options(
    'http-request' => 'set-path /%[hdr(host)]%[path]',
    'reqdeny' => '^Host:\ .*\.local',
    'reqallow' => '^Host:\ www\.',
    'redirect' => 'dynamic'
  )

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

https://opencollective.com/sous-chefs/sponsor/0/website https://opencollective.com/sous-chefs/sponsor/1/website https://opencollective.com/sous-chefs/sponsor/2/website https://opencollective.com/sous-chefs/sponsor/3/website https://opencollective.com/sous-chefs/sponsor/4/website https://opencollective.com/sous-chefs/sponsor/5/website https://opencollective.com/sous-chefs/sponsor/6/website https://opencollective.com/sous-chefs/sponsor/7/website https://opencollective.com/sous-chefs/sponsor/8/website https://opencollective.com/sous-chefs/sponsor/9/website

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].