134 Commits

Author SHA1 Message Date
Maksim Malchuk
e87fbf37a8 Adds support for custom Placement configuration.
Change-Id: Icb02cffe04d84c6d29f3f0c3b4af540a4ffe631d
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
2021-12-19 17:37:27 +03:00
Pierre Riteau
0f2b104213 Bump up Ansible supported versions
This change bumps up the maximum supported Ansible version to 4.x
(ansible-core 2.11.x) and minimum to 2.10. This synchronises Kayobe with
Kolla Ansible (see change I8b9212934dfab3831986e8db55671baee32f4bbd).

Uses of docker_image are updated. We must now provide the source
parameter. When source is build (for molecule), we replace force by
force_source and force_tag and move path and dockerfile under the build
parameter.

Use docker_image_info instead of docker_image_facts.

Handle update of ansible inside kolla-ansible virtualenv and document
how to do it for the kayobe virtualenv.

Change-Id: I7a4530f4f63ddb37aa30a617db5944b97bc3e17f
2021-09-29 22:31:33 +02:00
Mark Goddard
f639ad0b35 Use ansible_facts to reference facts
By default, Ansible injects a variable for every fact, prefixed with
ansible_. This can result in a large number of variables for each host,
which at scale can incur a performance penalty. Ansible provides a
configuration option [0] that can be set to False to prevent this
injection of facts. In this case, facts should be referenced via
ansible_facts.<fact>.

This change updates all references to Ansible facts within Kayobe
from using individual fact variables to using the items in the
ansible_facts dictionary. This allows users to disable fact variable
injection in their Ansible configuration, which may provide some
performance improvement.

This change disables fact variable injection in the ansible
configuration used in CI, to catch any attempts to use the injected
variables.

[0] https://docs.ansible.com/ansible/latest/reference_appendices/config.html#inject-facts-as-vars

Story: 2007993
Task: 42464
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/791276

Change-Id: I14db53ed6e57d37bbd28dd5819e432e3fe6628b2
2021-08-21 09:57:29 +02:00
Sorin Sbarnea
cf60ba0d49 Use stream8 images with molecule
Change-Id: I424c1e3e6c488913d316e6b792d429599ea4de7c
2021-07-26 08:42:28 +00:00
Zuul
0e2efc09ec Merge "Bump max Ansible version to 2.10" 2021-03-25 16:20:11 +00:00
Michal Nasiadka
16cce92a74 Bump max Ansible version to 2.10
Molecule also needs to be bumped to support Ansible 2.10
lint: section changed in Molecule 3.x - adapted.
molecule-docker added do test-reqs because it code has moved to it from
molecule core
pytest-testinfra and pytest-molecule needed for testinfra tests to work

[1]: https://github.com/ansible-community/molecule/issues/2872

Change-Id: I0299f5126ebd080f3912a76294b0013abe7747a0
2021-03-24 07:25:28 +00:00
Bartosz Bezak
485fe811e6 Add Ironic enabled_bios_interfaces and default_bios_interface settings
Allow users to modify kolla_ironic_enabled_bios_interfaces and
kolla_ironic_default_bios_interface in ironic.yml.

Change-Id: I41d587ffdde77960bdce0c71d496820a33f71d74
2021-03-19 11:46:42 +01:00
Mark Goddard
c847ef9157 Fix copying Swift ring files
Ring files are binary formatted and should not be templated. Attempting
to template them causes an error such as the following:

    Template source files must be utf-8 encoded

This change fixes the issue by implementing support for configuration
files that are listed as 'untemplated'.

Change-Id: I9c6b0d9d5e13e8b82ebb8e8a3a0f432efb865e28
Story: 2007297
Task: 38774
2020-12-15 16:55:31 +00:00
Michal Nasiadka
0f25900a43 Add missing barbican.conf support
Story: 2008170
Task: 40925

Change-Id: I3014983f481a5dca7c93e140b3e10caa5d537669
2020-09-23 19:17:51 +00:00
Pierre Riteau
878fe5728b Add support for custom Aodh configuration
Change-Id: I19ef5a46dccacc00db495993cc744938921996a1
Story: 2008019
Task: 40671
2020-08-21 20:54:21 +00:00
Pierre Riteau
f40dde18df Fix ansible-lint after upgrade to 4.3.1
- Skip rule 106 which fails due to the hyphen in "kolla-openstack"
- Fix code failing "File permissions not mentioned" rule

