Commit 37cc38da authored by Bartłomiej Daca's avatar Bartłomiej Daca
Browse files

Fixing kolla's problem with ansible var precedence

default_*_interface options were introduced in order to fix problem
with *_interface vars specification made in inventory file.

This change makes ceph installation possible. Without this, ceph will
be able to use only one network: api network.

Change-Id: I516c0df385d082607238589f68e2929434d961a3
Closes-Bug: #1604129
Closes-Bug: #1586524
parent 3edb5e83
Loading
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -77,10 +77,12 @@ keepalived_virtual_router_id: "51"
####################
# Networking options
####################
kolla_external_vip_interface: "{{ network_interface }}"
api_interface: "{{ network_interface }}"
storage_interface: "{{ network_interface }}"
tunnel_interface: "{{ network_interface }}"
network_interface: "{{ default_network_interface }}"
kolla_external_vip_interface: "{{ default_kolla_external_vip_interface | default( network_interface ) }}"
api_interface: "{{ default_api_interface | default( network_interface ) }}"
storage_interface: "{{ default_storage_interface | default( network_interface ) }}"
tunnel_interface: "{{ default_tunnel_interface |  default( network_interface ) }}"
neutron_external_interface: "{{ default_neutron_external_interface }}"

# Valid options are [ openvswitch, linuxbridge ]
neutron_plugin_agent: "openvswitch"
+2 −2
Original line number Diff line number Diff line
@@ -138,8 +138,8 @@ function configure_kolla {
    sed -i -r "s,^[# ]*docker_namespace:.+$,docker_namespace: \"lokolla\"," /etc/kolla/globals.yml
    sed -i -r "s,^[# ]*docker_insecure_registry:.+$,docker_insecure_registry: \"True\"," /etc/kolla/globals.yml
    # Set network interfaces
    sed -i -r "s,^[# ]*network_interface:.+$,network_interface: \"eth1\"," /etc/kolla/globals.yml
    sed -i -r "s,^[# ]*neutron_external_interface:.+$,neutron_external_interface: \"eth2\"," /etc/kolla/globals.yml
    sed -i -r "s,^[# ]*default_network_interface:.+$,default_network_interface: \"eth1\"," /etc/kolla/globals.yml
    sed -i -r "s,^[# ]*default_neutron_external_interface:.+$,default_neutron_external_interface: \"eth2\"," /etc/kolla/globals.yml
}

# Configure the operator node and install some additional packages.
+7 −7
Original line number Diff line number Diff line
@@ -15,9 +15,9 @@ shared by the internal and admin URLs.

The configuration parameters related to these options are:
  - kolla_internal_vip_address
- network_interface
  - default_network_interface
  - kolla_external_vip_address
- kolla_external_vip_interface
  - default_kolla_external_vip_interface

For the combined option, set the two variables below, while allowing the
other two to accept their default values.  In this configuration all REST
@@ -25,7 +25,7 @@ API requests, internal and external, will flow over the same network.
::

    kolla_internal_vip_address: "10.10.10.254"
    network_interface: "eth0"
    default_network_interface: "eth0"

For the separate option, set these four variables.  In this configuration
the internal and external REST API requests can flow over separate
@@ -33,9 +33,9 @@ networks.
::

    kolla_internal_vip_address: "10.10.10.254"
    network_interface: "eth0"
    default_network_interface: "eth0"
    kolla_external_vip_address: "10.10.20.254"
    kolla_external_vip_interface: "eth1"
    default_kolla_external_vip_interface: "eth1"


Fully Qualified Domain Name Configuration
+10 −15
Original line number Diff line number Diff line
@@ -404,7 +404,7 @@ parameters: kolla_base_distro, kolla_install_type.

Please specify an unused IP address in the network to act as a VIP for
kolla\_internal\_vip\_address. The VIP will be used with keepalived and
added to the "api\_interface" as specified in the globals.yml
added to the "default\_api\_interface" as specified in the globals.yml

::

