Commit Graph

29 Commits

Author SHA1 Message Date
Mark Goddard 428ef10fa4 Use merge_configs and merge_yaml to generate Kolla custom config
This patch adds new functionality - merging base & environment specific
kolla config. This allows you to place common settings in the base
configuration and only keep environment specific settings in the
environment directories.

Change-Id: Id4588f4529a4522e68e22ce58711cb927fa68a9d
Story: 2002009
Task: 42903
2023-05-30 16:47:14 +00:00
Mark Goddard af3b719b73 Move group_vars to an inventory directory
The group variables originally in ansible/group_vars/ were playbook
group variables, due to being adjacent to the playbooks. Typically they
provided default values for global variables in the all group, as well
as some more specific groups. This has worked fairly well, but results
in (at least) a couple of problems.

1. The default variable precedence rules mean that these playbook group
   variables have a higher precedence than inventory group variables
   (for a given group). This can make it challenging to override
   playbook group variables in the inventory in Kayobe configuration.

2. Any playbook run by Kayobe must be in the same directory as the
   playbook group variables in order to use them. Given that they
   include variables required for connectivity such as ansible_host and
   ansible_user, this is quite critical. For Kayobe custom playbooks, we
   work around this by symlinking to the group_vars directory from the
   directory containing the custom playbook. This is not an elegant
   workaround, and has assumptions about the relative paths of the
   Kayobe configuration and virtual environment in which Kayobe is
   installed.

Story: 2010280
Task: 46233

Change-Id: Ifea5c7e73f6f410f96a7398bfd349d1f631d9fc0
2022-09-08 10:11:23 +01:00
Mark Goddard e318cadaa5 Use merge_configs and merge_yaml to generate Kolla configs
Supports merging configuration for the following files:

* kolla/globals.yml
* kolla/config/bifrost/bifrost.yml
* kolla/config/bifrost/dib.yml
* kolla/config/bifrost/servers.yml
* kolla/kolla-build.conf

Configuration is merged from the following sources:

* Kayobe source code
* Base Kayobe config
* Kayobe environment

Co-Authored-By: Will Szumski <will@stackhpc.com>
Change-Id: I552bd8f7853b2032954b372bf4476676dac3e271
Story: 2002009
Task: 42974
2021-10-08 09:08:45 +01:00
Michał Nasiadka ae853182dc CI: Fix bashate ignores
Bashate only accepts one --ignore option, so first was ignored.

Change-Id: I2b7062c4f482faf91c0df40fb79fad75eb326d83
2021-09-20 16:48:10 +02:00
Mark Goddard b7287ec586 [release] add kolla feature flag sync scripts and update docs
Adds a script for syncing feature flags from Kolla Ansible, and updates
the release docs to include this step. Also adds the inventory sync
step.

Change-Id: Id2bd48897d6b37a5006bad7f6e8597db20aa1b8b
2021-04-23 17:16:20 +01:00
Mark Goddard df00ba22e7 CI: increase Ansible Galaxy retries & add delay
We still see flakiness when downloading content from Ansible Galaxy,
often HTTP 520. This change increases the retries from 3 to 10, and adds
a 5 second delay between attempts.

Change-Id: I0c46e5fcc6979027dc6f1bc5cc49e923a205f654
Related: https://github.com/ansible/galaxy/issues/2429
2021-03-26 17:34:40 +00:00
Pierre Riteau 7d4d48b1c4 Update shebang for Python 3 script
The feature-flags.py script uses pathlib which is only supported in
Python 3. Update shebang to ensure it is run with the correct
interpreter.

Change-Id: I69ea0c90f68909399709626bddfc418e9df31acc
2020-09-16 15:54:13 +02:00
Pierre Riteau 7b60585134 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Ignore bashate failure on one-liner loops.

Add pcre devel packages to fix failing pep8 jobs.

Change-Id: I3442174b378cc6e361550fcb9b32a62f61fa7972
2020-09-11 15:44:17 +02:00
Will Szumski 1e963a60ad Update feature flags
The flags in etc/kayobe/kolla.yml were out of sync with
ansible/roles/kolla-ansible/vars/main.yml.

This commit sorts them all alphabetically and adds a script to simplify
generating the list.

TrivialFix

Change-Id: I0e3be19eed371853d80c401d6a46770a7d6dcbc5
2020-06-12 09:43:00 +02:00
Will Szumski c96803d8d1 Disable broken linting of literalinclude sphinx directive
Previously we were seeing:

AttributeError: 'Values' object has no attribute 'env'

TrivialFix
Change-Id: I2b376303a9fef8fb3c1ada0c168bbb494216aa94
2020-06-10 19:33:26 +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
Mark Goddard 611111b8bd Use unittest.mock instead of PyPI mock
Now that py2 is gone, oslotest dropped dependency on mock and will
soon affect Ussuri CI [1], let's use unittest.mock built in py3.

