Skip to content
Snippets Groups Projects
Commit ff7c1741 authored by Zuul's avatar Zuul Committed by Gerrit Code Review
Browse files

Merge "Add variables for API VIP address and FQDN"

parents 4d965689 1862e24b
No related branches found
No related tags found
No related merge requests found
...@@ -550,6 +550,27 @@ kolla_ansible_default_custom_passwords: ...@@ -550,6 +550,27 @@ kolla_ansible_default_custom_passwords:
# passwords file. # passwords file.
kolla_ansible_custom_passwords: "{{ kolla_ansible_default_custom_passwords }}" kolla_ansible_custom_passwords: "{{ kolla_ansible_default_custom_passwords }}"
###############################################################################
# OpenStack API addresses.
# Virtual IP address of OpenStack internal API. Default is the vip_address
# attribute of the internal network.
kolla_internal_vip_address: "{{ internal_net_name | net_vip_address }}"
# Fully Qualified Domain Name (FQDN) of OpenStack internal API. Default is the
# fqdn attribute of the internal network if set, otherwise
# kolla_internal_vip_address.
kolla_internal_fqdn: "{{ internal_net_name | net_fqdn or kolla_internal_vip_address }}"
# Virtual IP address of OpenStack external API. Default is the vip_address
# attribute of the external network.
kolla_external_vip_address: "{{ public_net_name | net_vip_address }}"
# Fully Qualified Domain Name (FQDN) of OpenStack external API. Default is the
# fqdn attribute of the external network if set, otherwise
# kolla_external_vip_address.
kolla_external_fqdn: "{{ public_net_name | net_fqdn or kolla_external_vip_address }}"
############################################################################### ###############################################################################
# TLS certificate bundle management # TLS certificate bundle management
......
...@@ -27,12 +27,6 @@ ...@@ -27,12 +27,6 @@
tags: tags:
- kolla-ansible - kolla-ansible
gather_facts: false gather_facts: false
vars:
# We need to reference configuration for the network node.
# We pick the first host from the group for this. It is possible that at
# this point these groups have no hosts in, and we should handle that case
# gracefully.
network_host: "{{ groups['network'][0] }}"
pre_tasks: pre_tasks:
# Configuration of extra user-provided Kolla globals. # Configuration of extra user-provided Kolla globals.
- block: - block:
...@@ -52,46 +46,29 @@ ...@@ -52,46 +46,29 @@
- config - config
# Configuration and validation of network host networking. # Configuration and validation of network host networking.
- block: - name: Validate Kolla Ansible API address configuration
- name: Set facts containing the VIP addresses and FQDNs fail:
set_fact: msg: >
kolla_internal_vip_address: "{{ internal_net_name | net_vip_address }}" The Kolla Ansible variable {{ item.var_name }}
kolla_internal_fqdn: "{{ internal_net_name | net_fqdn or internal_net_name | net_vip_address }}" ({{ item.description }}) is invalid. Value:
kolla_external_vip_address: "{{ public_net_name | net_vip_address }}" "{{ hostvars[inventory_hostname][item.var_name] | default('<undefined>') }}".
kolla_external_fqdn: "{{ public_net_name | net_fqdn or public_net_name | net_vip_address }}" when:
when: kolla_enable_haproxy | bool - groups['network'] | length > 0
- item.required | bool
- name: Set facts containing the VIP addresses and FQDNs - hostvars[inventory_hostname][item.var_name] is not defined or not hostvars[inventory_hostname][item.var_name]
set_fact: with_items:
kolla_internal_vip_address: "{{ internal_net_name | net_ip(network_host) }}" - var_name: "kolla_internal_vip_address"
kolla_internal_fqdn: "{{ internal_net_name | net_ip(network_host) }}" description: "Internal API VIP address"
kolla_external_vip_address: "{{ public_net_name | net_ip(network_host) }}" required: True
kolla_external_fqdn: "{{ public_net_name | net_ip(network_host) }}" - var_name: "kolla_internal_fqdn"
when: not kolla_enable_haproxy | bool description: "Internal API Fully Qualified Domain Name (FQDN)"
required: True
- name: Validate Kolla Ansible API address configuration - var_name: "kolla_external_vip_address"
fail: description: "external API VIP address"
msg: > required: True
The Kolla Ansible variable {{ item.var_name }} - var_name: "kolla_external_fqdn"
({{ item.description }}) is invalid. Value: description: "External API Fully Qualified Domain Name (FQDN)"
"{{ hostvars[inventory_hostname][item.var_name] | default('<undefined>') }}". required: True
when:
- item.required | bool
- hostvars[inventory_hostname][item.var_name] is not defined or not hostvars[inventory_hostname][item.var_name]
with_items:
- var_name: "kolla_internal_vip_address"
description: "Internal API VIP address"
required: True
- var_name: "kolla_internal_fqdn"
description: "Internal API Fully Qualified Domain Name (FQDN)"
required: True
- var_name: "kolla_external_vip_address"
description: "external API VIP address"
required: True
- var_name: "kolla_external_fqdn"
description: "External API Fully Qualified Domain Name (FQDN)"
required: True
when: groups['network'] | length > 0
tags: tags:
- config - config
- config-validation - config-validation
......
...@@ -59,16 +59,6 @@ ...@@ -59,16 +59,6 @@
tags: tags:
- grafana - grafana
pre_tasks: pre_tasks:
- name: Set fact for the VIP address
set_fact:
kolla_internal_vip_address: "{{ internal_net_name | net_vip_address }}"
when: kolla_enable_haproxy | bool
- name: Set fact for the VIP address
set_fact:
kolla_internal_vip_address: "{{ internal_net_name | net_ip }}"
when: not kolla_enable_haproxy | bool
- name: Include Kolla passwords for Grafana local admin account credentials - name: Include Kolla passwords for Grafana local admin account credentials
include_vars: "{{ kayobe_config_path }}/kolla/passwords.yml" include_vars: "{{ kayobe_config_path }}/kolla/passwords.yml"
roles: roles:
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
- public-openrc - public-openrc
vars: vars:
public_api_proto: "{% if kolla_enable_tls_external | bool %}https{% else %}http{% endif %}" public_api_proto: "{% if kolla_enable_tls_external | bool %}https{% else %}http{% endif %}"
public_api_host: "{{ public_net_name | net_fqdn or public_net_name | net_vip_address }}" public_api_host: "{{ kolla_external_fqdn }}"
public_api_keystone_port: 5000 public_api_keystone_port: 5000
roles: roles:
- role: public-openrc - role: public-openrc
......
...@@ -225,6 +225,32 @@ OpenStack services. This is not usually advisable in production. ...@@ -225,6 +225,32 @@ OpenStack services. This is not usually advisable in production.
--- ---
kolla_openstack_logging_debug: true kolla_openstack_logging_debug: true
API Addresses
-------------
.. note::
These variables should be used over the deprecated ``vip_address`` and
``fqdn`` `network attributes <configuration-network-global>`
The following variables affect the addresses used for the external and internal
API.
``kolla_internal_vip_address``
Virtual IP address of OpenStack internal API. Default is the
``vip_address`` attribute of the internal network.
``kolla_internal_fqdn``
Fully Qualified Domain Name (FQDN) of OpenStack internal API. Default is
the ``fqdn`` attribute of the internal network if set, otherwise
``kolla_internal_vip_address``.
``kolla_external_vip_address``
Virtual IP address of OpenStack external API. Default is the
``vip_address`` attribute of the external network.
``kolla_external_fqdn``
Fully Qualified Domain Name (FQDN) of OpenStack external API. Default is
the ``fqdn`` attribute of the external network if set, otherwise
``kolla_external_vip_address``.
TLS Encryption of APIs TLS Encryption of APIs
---------------------- ----------------------
......
...@@ -10,6 +10,8 @@ that define the network's attributes. For example, to configure the ``cidr`` ...@@ -10,6 +10,8 @@ that define the network's attributes. For example, to configure the ``cidr``
attribute of a network named ``arpanet``, we would use a variable named attribute of a network named ``arpanet``, we would use a variable named
``arpanet_cidr``. ``arpanet_cidr``.
.. _configuration-network-global:
Global Network Configuration Global Network Configuration
============================ ============================
...@@ -42,8 +44,18 @@ supported: ...@@ -42,8 +44,18 @@ supported:
``mtu`` ``mtu``
Maximum Transmission Unit (MTU). Maximum Transmission Unit (MTU).
``vip_address`` ``vip_address``
.. note::
Use of the ``vip_address`` attribute is deprecated. Instead use
``kolla_internal_vip_address`` and ``kolla_external_vip_address``.
Virtual IP address (VIP) used by API services on this network. Virtual IP address (VIP) used by API services on this network.
``fqdn`` ``fqdn``
.. note::
Use of the ``fqdn`` attribute is deprecated. Instead use
``kolla_internal_fqdn`` and ``kolla_external_fqdn``.
Fully Qualified Domain Name (FQDN) used by API services on this network. Fully Qualified Domain Name (FQDN) used by API services on this network.
``routes`` ``routes``
List of static IP routes. Each item should be a dict containing the List of static IP routes. Each item should be a dict containing the
......
...@@ -345,6 +345,27 @@ ...@@ -345,6 +345,27 @@
# passwords file. # passwords file.
#kolla_ansible_custom_passwords: #kolla_ansible_custom_passwords:
###############################################################################
# OpenStack API addresses.
# Virtual IP address of OpenStack internal API. Default is the vip_address
# attribute of the internal network.
#kolla_internal_vip_address:
# Fully Qualified Domain Name (FQDN) of OpenStack internal API. Default is the
# fqdn attribute of the internal network if set, otherwise
# kolla_internal_vip_address.
#kolla_internal_fqdn:
# Virtual IP address of OpenStack external API. Default is the vip_address
# attribute of the external network.
#kolla_external_vip_address:
# Fully Qualified Domain Name (FQDN) of OpenStack external API. Default is the
# fqdn attribute of the external network if set, otherwise
# kolla_external_vip_address.
#kolla_external_fqdn:
############################################################################### ###############################################################################
# TLS certificate bundle management # TLS certificate bundle management
......
---
features:
- |
Adds the following new variables for the Kolla Ansible API VIP address and
FQDNs:
* ``kolla_internal_vip_address``
* ``kolla_internal_fqdn``
* ``kolla_external_vip_address``
* ``kolla_external_fqdn``
These variables should be used in preference to the ``vip_address`` and
``fqdn`` network attributes which are deprecated.
deprecations:
- |
The ``vip_address`` and ``fqdn`` network attributes are deprecated in
favour of the following variables:
* ``kolla_internal_vip_address``
* ``kolla_internal_fqdn``
* ``kolla_external_vip_address``
* ``kolla_external_fqdn``
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment