Commit Graph

58 Commits

Author SHA1 Message Date
Damian Dabrowski ed8eeba8d3 Implement haproxy_pki_create_certificates variable
In cases when internal and external haproxy frontends should use
different, pre-generated certificates, it's not possible to define them
with haproxy_user_ssl_cert because it accepts only one certificate.
In this case, certificates can be placed manually in pki/ directory.
Unfortunately, with current logic, certificates creation with PKI role
is disabled only when haproxy_user_ssl_cert is defined.
Possibility of explicitly disabling certificates generation will be
really useful.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-os_nova/+/915320/
Change-Id: I4eed4d797160b885d5b7187e6106e6ee0073722f
2024-04-10 10:58:02 +00:00
OpenStack Release Bot 3376636f45 reno: Update master for unmaintained/victoria
Update the victoria release notes configuration to build from
unmaintained/victoria.

Change-Id: I8420d1a72ebc16cc943c5f9aa683188e44460c83
2024-03-14 12:25:36 +00:00
Dmitriy Rabotyagov 67e19ebccd Add HTTP/2 support for frontends/backends
This patch implements extra variables/keys that can be used to
enable HTTP/2 protocol for frontends and backends.

With that patch does not add HTTP/2 support for any redirect frontends
since they can not be configured to use TLS and this it will
cause such redirect backends to be HTTP/2 only, which might break old
clients.

With that regular frontends, that are not terminating TLS can be
configured to be HTTP/2 only as well as TCP backends.

Change-Id: Ib14f031f3c61f31bf7aaf345a3ba635ca5fb9ff8
2023-08-23 13:24:43 +00:00
Zuul 2a60a55cee Merge "Add possibility to override haproxy_ssl_path" 2023-07-19 08:34:17 +00:00
Marc Gariepy 1d83177575 Add possibility to override haproxy_ssl_path
It's now possible to set ssl cert path in case you want to bind to
specific hostname via ``haproxy_bind`` and want to share a common
certificate. set ``haproxy_ssl_path`` to override per service.

Change-Id: Ib517f52c0edbc4ac8d0df2a2ae078c9138141aae
2023-07-13 15:10:46 -04:00
Marc Gariepy 4513bc84ae Add ability to have different backend port.
Add the possibility to have multiple backend services running on
differents ports.

Change-Id: I1748bfc15bdf879f78aa06c385af7b6c45bde7ff
2023-07-13 13:18:19 -04:00
Damian Dabrowski 8168af6635 Deprecate certbot-auto
Certbot-auto is deprecated since 2020[1] and it is no longer available
under https://dl.eff.org/certbot-auto.
This change removes certbot-auto from haproxy_server role leaving
distro method as the only available option.

[1] https://community.letsencrypt.org/t/certbot-auto-deprecated-explanation-and-solutions/139821

Change-Id: Ibe0f13fc7308359d337fb382cb72998befb90d84
2023-04-26 16:47:58 +02:00
Damian Dabrowski a5f285c51e Simplify haproxy_service_configs structure
For historical reasons the ``haproxy_service_configs`` variable was
a list of nested mappings with only single valid key for the top
level mapping.

There have been no use-cases for extra keys, so this patch simplifies
the code by removing one level of nesting.

Change-Id: I50c17b7020a459ab8a88b004cc8828cac857f1c9
2023-03-16 14:19:22 +01:00
Jonathan Rosser d548b7e5ff Add support for haproxy map files
HAProxy supports the use of map files for selecting backends, or
a number of other functions. See [1] and [2].

This patch adds the key `maps` for each service definition allowing
fragments of a complete map to be defined across all the services,
with each service contributing some elements to the overall map file.

The service enabled/disabled and state flags are observed to add and
remove entries from the map file, and individual map entries can also
be marked as present/absent to make inclusion conditional.

[1] https://www.haproxy.com/blog/introduction-to-haproxy-maps/
[2] https://www.haproxy.com/documentation/hapee/latest/configuration/map-files/syntax/

Change-Id: I755c18a4d33ee69c42d68a50daa63614a2b2feb7
2023-03-16 13:17:39 +01:00
Jonathan Rosser 42d80464af Allow default_backend to be specified
Currently default_backend for a service is always set to the
haproxy_service_name for a service, but this might not be what is
required for some configurations.

This patch allows haproxy_default_backend to be configured for
a service to customise the default_backend setting.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible-rabbitmq_server/+/876436
Change-Id: I9e2be37cb27a33350577a93f23b69e560493b320
2023-03-06 11:56:51 +00:00
OpenStack Release Bot 289cfdac03 Update master for stable/zed
Add file to the reno documentation build to show release notes for
stable/zed.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.

