Skip to content
Snippets Groups Projects
  • Mark Goddard's avatar
    7f7c4e2a
    Add documentation for routed control plane networks · 7f7c4e2a
    Mark Goddard authored
    Kayobe currently supports definition of various different networks -
    public, internal, tunnel, etc. These typically map to a VLAN or flat
    network, with an IP subnet. When a cloud exceeds the size of a single
    VLAN/subnet, this approach no longer works.
    
    One way to resolve this is to have multiple subnets that map to a single
    logical network, and provide routing between them. This is a similar
    concept to neutron's routed networks, but for the control plane.
    
    This change provides documentation for the currently tested parts of
    this feature.
    
    Change-Id: Ic06c6d4fff0fa568eb9ed3a9c30ce21c7699d965
    Story: 2008180
    Task: 40938
    7f7c4e2a
    History
    Add documentation for routed control plane networks
    Mark Goddard authored
    Kayobe currently supports definition of various different networks -
    public, internal, tunnel, etc. These typically map to a VLAN or flat
    network, with an IP subnet. When a cloud exceeds the size of a single
    VLAN/subnet, this approach no longer works.
    
    One way to resolve this is to have multiple subnets that map to a single
    logical network, and provide routing between them. This is a similar
    concept to neutron's routed networks, but for the control plane.
    
    This change provides documentation for the currently tested parts of
    this feature.
    
    Change-Id: Ic06c6d4fff0fa568eb9ed3a9c30ce21c7699d965
    Story: 2008180
    Task: 40938
kolla-ansible.rst 27.66 KiB

Kolla Ansible Configuration

Kayobe relies heavily on Kolla Ansible for deployment of the OpenStack control plane. Kolla Ansible is installed locally on the Ansible control host (the host from which Kayobe commands are executed), and Kolla Ansible commands are executed from there.

Kolla Ansible configuration is stored in ${KAYOBE_CONFIG_PATH}/kolla.yml.

Configuration of Ansible

Ansible configuration is described in detail in the Ansible documentation. In addition to the standard locations, Kayobe supports using an Ansible configuration file located in the Kayobe configuration at ${KAYOBE_CONFIG_PATH}/kolla/ansible.cfg or ${KAYOBE_CONFIG_PATH}/ansible.cfg. Note that if the ANSIBLE_CONFIG environment variable is specified it takes precedence over this file.

Kolla Ansible Installation

Prior to deploying containers, Kolla Ansible and its dependencies will be installed on the Ansible control host. The following variables affect the installation of Kolla Ansible:

kolla_ansible_ctl_install_type
Type of Kolla Ansible control installation. One of binary (PyPI) or source (git). Default is source.
kolla_ansible_source_url
URL of Kolla Ansible source code repository if type is source. Default is https://opendev.org/openstack/kolla-ansible.
kolla_ansible_source_version
Version (branch, tag, etc.) of Kolla Ansible source code repository if type is source. Default is the same as the Kayobe upstream branch.
kolla_ansible_venv_extra_requirements
Extra requirements to install inside the Kolla Ansible virtualenv. Default is an empty list.
kolla_upper_constraints_file
Upper constraints file for installation of Kolla. Default is {{ pip_upper_constraints_file }}, which has a default of https://releases.openstack.org/constraints/upper/{{ openstack_branch }}.

Example: custom git repository

To install Kolla Ansible from a custom git repository:

Virtual Environment Extra Requirements

Extra Python packages can be installed inside the Kolla Ansible virtualenv, such as when required by Ansible plugins.

For example, to use the hashi_vault Ansible lookup plugin, its hvac dependency can be installed using:

Local environment

The following variables affect the local environment on the Ansible control host. They reference environment variables, and should be configured using those rather than modifying the Ansible variable directly. The file kayobe-env in the kayobe-config git repository sets some sensible defaults for these variables, based on the recommended environment directory structure.

kolla_ansible_source_path
Path to directory for Kolla Ansible source code checkout. Default is $KOLLA_SOURCE_PATH, or $PWD/src/kolla-ansible.
kolla_ansible_venv
Path to virtualenv in which to install Kolla Ansible on the Ansible control host. Default is $KOLLA_VENV_PATH or $PWD/venvs/kolla-ansible.
kolla_config_path
Path to Kolla Ansible configuration directory. Default is $KOLLA_CONFIG_PATH or /etc/kolla.

Global Configuration

The following variables are global, affecting all containers. They are used to generate the Kolla Ansible configuration file, globals.yml, and also affect :ref:`Kolla image build configuration <configuration-kolla-global>`.

Kolla Images

The following variables affect which Kolla images are used, and how they are accessed.

kolla_base_distro
Kolla base container image distribution. Default is centos.
kolla_install_type
Kolla container image type: binary or source. Default is binary.
kolla_docker_registry
URL of docker registry to use for Kolla images. Default is not set, in which case Dockerhub will be used.
kolla_docker_namespace
Docker namespace to use for Kolla images. Default is kolla.
kolla_docker_registry_username
Username to use to access a docker registry. Default is not set, in which case the registry will be used without authentication.
kolla_docker_registry_password
Password to use to access a docker registry. Default is not set, in which case the registry will be used without authentication.
kolla_openstack_release
Kolla OpenStack release version. This should be a Docker image tag. Default is {{ openstack_release }}, which takes the OpenStack release name (e.g. rocky) on stable branches and tagged releases, or master on the Kayobe master branch.

For example, to deploy Kolla centos binary images with a namespace of example, and a private Docker registry at registry.example.com:4000, tagged with 7.0.0.1:

The deployed ironic-api image would be referenced as follows:

registry.example.com:4000/example/centos-binary-ironic-api:7.0.0.1

Ansible

The following variables affect how Ansible accesses the remote hosts.

kolla_ansible_user
User account to use for Kolla SSH access. Default is kolla.
kolla_ansible_group
Primary group of Kolla SSH user. Default is kolla.
kolla_ansible_become
Whether to use privilege escalation for all operations performed via Kolla Ansible. Default is false since the 8.0.0 Ussuri release.
kolla_ansible_target_venv
Path to a virtual environment on remote hosts to use for Ansible module execution. Default is {{ virtualenv_path }}/kolla-ansible. May be set to None to use the system Python interpreter.

Context: Remote Execution Environment

By default, Ansible executes modules remotely using the system python interpreter, even if the Ansible control process is executed from within a virtual environment (unless the local connection plugin is used). This is not ideal if there are python dependencies that must be installed with isolation from the system python packages. Ansible can be configured to use a virtualenv by setting the host variable ansible_python_interpreter to a path to a python interpreter in an existing virtual environment.

The variable kolla_ansible_target_venv configures the use of a virtual environment on the remote hosts. The default configuration should work in most cases.