HAProxy extra endpoints
Allow the operator to define a list of additional HAProxy endpoints without overriding the entire haproxy_service_configs list. This moves the default endpoints to a var called haproxy_default_services and combines the default services list with haproxy_extra_services if defined. Change-Id: I701a6e8740c0afa326b6e2310b46822c37a3e50d
This commit is contained in:
parent
4813b7cdf0
commit
693911d520
@ -146,6 +146,27 @@ certificates and keys to use with HAProxy.
|
|||||||
|
|
||||||
.. _Securing services with SSL certificates: configure-sslcertificates.html
|
.. _Securing services with SSL certificates: configure-sslcertificates.html
|
||||||
|
|
||||||
|
Configuring additional services
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
|
Additional haproxy service entries can be configured by setting
|
||||||
|
``haproxy_extra_services`` in ``/etc/openstack_deploy/user_variables.yml``
|
||||||
|
|
||||||
|
For more information on the service dict syntax, please reference
|
||||||
|
``playbooks/vars/configs/haproxy_config.yml``
|
||||||
|
|
||||||
|
An example HTTP service could look like:
|
||||||
|
|
||||||
|
.. code-block:: yaml
|
||||||
|
|
||||||
|
haproxy_extra_services:
|
||||||
|
- service:
|
||||||
|
haproxy_service_name: extra-web-service
|
||||||
|
haproxy_backend_nodes: "{{ groups['service_group'] | default([]) }}"
|
||||||
|
haproxy_ssl: "{{ haproxy_ssl }}"
|
||||||
|
haproxy_port: 10000
|
||||||
|
haproxy_balance_type: http
|
||||||
|
|
||||||
--------------
|
--------------
|
||||||
|
|
||||||
.. include:: navigation.txt
|
.. include:: navigation.txt
|
||||||
|
@ -101,6 +101,7 @@
|
|||||||
- haproxy-service-config
|
- haproxy-service-config
|
||||||
roles:
|
roles:
|
||||||
- role: "haproxy_server"
|
- role: "haproxy_server"
|
||||||
|
haproxy_service_configs: "{{ haproxy_default_services + haproxy_extra_services|default([]) }}"
|
||||||
tags:
|
tags:
|
||||||
- "haproxy-server"
|
- "haproxy-server"
|
||||||
- role: "rsyslog_client"
|
- role: "rsyslog_client"
|
||||||
@ -114,4 +115,3 @@
|
|||||||
- vars/configs/haproxy_config.yml
|
- vars/configs/haproxy_config.yml
|
||||||
vars:
|
vars:
|
||||||
is_metal: "{{ properties.is_metal|default(false) }}"
|
is_metal: "{{ properties.is_metal|default(false) }}"
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
haproxy_service_configs:
|
haproxy_default_services:
|
||||||
- service:
|
- service:
|
||||||
haproxy_service_name: galera
|
haproxy_service_name: galera
|
||||||
haproxy_backend_nodes: "{{ [groups['galera_all'][0]] | default([]) }}" # list expected
|
haproxy_backend_nodes: "{{ [groups['galera_all'][0]] | default([]) }}" # list expected
|
||||||
|
@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- Added a new ``haproxy_extra_services`` var which will allow extra haproxy
|
||||||
|
endpoint additions.
|
||||||
|
deprecations:
|
||||||
|
- Moved ``haproxy_service_configs`` var to ``haproxy_default_service_configs``
|
||||||
|
so that ``haproxy_service_configs`` can be modified and added to without
|
||||||
|
overriding the entire default service dict.
|
Loading…
x
Reference in New Issue
Block a user