Sem-Ver: feature
Change-Id: I819c1252ed66a169de60dcd5f8e88e4bc94c22ab
2022-12-13 13:08:17 +00:00
Dmitriy Rabotyagov 6532898a3c Make use of haproxy_rise and haproxy_fall variables
At the moment for some reason we're not taking into account default
variables haproxy_rise/haproxy_fall but instead trying to count
based on amount of backends. This makes quite little sense to
depend amount of backend rechecks on amount of backends overall,
so we're chaning behaviour to pre-defined variables that already exist.

Change-Id: I1e53a997f6f443718ea2c6bdfbe8a0b98c44896d
2022-12-09 15:44:29 +01:00
Dmitriy Rabotyagov 901523ddbb Allow haproxy to bind on the interface
In some user scenarious (like implementing DNS RR) it might be useful to
bind on 0.0.0.0 but at the same time do not conflict with other services
that are binded to the same ports. For that, we can specify a specific
interface, on which haproxy will be binded to 0.0.0.0.

In netstat it would be represented like `0.0.0.0%br-mgmt:5000`.

With that we also allow to fully override `vip_binds` if assumtions
that role make are not valid for some reason.

Change-Id: Ic4c58ef53abc5f454b6fbebbd87292a932d173ae
2022-08-09 18:47:29 +00:00
Jonathan Rosser 06e76706c7 Allow customisation of stick-tables for each service.
A new variable "haproxy_stick_table" is added which allows a custom
stick-table to be supplied that is used as the default stick-table
for all haproxy back-ends.

In addition, the variable service.haproxy_stick_table can be defined
for each service to allow a unique stick-table to be supplied for
a particular service.

The old default stick-table definition is removed as there was no
use case defined for it in this role before. An example is added
to defaults/main.yml to show how the custom stick-table can be used
to rate-limit requests that generate 4xx responses which commonly
occur during vulnerability scanning or credential stuffing attacks.
There are many other uses for stick-tables, consult the HAProxy
documentation for details.

Change-Id: I50daba08c10f071157d6450ea2fa97df448f99ec
2022-07-11 14:54:01 +00:00
Dmitriy Rabotyagov be9a66c280 Don't restrict haproxy tunable options
Instead of hardcoding specific supported tunable options, we
just pass key as an option to haproxy config.

This change might break deployments during upgrades, since format of
values in variable has changed, but appropriate release note was written

We also increase maxrewrite by default, as otherwise usage of CSP leads
to 500 error.

Change-Id: I949960420ed5dbd6d58f0de7dae0ac629a85b7fc
Related-Bug: https://github.com/haproxy/haproxy/issues/1597
Needed-By: https://review.opendev.org/c/openstack/openstack-ansible-os_horizon/+/844815
2022-06-20 08:27:40 +02:00
Andrew Bonney 0aeaeb590a Adjust default configuration to support TLS v1.3
This adds TLS v1.3 support to the HAProxy role by default, along
with a new variable to manage cipher suites.

The old variable for TLS v1.2 and below ciphers is renamed for
consistency, but is still supported as a default where overridden
by deployments.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/823943
Change-Id: Iaf9709ac5f5ac8db281a9ec7278cef274186ba15
2022-01-10 08:57:40 +00:00
Dmitriy Rabotyagov afa12fbc97 Fix inconsistency in haproxy_frontend_raw naming
We have announced and documented haproxy_frontend_raw variable
while in fact introduced haproxy_raw. Since announced variable name
better reflects its purpose and it was announced,
we rename it to haproxy_frontend_raw in template generation.

Change-Id: I7ba9588b599f42dddad395df1a2e18ccfe6b3fe3
2021-11-12 12:29:57 +02:00
Zuul 1dc4fa621c Merge "Generate self-signed SSL per listen IP" 2021-06-25 17:21:17 +00:00
Dmitriy Rabotyagov f14ba91798 Generate self-signed SSL per listen IP
We're providing an option to have an IP address per VIP
address. Currently it's used only for creating self-signed
SSLs signed with internal CA per each VIP. With follow-up
patches that will also allow to provide user certificates
per VIP, making possible to cover internal and external
endpoints with different non-wildcard certs.

Change-Id: I0a9eb7689eb42b50daf5c94c874bb7429b271efe
2021-06-25 13:30:25 +00:00
James Gibson 3139772435 Add variable to disable stick-table
In some use cases you may want to define your own stick-table and
rules, this can be done using the backend_arguments variables.
As you can have only one stick-table per backend or frontend
the default stick-table needs to be disabled.

I am also not convinved the default stick-table is used for anything,
it just logs requests and never uses the logs, i think it could be
removed.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/797819