Change-Id: I7ce8a591b4e1eeef749c439e1140ecfb74dcb40e
2020-08-21 14:48:07 +02:00
Mark Goddard
bc32529008 Add support for custom Masakari configuration
Change-Id: Ibcf12f4d80bd9744867688ba986cd59be82f3e5a
Story: 2007969
Task: 40470
2020-08-05 09:28:25 +01:00
Mark Goddard
b9d76f6ef5 Remove support for CentOS 7 and Python 2
* Always use Python 3
* Drop code paths for CentOS 7
* Drop support for Yum
* Remove support for host NTP daemon, always use chrony
* Switch references from 'yum_install_epel' to 'dnf_install_epel'
* Remove overcloud host image workaround for tagged VLAN admin network
* Remove the kayobe.utils.yum_install function, which is unused

Change-Id: I368f6edafed9779658798fc342116b4c1b3ffd48
Story: 2006574
Task: 39481
2020-05-28 10:25:51 +01:00
Radosław Piliszek
e7d7daa531 Remove ceph block device support
It leaves certain ceph mentions in globals.yml.j2 as it needs
syncing with kolla-ansible contents anyways
(these are all comments).

Change-Id: I05e9c6223583e9bb5dc0020edc0b56990275093c
Story: 2007295
Task: 38766
2020-03-18 10:28:33 +00:00
Mark Goddard
e93bbd9ed5 Use mariabackup for database backups
Kolla ansible switched its database backup support to mariabackup from
xtrabackup due to incompatibilities. See
https://bugs.launchpad.net/kolla/+bug/1843043 for details.

Change-Id: Ib95771f09fd6d5e71a2af471de47f811e1cab88b
Related-Bug: #1843043
Story: 2006952
Task: 37634
2019-12-11 17:16:59 +00:00
Doug Szumski
00002f25e1 Add support for custom Elasticsearch config
Elasticsearch Curator will be driven by custom config. This adds
support in Kayobe for managing it.

Change-Id: Ie739ffbd67c6c26175f152449a7b7276ffa87824
Story: 2006852
Task: 37443
2019-12-09 12:07:39 +00:00
Will Szumski
6430ec5261 format pxe_append_params as string and not a list
Please see: https://docs.openstack.org/ironic/latest/configuration/sample-config.html

Change-Id: Idc96523a5108712a072b14889b1fba0f05c381e8
Story: 2006707
Task: 37067
2019-10-14 10:22:46 +01:00
Zuul
81912ab534 Merge "Fix inspector iPXE boot with UEFI compute nodes" 2019-08-21 22:00:56 +00:00
Pierre Riteau
ffb7f96e16 Add support for custom CloudKitty configuration
Change-Id: I0c0589387da53458f41df280dff0179715448aaa
Story: 2006292
Task: 36003
2019-07-27 15:58:43 +02:00
Mark Goddard
0ee55e19fa Fix inspector iPXE boot with UEFI compute nodes
The IPA ramdisk fails to boot on UEFI compute nodes with iPXE. We see
the following error on the console, followed by a kernel panic:

Fix kernel panic-not syncing: VFS: unable to mount root fs on unknown
block(0,0)

The cause is the lack of an initrd=ironic-agent.initramfs kernel
argument in inspector.ipxe.

The initrd argument is present in the kolla-ansible version of
inspector.ipxe, and now contains all parameters that we need (since
Rocky), so this change simply removes our custom template, and passes
through the extra kernel argument option configuration value.

Story: 2006214
Task: 35804

Story: 2006213
Task: 35803

Depends-On: https://review.opendev.org/670566
Change-Id: I8a103b7c6d3dd1f0433f922ae90deae9b92c0c78
2019-07-15 09:31:03 +01:00
Zuul
85330b9166 Merge "Add support for custom Ceilometer configuration" 2019-07-12 21:28:40 +00:00
Pierre Riteau
4667fd4e54 Add support for overriding OpenStack configuration globally
This commit allows Kayobe to generate a global.conf file for use by
Kolla Ansible to override configuration across all OpenStack services.

Change-Id: I6d144a945e1cde06fa9fdd03c30102458c0c9f8d
Story: 2005904
Task: 34153
2019-07-11 16:29:14 +00:00
Zuul
2002cf6019 Merge "Support customising refactored HAProxy config" 2019-07-08 16:17:11 +00:00
Zuul
7bb8c80de5 Merge "Support customising Prometheus config" 2019-07-08 16:14:15 +00:00
Zuul
3e99fa2f31 Merge "Add support for custom Gnocchi configuration" 2019-07-03 19:13:07 +00:00
Zuul
84712dd314 Merge "Provide keystone.conf to kolla-ansible by default" 2019-07-03 14:19:13 +00:00
Pierre Riteau
77170a8547 Support customising refactored HAProxy config
Change-Id: I435ab9f88f73a73d7dc02f604f05e6f6def02eb5
2019-07-01 19:51:28 +01:00
Pierre Riteau
58f856fd00 Add support for custom Ceilometer configuration
Change-Id: I0a9e1a3b878231f9ce7bf295b5526c9cfabbbf9e
Story: 2005811
Task: 33551
2019-06-25 10:44:57 +01:00
Pierre Riteau
ec9b482651 Provide keystone.conf to kolla-ansible by default
Commit d8ee0fa027140fb8a7504bd6685b6dcdfe3ac8fe introduced the variable
kolla_enable_keystone without setting a default value and used it to
check whether to template and provide keystone.conf to kolla-ansible,
unlike the extended keystone configuration which was always copied. This
resulted in non-intuitive behaviour if kolla_enable_keystone wasn't
explicitly set by the operator.

