This section covers configuration of Kayobe. As an Ansible-based project, Kayobe is for the most part configured using YAML files.
Kayobe configuration is by default located in /etc/kayobe
on the Ansible
control host. This location can be overridden to a different location to avoid
touching the system configuration directory by setting the environment variable
KAYOBE_CONFIG_PATH
. Similarly, kolla configuration on the Ansible control
host will by default be located in /etc/kolla
and can be overridden via
KOLLA_CONFIG_PATH
.
The Kayobe configuration directory contains Ansible extra-vars
files and
the Ansible inventory. An example of the directory structure is as follows:
extra-vars1.yml
extra-vars2.yml
inventory/
group_vars/
group1-vars
group2-vars
groups
host_vars/
host1-vars
host2-vars
hosts
Ansible’s variable precedence rules are fairly well documented and provide a mechanism we can use for providing site localisation and customisation of OpenStack in combination with some reasonable default values. For global configuration options, Kayobe typically uses the following patterns:
<kayobe repo>/ansible/group_vars/all/*
set global defaults. These
files should not be modified.<kayobe repo>/ansible/group_vars/<group>/*
set defaults for some subsets
of hosts. These files should not be modified.${KAYOBE_CONFIG_PATH}/*.yml
set custom values
for global variables and should be used to apply global site localisation
and customisation. By default these variables are commented out.Additionally, variables can be set on a per-host basis using inventory host
variables files in ${KAYOBE_CONFIG_PATH}/inventory/host_vars/*
. It should
be noted that variables set in extra-vars files take precedence over per-host
variables.
The kayobe-config git repository contains a Kayobe configuration directory structure and unmodified configuration files. This repository can be used as a mechanism for version controlling Kayobe configuration. As Kayobe is updated, the configuration should be merged to incorporate any upstream changes with local modifications.
Alternatively, the baseline Kayobe configuration may be copied from a checkout of the Kayobe repository to the Kayobe configuration path:
$ mkdir -p ${KAYOBE_CONFIG_PATH:-/etc/kayobe/}
$ cp -r etc/kayobe/* ${KAYOBE_CONFIG_PATH:-/etc/kayobe/}
Once in place, each of the YAML and inventory files should be manually inspected and configured as required.
The inventory should contain the following hosts:
seed-hypervisor
group.seed
group.Cloud hosts and bare metal compute hosts are not required to exist in the inventory if discovery of the control plane hardware is planned, although entries for groups may still be required.
Use of advanced control planes with multiple server roles and customised service placement across those servers is covered in Control Plane Service Placement.
Site localisation and customisation is applied using Ansible extra-vars files
in ${KAYOBE_CONFIG_PATH}/*.yml
.
Kayobe supports the use of Ansible vault to encrypt sensitive
information in its configuration. The ansible-vault
tool should be used to
manage individual files for which encryption is required. Any of the
configuration files may be encrypted. Since encryption can make working with
Kayobe difficult, it is recommended to follow best practice,
adding a layer of indirection and using encryption only where necessary.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.