Change-Id: I54307c00673ababb277257f2bb0e456e3e011ac4
2021-06-24 11:53:32 +01:00
Dmitriy Rabotyagov f058cf8d61 Replace whitelist with allowlist naming
Change-Id: I568273d0ef1d5ee391a42981e66cc9895b9d71b6
2021-06-16 14:40:19 +03:00
Zuul fbc7a600c4 Merge "Fix HATop for haproxy" 2020-12-30 19:12:39 +00:00
Satish Patel 0ef22fa4df Fix HATop for haproxy
Readjust hatop installtion method, removed haproxy_hatop_downloader and
deployment-host variables. added "haproxy_hatop_install | bool" condition.

Change-Id: I51423fff67e6e427f6c7d163d8d1aac6bcd82ca9
2020-12-30 17:20:42 +00:00
zhangboye 718cc6f388 Add Victoria release info
Add the lack of release information for Victoria, this patch added it.

Change-Id: I4b88f6aaa5841813994d606a7b171ab7fec8db0b
2020-12-29 14:03:38 +08:00
Marc Gariepy ca2c011cf2 Add haproxy_frontend_only and haproxy_raw feature.
you can add prometheus metric exposed directly via haproxy if your
version is recent enough.
https://www.haproxy.com/blog/haproxy-exposes-a-prometheus-metrics-endpoint/

Change-Id: I10e7220071290301a85409a1f74fcbad2743d19d
2020-12-14 19:10:29 +00:00
Dmitriy Rabotyagov 0343893881 Define http-01 params with already provided variables
There's no real need in asking user to manually provide http-01 port and
address when we already have corresponding variables we rely on.

Change-Id: Id0d2a73c863d9bbb8b6280ce42f918127baea354
2020-09-24 09:55:09 +00:00
Andreas Jaeger fe338f3490 Use newer openstackdocstheme and reno versions
The sync from https://review.opendev.org/733244 updated to
openstackdocstheme 2.2.1 and reno 3.1.0 versions.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I208d5939ba7d881588947d51396085dcf6284431
2020-06-03 19:01:27 +02:00
OpenStack Release Bot 8b94c00c63 Update master for stable/ussuri
Add file to the reno documentation build to show release notes for
stable/ussuri.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/ussuri.

Change-Id: Id8b8a6424ebdeb3c81eb50ee20a0662fdf73e054
Sem-Ver: feature
2020-06-01 13:09:33 +00:00
Andreas Jaeger bf243d7c07 Update docstheme for style
New version of openstackdocstheme (Victoria+) respects pygments_style.
Since this repo is using now Victoria (master) requirements but has
not branched for Ussuri yet, it uses the new version.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

Change-Id: I3643bb9d00bb4109ec133e072b889a72f5a3248e
2020-05-20 18:44:51 +02:00
Jonathan Rosser ebf2674d6b Add releasenote for HA configuration of LetsEncrypt/Certbot
Change-Id: I7bbd51f6b693593be04f11c695b149fad1237bd3
2020-05-12 07:33:46 +01:00
OpenStack Release Bot 456efa2466 Update master for stable/train
Add file to the reno documentation build to show release notes for
stable/train.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/train.

Change-Id: I2c9de88a70316f7bda507dd3e82d20a80de1ac30
Sem-Ver: feature
2019-10-22 18:54:07 +00:00
liuwei 806a2ce9ad update git.openstack.org to opendev
Change-Id: I33e06926970d543f3f2df190c3346f8a7b51765e
2019-09-26 08:36:44 +00:00
OpenStack Release Bot b1b961dbc9 Update master for stable/stein
Add file to the reno documentation build to show release notes for
stable/stein.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/stein.

Change-Id: Idf442d5b01f54206fdff44022995e6b2eda90b0f
Sem-Ver: feature
2019-04-08 09:14:59 +00:00
Frank Kloeker 4fb2059a3b Add feature Letsencrypt SSL certification
- installs certbot-auto
- generates and validates ssl cert
- installs cert in haproxy settings
- renew cert with cron

Change-Id: Iea59ec2893a988b184ca8bc70e1d273ac071551e
2019-01-17 17:54:50 +01:00
Matthew Thode 547d7f91be
Force force-tlsv12 only
Secure by default

Change-Id: I70007af94bfd5e482662ab72d25bf090cf5d0834
2018-12-13 14:20:37 -06:00
OpenStack Release Bot e156ab39cc Update reno for stable/rocky
Change-Id: I196be7531999af51ce0b1d1ce8e24aee8fd323dc
2018-08-10 16:44:52 +00:00
OpenStack Release Bot 4a97595cda Update reno for stable/queens
Change-Id: I59834ac499c1e03f51ead4ce7506cc399f096e45
2018-02-14 15:45:30 +00:00
Major Hayden 6c588e41b4
Make haproxy stats refresh interval configurable
This patch adds a new variable, ``haproxy_stats_refresh_interval``,
which allows a deployer to configure their preferred refresh
interval for the haproxy stats page.