This commit sets kolla_enable_keystone to true by default, which matches
the default in kolla-ansible, and uses it instead of hardcoded true
values.

Change-Id: Id090348a6f22f251555fa286a7d24923087122a9
Story: 2005930
Task: 34273
2019-06-21 15:55:46 +01:00
Doug Szumski
13350e3f56 Support customising Prometheus config
Kolla Ansible supports customising Prometheus config files.
This commit allows Kayobe to take advantage of that.

Story: 2005508
Task: 30617
Change-Id: I9fe28a658dc35adb5358d9a3a96bda9245404257
2019-06-10 15:31:15 +01:00
Pierre Riteau
49d4d7be79 Add support for custom Blazar configuration
Change-Id: I00ee10bdc7f8c1b6ab8576115c757e27b6c2c397
Story: 2005809
Task: 33549
2019-05-31 16:55:10 +01:00
Pierre Riteau
603527c215 Add support for custom Gnocchi configuration
Change-Id: I06c07108693766fd436a60a39f270c116931941e
Story: 2005810
Task: 33550
2019-05-31 16:29:54 +01:00
Mark Goddard
e96179921f Add commands for database backup and recovery
Uses the support [1] for database backups added to Kolla Ansible in the
Stein release.

Adds the following new commands:

kayobe overcloud database backup [--incremental]
kayobe overcloud database recover [--force-recovery-host <host>]

The recovery command is for recovering a clustered database that has
lost quorum.

[1] https://docs.openstack.org/kolla-ansible/latest/admin/mariadb-backup-and-restore.html

Change-Id: Ie16354cd01ea7dd83cd3d4058dd8451b8387600b
Story: 2005015
Task: 29493
2019-05-23 10:48:04 +01:00
Ross Martyn
d8ee0fa027 Multiple updates for Kayobe
---

1. Gather facts for localhost in kolla-ansible.yml
2. Don't include unconfigured networks in network_interfaces
3. Added Keystone configuration extra config merge

---

1. Facts are necessary for the kolla-ansible role,
which references the ansible_user_uid fact

2. It is possible to skip configuring a network,
by setting its name to None

This is done in networks.yml as follows:

admin_oc_net_name:

Currently, these networks may still be included in the 'network_interfaces'
list for each host, despite the fact that they are not in use.

A classic example is when ironic is not enabled, it is currently still
necessary to define provisioning and cleaning networks.

This change avoids including any networks that have their name set to None
in network_interfaces.

3. Added support for Keystone custom configuration

Added tests and documentation to add support for keystone extra configuration

Co-Authored-By: Mark Goddard <mark@stackhpc.com

Change-Id: Iaa304221b8093ac71f9cdbb23edc84d1517578da
2019-05-20 15:30:07 +01:00
Zuul
c020751a5d Merge "Support for Ceph and Swift storage networks, and improvements to Swift" 2019-05-15 13:48:05 +00:00
Scott Solkhon
6496cfc0ba Support for Ceph and Swift storage networks, and improvements to Swift
In a deployment that has both Ceph or Swift deployed it can be useful to seperate the network traffic.
This change adds support for dedicated storage networks for both Ceph and Swift. By default, the storage hosts are
attached to the following networks:

* Overcloud admin network
* Internal network
* Storage network
* Storage management network

This adds four additional networks, which can be used to seperate the storage network traffic as follows:

* Ceph storage network (ceph_storage_net_name) is used to carry Ceph storage
  data traffic. Defaults to the storage network (storage_net_name).
* Ceph storage management network (ceph_storage_mgmt_net_name) is used to carry
  storage management traffic. Defaults to the storage management network
  (storage_mgmt_net_name).
* Swift storage network (swift_storage_net_name) is used to carry Swift storage data
  traffic. Defaults to the storage network (storage_net_name).
* Swift storage replication network (swift_storage_replication_net_name) is used to
  carry storage management traffic. Defaults to the storage management network
  (storage_mgmt_net_name).

This change also includes several improvements to Swift device management and ring generation.

The device management and ring generation are now separate, with device management occurring during
'kayobe overcloud host configure', and ring generation during a new command, 'kayobe overcloud swift rings generate'.