@@ -422,24 +422,19 @@ Note this method is not recommended and generally not tested by the
Kolla community, but included since sometimes a free IP is not available
in a testing environment.

The "network\_interface" variable is the interface to which Kolla binds API
services. For example, when starting up Mariadb it will bind to the
IP on the interface list in the "network\_interface" variable.
The ``default_network_interface`` variable is the interface to which Kolla
binds API services. For example, when starting up Mariadb it will bind to the
IP on the interface list in the ``default_network_interface`` variable. ::

::

    network_interface: "eth0"
    default_network_interface: "eth0"

The "neutron\_external\_interface" variable is the interface that will
The ``default_neutron_external_interface`` variable is the interface that will
be used for the external bridge in Neutron. Without this bridge the deployment
instance traffic will be unable to access the rest of the Internet. In
the case of a single interface on a machine, a veth pair may be used where
one end of the veth pair is listed here and the other end is in a bridge on
the system.

::
instance traffic will be unable to access the rest of the Internet. In the case
of a single interface on a machine, a veth pair may be used where one end of
the veth pair is listed here and the other end is in a bridge on the system. ::

    neutron_external_interface: "eth1"
    default_neutron_external_interface: "eth1"

If using a local docker registry, set the docker\_registry information where
the local registry is operating on IP address 192.168.1.100 and the port 4000.
+19 −11
Original line number Diff line number Diff line
@@ -22,7 +22,7 @@
# This should be a VIP, an unused IP on your network that will float between
# the hosts running keepalived for high-availability. When running an All-In-One
# without haproxy and keepalived, this should be the first IP on your
# 'network_interface' as set in the Networking section below.
# 'default_network_interface' as set in the Networking section below.
kolla_internal_vip_address: "10.10.10.254"

# This is the DNS name that maps to the kolla_internal_vip_address VIP. By
@@ -58,20 +58,27 @@ kolla_internal_vip_address: "10.10.10.254"
# This interface is what all your api services will be bound to by default.
# Additionally, all vxlan/tunnel and storage network traffic will go over this
# interface by default. This interface must contain an IPv4 address.
network_interface: "eth0"
default_network_interface: "eth0"

# These can be adjusted for even more customization. The default is the same as
# the 'network_interface'. These interfaces must container an IPv4 address.
#kolla_external_vip_interface: "{{ network_interface }}"
#api_interface: "{{ network_interface }}"
#storage_interface: "{{ network_interface }}"
#tunnel_interface: "{{ network_interface }}"
# the 'default_network_interface'. These interfaces must contain an IPv4 address.
#default_kolla_external_vip_interface: "{{ default_network_interface }}"
#default_api_interface: "{{ default_network_interface }}"
#default_storage_interface: "{{ default_network_interface }}"
#default_cluster_interface: "{{ default_network_interface }}"
#default_tunnel_interface: "{{ default_network_interface }}"

# This is the raw interface given to neutron as its external network port. Even
# though an IP address can exist on this interface, it will be unusable in most
# configurations. It is recommended this interface not be configured with any IP
# addresses for that reason.
neutron_external_interface: "eth1"
default_neutron_external_interface: "eth1"

#Any of the 'default_*_interface' variables can be customized even more in the
#inventory file. If any host have different configuration of the interfaces then
#its definition in the inventory should specify them without the 'default_'
#prefix. Check inventory file for the example usage.


# Valid options are [ openvswitch, linuxbridge ]
#neutron_plugin_agent: "openvswitch"
@@ -87,9 +94,10 @@ neutron_external_interface: "eth1"
####################
# TLS options
####################
# To provide encryption and authentication on the kolla_external_vip_interface,
# TLS can be enabled.  When TLS is enabled, certificates must be provided to
# allow clients to perform authentication.
# To provide encryption and authentication on the 
# default_kolla_external_vip_interface, TLS can be enabled.  When TLS is 
# enabled, certificates must be provided to allow clients to perform 
# authentication.
#kolla_enable_tls_external: "no"
#kolla_external_fqdn_cert: "{{ node_config_directory }}/certificates/haproxy.pem"

Loading