Release notes are included.

Closes-Bug: 1742526
Change-Id: I3979299478a8e9b479a4c4e821f2a45e1b2679cb
2018-01-10 13:14:15 -06:00
Andy McCrae d2b2492c16 Add ability to manage non-inventory hosts
We may want to load balance to existing services that we aren't managing
via ansible. Currently the hosts have to exist in the inventory in order
to add a VIP for these hosts, this patch adds the ability to set the
hostnames and addresses of the hosts manually when they aren't in the
ansible inventory.

Additionally, this patch adds a test for both the group method and the
host_lists method.

Change-Id: Ida66f401d8320d9bf14eac9b8014124631978808
2017-12-14 16:37:07 +10:00
Andreas Jaeger 85e3f01851 Remove setting of version/release from releasenotes
Release notes are version independent, so remove version/release
values. We've found that projects now require the service package
to be installed in order to build release notes, and this is entirely
due to the current convention of pulling in the version information.

Release notes should not need installation in order to build, so this
unnecessary version setting needs to be removed.

This is needed for new release notes publishing, see
I56909152975f731a9d2c21b2825b972195e48ee8 and the discussion starting
at
http://lists.openstack.org/pipermail/openstack-dev/2017-November/124480.html
.

Change-Id: I78073078b2778f69479bb84846b0c46687be7aed
2017-11-17 07:43:28 +01:00
Jesse Pretorius 3890acfd15 Initial OSA zuul v3 role jobs
This patch implements an initial set of jobs intended to match
the current job execution method. It does not intend to improve
how the jobs are executed - only to replicate what is currently
in openstack-infra/openstack-zuul-jobs and provide the platform
to iterate on.

Change-Id: I199286c59a3f139fe2d3b2a1670ab566e4316b9d
2017-10-18 09:52:48 +01:00
Jesse Pretorius 2470c01693 Remove unused/unnecessary haproxy_server vars/files
The repo/keys are left over from Newton/Trusty and
were not removed when Trusty support was removed.

The required packages were only necessary in order
to facilitate the repo addition.

The var haproxy_distro_packages is defined in all
distro-specific vars files, so its presence in
defaults is unnecessary.

The apt pinning meta dependency is no longer
required - it's another leftover from Ubuntu Trusty.
A task is included to remove the old config files.

Change-Id: I912cd170d05c4a9befe3420971ddf68ff2ddde2b
2017-08-21 13:21:58 +01:00
OpenStack Release Bot 5d8c96cda7 Update reno for stable/pike
Change-Id: Id6f9e559942ec6a130d30779eeb115dec4813879
2017-08-18 12:31:12 +00:00
ZhongShengping c00473fb84 Fix openstackdocstheme settings
To use openstackdocstheme 1.11.0 properly, this patch fixes
some settings according to follow[0].

[0]https://docs.openstack.org/openstackdocstheme/latest/

Change-Id: I1b26b63f9242940a613c1c5e97effe11b6eb6fd9
2017-07-03 16:10:52 +08:00
ZhongShengping 3bf590eb0c Switch from oslosphinx to openstackdocstheme
As part of the docs migration work[0] for Pike we need to switch to use the
openstackdocstheme.

[0]https://review.openstack.org/#/c/472275/

Change-Id: I1d66978526d605cc1821d498392b7153bf47e47b
2017-06-26 13:51:12 +08:00
Bjoern Teipel 406077ac46 Adding HAProxy backend options
Support for backend options is added to support
arbitrary haproxy options like http-check or tcp-check

Change-Id: I0a5761c14e0bf27ac36d4f27522fbb756bb70950
Related-To: #1681695
2017-04-19 12:22:21 -05:00
Andrey 8f8543f81a Mentioned haproxy_bufsize option removal
Release note mentiones removal of the option in master branch.

Change-Id: I5a9221ce7072eaab5a419f4b0f7d668cdb000921
2017-03-17 19:30:34 +00:00
Andrey c477565acb Added Haproxy global tunables
Max number of connection may be set up, as well as major tunables
may be added as the variables.

Change-Id: I5b333b79680d81b030810a7e94e3cc4bfe724649
2017-03-15 18:06:16 -05:00
Jenkins a73e1ac20f Merge "Update reno for stable/ocata" 2017-02-06 09:33:44 +00:00
gecong1973 72fe9bca01 Use https instead of http for git.openstack.org
TrivialFix

Change-Id: I0cedec6f9a558cb6379527e8b28175ac96ef31b2
2017-02-06 12:13:55 +08:00