This also fixes py38 jobs and proactively prevents py36 and py37
failing due to [1]. This is because we never included mock in
test-requirements and instead relied on oslotest to bring it in.

[1] https://review.opendev.org/716322

Change-Id: I0c18b13c4e1fbaa9db41da4e2039ad908c28caa6
2020-04-03 10:22:39 +01:00
Mark Goddard 2fcdff101f Fix sphinx8 script used by pep8
We wrap doc8 to register the directives we use in our documentation.
Previously the 'app' argument was passed as None, however sphinx has
started to use the argument.

This change uses a mock object since we don't need to use the
application object.

Change-Id: Id9e8d5f6d09f14d294cd493538780456f98c7dbe
2020-02-13 11:32:50 +00:00
Zuul b98728f3d6 Merge "Use {{ openstack_branch }} as version of kolla-ansible in ansible tests" 2019-12-12 12:39:01 +00:00
Pierre Riteau 225130a594 Use {{ openstack_branch }} as version of kolla-ansible in ansible tests
Instead of always checking out the master branch, use the kolla-ansible
branch with which this Kayobe version is meant to be used.

Change-Id: I074d4b9d444649ecf956d3cd92748862e8c89a5c
2019-12-06 17:29:45 +01:00
Mark Goddard d81ffc2e28 Revert to yatesr.timezone role
In the 1.2.0 release the offending symlinks were removed from the role.

Also skip molecule tests from galaxy roles.

TrivialFix

Change-Id: I233e5468054e950a80355bdc2205bd6070a12297
2019-11-01 14:39:24 +00:00
Mark Goddard 7ed7b27bc4 Add retries to ansible galaxy install for all envs
Galaxy install often fails in CI, scuppering an otherwise good run.

Change-Id: I3d02afe33cdf32b1d285bd4bdc4a8074883113ca
2019-07-04 13:02:04 +00:00
Mark Goddard 4f5e87dbf2 Update release notes for stable/rocky
Also updates the release.sh script to support tagging release candidates
and development milestones. Adds zuul configuration to trigger a
Readthedocs webhook for the release notes.

Change-Id: Ia784b34fb0b740998de72599d4921f9303e41cac
2019-02-15 11:23:43 +00:00
Mark Goddard b87135d3c3 Add release.sh, a script for creating releases
Also adds documentation on releasing to the developer guide.

Change-Id: Ic26daf362ce79fa1ea9ce217cf470d85c961affa
2018-11-18 17:41:43 +00:00
Mark Goddard 823e50cce7
Merge branch 'master' into molecule-kolla-openstack 2018-02-22 15:19:15 +00:00
Mark Goddard d57969beb9
Merge pull request #84 from ktibi/ceph_tag
add storage group and ceph tag
2018-02-22 14:51:45 +00:00
Mark Goddard 318f73cc52 Add a tox environment & dependencies for running molecule tests 2018-02-20 18:48:28 +00:00
Mark Goddard 1999110bbc Fixes for ceph block device tagging (#1)
* Install galaxy roles before running ansible tests

* Use package module in kolla-ceph to support Debian-based systems

This is required for running tests in TravisCI.

* Fix kolla-ceph unit test

* Add more tests for kolla-ceph

Journal tests are currently failing on my laptop due to partition labels
being truncated.

* Add .gitignore for stackhpc.parted-1-1 galaxy role

* Run all test cases

Run all test cases, collecting failures, then report at the end.
2018-02-09 14:42:38 +01:00
Mark Goddard 6beb880486 Add bashate to pep8 tox environment 2018-02-06 11:54:12 +00:00
Mark Goddard bca931693f Remove stale script configure-kayobe.sh 2017-11-17 09:11:49 +00:00
Mark Goddard ee09ae8f4a Add sphinx8, a thin wrapper around doc8 that supports sphinx 2017-09-04 11:01:02 +01:00
Mark Goddard 1d9e8fc976 Separate the external network into external and public
Previously, the external network carried both public API traffic and
neutron external network traffic. In some cases is it useful to separate
these networks. The public network now carries the public API traffic,
leaving the external network to carry neutron external network traffic
alone. For backwards compatibility, the public network defaults to the
external network.
2017-08-29 13:12:47 +00:00
Mark Goddard 253ed034f0 Add tool to count LOC 2017-05-29 16:59:34 +01:00
Mark Goddard caf9b52ac7 Add kayobe python module with CLI
The CLI replaces all existing shell scripts except for
configure-kayobe.sh. Other shell scripts are now removed.
2017-02-28 16:17:54 +00:00