For the device management, we now use standard Ansible modules rather than commands for device preparation.
File system labels can be configured for each device individually.

For ring generation, all commands are run on a single host, by default a host in the Swift storage group.
A python script runs in one of the kolla Swift containers, which consumes an autogenerated YAML config file that defines
the layout of the rings.

Change-Id: Iedc7535532d706f02d710de69b422abf2f6fe54c
2019-04-24 12:40:20 +00:00
Zuul
0a2c13accb Merge "Remove inspector_manage_firewall variable" 2019-04-10 11:30:31 +00:00
Mark Goddard
c2a35ce211 Remove inspector_manage_firewall variable
This is supported in kolla-ansible via the ironic_inspector_pxe_filter
variable, which can be added to globals.yml. The default value for that
variable changed in the Stein release from 'iptables' to 'dnsmasq',
since the iptables filter does not work with Docker CE [1].

This change removes the inspector_manage_firewall variable.

This change also adds an iptables rule in CI tests to allow DHCP packets
to be forwarded, to ensure bare metal servers can be deployed.

[1] https://bugs.launchpad.net/kolla-ansible/+bug/1823044

Depends-On: https://review.openstack.org/649673
Change-Id: Idac6777b4d97fbd17698fc2086ceb068d7b2e326
Related-Bug: #1823044
2019-04-09 13:53:59 +01:00
Doug Szumski
44430a4242 Support custom keepalived config
Allow users to use the custom config mechanism for Keepalived
provided by Kolla Ansible.

Change-Id: I052bd8283944197cd2b13747e7a7c32fbe06c045
Story: 2005211
Task: 29989
2019-04-01 13:42:32 +00:00
Zuul
99ddd5c41b Merge "Support custom HAProxy config" 2019-02-08 17:31:06 +00:00
Doug Szumski
d935f55f7c Support custom HAProxy config
Note that in the Stein release of Kolla-Ansible haproxy.cfg was refactored and
this override will no longer work as expected.

Change-Id: Iff5b9f2a33ad2320f62fae7328c097069cb4f416
2019-02-05 12:17:09 +00:00
zhulingjie
8be12b71d7 use include_tasks and import_playbook instead of include
include is marked as deprecated since ansible 2.4[0]

Switch to include_tasks or import_playbook as necessary

[0] https://docs.ansible.com/ansible/2.4/include_module.html#deprecated

Change-Id: Ia1b826ca08ae042eec80f8c495ab030a087d97ba
2019-01-18 12:22:38 +00:00
Zuul
a3c1034ffd Merge "Add support for a custom octavia.conf file" 2018-11-27 17:04:42 +00:00
Ross Martyn
46e40301f8 Enable manila extra config merge #28058
This commit enables the merge of additional manila.conf
as seen with the other projects.

Change-Id: Ia2209a9c82215e49f1ef5a79ecafbebf2b204627
Closes-Bug: 28058
2018-11-23 17:37:24 +00:00
Nick Jones
3d1018dea9
Add support for a custom octavia.conf file
Kayobe should be able to handle extra configuration options in Octavia's
main configuration file, in a similar fashion to other services.  This
commit adds support for just that.

TrivialFix

Change-Id: Ibd91a90a5278bcd8963fb06874a74f71b1882d89
2018-11-22 18:55:54 +00:00
Zuul
5bd744c869 Merge "Add 'octavia' in to the list of paths to search for custom configs" 2018-11-16 18:37:50 +00:00
Zuul
0bcebebde6 Merge "Support configuration of custom fluentd inputs" 2018-11-09 17:25:27 +00:00
Will Miller
d253ca87f2 Remove legacy Ironic driver references
From Rocky, Ironic no longer supports drivers, in favour of hardware
types. Hardware types were already implemented for the overcloud Ironic,
this change ensures that Bifrost configuration is given hardware types
where necessary.

Change-Id: Iea91d2cd88b7566bb9cad20367ec64b9213d8845
2018-11-06 11:34:11 +00:00
Zuul
08937516d4 Merge "Use kolla variable to set inspector DHCP config" 2018-11-06 10:41:01 +00:00
Mark Goddard
5782bbc6ef Use kolla variable to set inspector DHCP config
Fixes an issue with ironic prechecks, which now require
ironic_dnsmasq_dhcp_range to be set when ironic is enabled.

Also uses the new kolla variable ironic_dnsmasq_default_gateway to
configure the gateway for the inspection network.

These changes mean that we can drop our custom override of
ironic-dnsmasq.conf, since it now matches the file in kolla ansible.

This change depends on the Rocky release of Kolla Ansible.

Change-Id: I0b2e094904772fc6e14f1916e20ef207161ec001
2018-11-06 08:05:53 +00:00