8168af663584e3487bb6ba92cc4f9f93bce18abd
451 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
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 |
||
|
Damian Dabrowski
|
7f76625f9d |
Define blank _haproxy_service_configs_simplified
With current behavior, when haproxy role is imported multiple times in the same playbook(by setup-openstack.yml as an example), variable `_haproxy_service_configs_simplified` never gets purged so ansible just keeps appending services this list. To avoid this situation, `_haproxy_service_configs_simplified` has to be explicitly defined as a blank list at the begining. Change-Id: If62ec18842609957f09e0161a524fea88910ce9e |
||
|
Damian Dabrowski
|
0f7b091244 |
Allow haproxy role to create security.txt file
This patch allows haproxy role to create security.txt file. Change-Id: Ided790a5a89a2298b3b758d4484b25091b92945b |
||
|
Zuul
|
0dd2a4dc8c | Merge "Fix haproxy_service_configs format conversion" | ||
|
Zuul
|
35e45a66b1 | Merge "Provide custom handler name to PKI role" | ||
|
Zuul
|
3125313653 | Merge "Add tasks to configure external services only" | ||
|
Damian Dabrowski
|
e6f7f2ce0c |
Fix haproxy_service_configs format conversion
In [1] new, simplified haproxy_service_configs format was introduced. Temporary conversion from old vormat was added but it doesn't cover map files. This change adds format conversion also for map files feature. [1] https://review.opendev.org/c/openstack/openstack-ansible-haproxy_server/+/871188 Change-Id: If9c57bb61d3ae8d50f69780fe54a26ac0d67656a |
||
|
Dmitriy Rabotyagov
|
47515d4b7c |
Provide custom handler name to PKI role
At the moment PKI and haproxy do listen for the same notify, which results in haproxy trying to generate certs in inappropriate places. This patch starts leveraging `pki_handler_cert_installed` variable that enables us to trigger haproxy certificate assemble only when required and expected. Co-Authored-By: Damian Dąbrowski <damian@dabrowski.cloud> Depends-On: https://review.opendev.org/c/openstack/ansible-role-pki/+/875757 Change-Id: I66f648e5c3104f71d6601a493b09f8cdcc3332fc |
||
|
Dmitriy Rabotyagov
|
2476ad1c53 |
Add tasks to configure external services only
This change allows specific playbooks to configure their haproxy service(s) separately by running the role and using tasks_from to execute just the service template installation code path. Change-Id: I88ce0eb92784b3d3a0d1a952e95a8eb1fa376e77 Co-Authored-By: Damian Dąbrowski <damian@dabrowski.cloud> |
||
|
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 |
||
|
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 |
||
|
Zuul
|
56fef3de83 | Merge "Allow default_backend to be specified" | ||
|
Zuul
|
0c69464fa1 | Merge "Serialise initial issuing of LetsEncrypt certificates" | ||
|
Zuul
|
23b18f89da | Merge "Fix tags usage for letsencrypt setup" | ||
|
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 |
||
|
Zuul
|
044d65e9bb | Merge "Accept both HTTP and HTTPS also for external VIP during upgrade" | ||
|
Jonathan Rosser
|
34f153b139 |
Serialise initial issuing of LetsEncrypt certificates
Currently the role will run against all target hosts, and it is possible that the calling playbook runs with a serial: setting to control how many hosts are targetted simultaneously. However, this is not sufficient to guarantee that each potential haproxy server requests a LetsEncrypt certificate sequentially. It is only possible for the loadbalancer to direct the challenge from the ACME server to one certbot instance at a time, so this patch enforces serialisation of the initial certificate generation regardless of the number of target hosts and setting of serial: outside this role. Change-Id: If8ae64bc01510d3570fa4c554463bd6121b21f86 |
||
|
Dmitriy Rabotyagov
|
6c4a2b8eaa |
Fix tags usage for letsencrypt setup
We haven't specified tags for let's encrypt task which resulted in task not being executed when using them. Change-Id: I294e962bdb796190d1e7a2555708fbfaa8384a0a Co-Authored-By: Damian Dąbrowski <damian@dabrowski.cloud> |
||
|
Zuul
|
7dea60f263 | Merge "Move selinux fix to haproxy_post_install.yml" | ||
|
Zuul
|
8514c0d775 | Merge "Add a variable to allow extra raw config to be applied to all frontends" | ||
|
Zuul
|
a9aee345b8 | Merge "Use let's encrypt standalone flag only for http-01" | ||
|
Damian Dabrowski
|
a30ecbee08 |
Accept both HTTP and HTTPS also for external VIP during upgrade
In change [1] we have added functionality to accept both HTTP and HTTPS during an upgrade. However it's only limited to internal VIP. I see no reason not to implement this also for external VIP. Some people may find it useful. [1] https://review.opendev.org/c/openstack/openstack-ansible-haproxy_server/+/829899 Change-Id: I672016b75d4b514d87dbb47119ff549bbc4e923e |
||
|
Jonathan Rosser
|
0d56cfe64b |
Update hatop to latest release, 0.8.2
Change-Id: I300206a79fcb9e809c1ae714f492583fb9d4e363 |
||
|
Jonathan Rosser
|
f7c87fd118 |
Add a variable to allow extra raw config to be applied to all frontends
Currently this must be configured on a per-frontend basis through service.haproxy_frontend_raw. This patch adds a new role default variable haproxy_frontend_extra_raw which will be combined with all per service raw config lines. Change-Id: I506d46d64df93bbb9e6d1ebfa3d3caa44c80fdd5 |
||
|
Damian Dabrowski
|
d5b3bdba20 |
Move selinux fix to haproxy_post_install.yml
haproxy_service_config.yml is not a valid place for selinux fix. It should be moved to haproxy_post_install.yml. Change-Id: Ice55e1cd9fdbac6e564c7f084dc1a020940a0da8 |
||
|
Dmitriy Rabotyagov
|
908427222b |
Use let's encrypt standalone flag only for http-01
In case of using dns-01 challange deployers might want to avoid using standalone flag. Change-Id: I3c6cfd7779e9ec9322e655cdda5bb6866bf695ca Closes-Bug: #2006938 |
||
|
Andrew Bonney
|
445b15f9c3 |
Fix dict object key error when haproxy interfaces not defined
The ternary options appear to be getting evaluated whether they are used or not, so item['interface'] is always accessed. This patch aims to check for the key's presence before performing ternary operations, or use Ansible variables to postpone evaluation until absolutely necessary. Change-Id: Ib1462c04d1a0820a37998f989e2ed16566f71f54 |
||
|
Dmitriy Rabotyagov
|
a5daa83172 |
Update tox.ini to work with 4.0
With tox release of 4.0, some parameters were deprecated and are ignored now which causes tox failures. One of the most spread issues we have is using `whitelist_externals` isntead of `allowlist_externals` Change-Id: I73cad1846dd3fbcbf9e3317227c472d769d1e7b6 |
||
| 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 |
|||
|
Zuul
|
fd3ba428d9 | Merge "Fix warnings in haproxy config" | ||
|
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 |
||
|
Damian Dabrowski
|
34ac0710c5 |
Fix warnings in haproxy config
Haproxy config check(/usr/sbin/haproxy -c -f /etc/haproxy/haproxy.cfg) returns 3 warnings: 1. keyword 'forceclose' is deprecated in favor of 'httpclose', and will not be supported by future versions. 2. backend 'galera-back' : 'option tcplog' directive is ignored in backends. 3. 'http-request' rules ignored for backend 'galera-back' as they require HTTP mode. This change fixes 1. and 2. Fixing 3. will be a bit more tricky as it's a part of `openstack_haproxy_stick_table` defined in /opt/openstack-ansible/inventory/group_vars/haproxy/haproxy.yml Change-Id: Idaa4b5580039857435f90416924dee26a702deba |
||
|
Zuul
|
31e30e3fe0 | Merge "Allow do disable SSL only for stats frontend" | ||
|
Dmitriy Rabotyagov
|
9fc079a65d |
Validate haproxy conf after assemble
Right now we don't ensure haproxy conf validity and if it's incorrect role will fail on attempt to reload haproxy. However it's really worth adding validation step and do not proceed if configuration is wrong Change-Id: I54717d4f7230b8d8dff2d293592831cc88c51d24 |
||
|
Dmitriy Rabotyagov
|
6025eaac36 |
Allow do disable SSL only for stats frontend
Currently there is no way of disabling SSL connection for stats frontend as it implies more global variable. However, for some systems consuming self-signed root certificate might be not an option and disabling SSL verification tricky. Thus, we introduce new variable that allows to nicely control if SSL should be served for stats frontend or not. Change-Id: Ic4bc4393ec89469876e9e95b12bb9c4069972713 |
||
|
Zuul
|
a502817a89 | Merge "Allow haproxy to bind on the interface" | ||
|
Zuul
|
d41b3bd0eb | Merge "Remove redundant vars line" | ||
|
Zuul
|
c1df0a5b56 |
Merge "Add variable for setting certbot domains option"
|
||
|
Danila Balagansky
|
1664c993b6 |
Add variable for setting certbot domains option
Add `haproxy_ssl_letsencrypt_domains` variable, which contains a list (defaults to `external_lb_vip_address`) for `--domains` certbot option. Change-Id: I2ebfff9eeb5279a3964b8578a6e66aa132d763f5 |
||
|
Erik Berg
|
d1d9dead6c |
Remove redundant vars line
This line was introduced by Ib4f33185202b694b9611cc5fd6323c30a1c8d489 for multi-os support, but should since be covered by the distribution_major_version line above, introduced at a later date. Change-Id: I23a8e7aaa3858bce47dcf7610acf1ee58d9e1fc1 |
||
|
Zuul
|
23980cfe4e | Merge "Do not add cacert when it does not exist" | ||
|
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 |
||
|
Dmitriy Rabotyagov
|
dd842f4eb4 |
Do not add cacert when it does not exist
Right now we assume, that ca-cert is always present. Though, it might not be the case for user-provided certs or let's encrypt, as they are already in ca-certificates. Change-Id: I101f82c5e378596e76a160aacb34a9e1e7e0c123 |
||
|
Andrew Bonney
|
8dc0ff4e1f |
tls1.2: update ciphers to latest recommendations
Based upon usual recommendations from: https://hynek.me/articles/hardening-your-web-servers-ssl-ciphers/ Change-Id: I6e549ab3ffcacebe04e188cbf34d8707fb0fe05d |
||
|
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 |
||
|
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 |
||
|
Dmitriy Rabotyagov
|
8a81b355d8 |
Switch sphinx language to en
With sphinx release of 5.0.0, they changed default for language variable to 'en' from None. With that current None valuable is not valid and should not be used. Change-Id: Ibea41d4f472fa7b375d9d04e94ad621696f565b1 |
||
|
Zuul
|
2336b468c6 | Merge "Add functionality to accept both HTTP and HTTPS during upgrade" | ||
|
OpenStack Proposal Bot
|
13e79b2cd7 |
Updated from OpenStack Ansible Tests
Change-Id: I786353945ca45d16d91678d65610a97798bf98f0 |
||
|
Jonathan Rosser
|
d339d576b0 |
Cleanup setup.py config
Change-Id: Idea36d3b3fd8cdeb04e76f9b3ec7da24eac99b83 |