Commit Graph

29 Commits

Author SHA1 Message Date
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 0e4af118eb Support additional build host packages for IPA & overcloud
Adds support for installing additional build host dependencies when
building IPA and overcloud host images via
'ipa_build_dib_host_packages_extra' and
'overcloud_dib_host_packages_extra'.

Support for installing additional host packages was added in
stackhpc.os-images v1.15.0 [1].

[1] https://github.com/stackhpc/ansible-role-os-images/pull/63

Change-Id: I1a05d448031cb415cec4cd601a030abdb8a5eba5
2022-08-22 15:24:55 +02:00
Pierre Riteau 4ce746c199 Force use of yoga upper constraints in ipa-builder
IPA itself is still compatible with Python 3.6, but ipa-builder uses
master upper-constraints which have dropped support for 3.6 and are
pulling importlib-metadata===4.11.4, which requires 3.7.

    ERROR: Cannot install ironic-python-agent==8.6.1.dev13 because these package versions have conflicting dependencies.

    The conflict is caused by:
        ironic-python-agent 8.6.1.dev13 depends on importlib_metadata>=1.7.0
        The user requested (constraint) importlib-metadata===4.11.4

Change-Id: I0cc48d0d5ed17400badb081e9117c9351677bb38
2022-06-10 15:18:46 +02:00
Will Szumski 156ae2bb8b Set requirements branch for IPA build
Currently we use the HEAD reference for OpenStack requirements. This can
create images that are incompatible with your version of OpenStack.

See:
https://review.opendev.org/c/openstack/ironic-python-agent-builder/+/688911

Change-Id: I42026fafb1be0071f5ec94e81881c4a3bdd34af8
Story: 2009810
Task: 44371
2022-02-01 11:39:28 +01:00
Michal Nasiadka b62a9aaefc ipa: Use openstack_branch instead of master
ironic-python-agent-builder has stable branches since Wallaby -
let's use them.

Also as per ipab docs [1] - the env vars for overriding ipa repo
are:
- DIB_REPOREF_ironic_python_agent
- DIB_REPOLOCATION_ironic_python_agent

[1]: https://docs.openstack.org/ironic-python-agent-builder/latest/admin/dib.html#building

Story: 2009755
Task: 44224

Change-Id: I025532156de831a0e7d025d61601a38202de10ff
2021-12-22 18:16:49 +00:00
Pierre Riteau aecaac7beb Revert to Xena IPA images
Change-Id: I84a51fcd880971487cda6ccc5edfa4161dbb2156
2021-09-20 08:20:56 +00:00
Mark Goddard 1dc6d98be7 Revert "Use OpenStack Wallaby release"
This reverts commit 3f76d7d134.

The version of IPA images has been pinned to wallaby to ensure they are
compatible with the Wallaby Ironic in current Kolla master images.
Without this, bare metal tests fail with

    'Not found: Extension with id iscsi not found.'

Ironic removed the iscsi driver in Xena.

Change-Id: Ia4c70965d9f3f099046591bac7f702ee982fef71
2021-06-07 15:19:52 +01:00
Mark Goddard 1cac2ccbc8 Add os_release variable, build CentOS stream images
* add os_release variable
* build CentOS stream overcloud root disk images
* build CentOS stream IPA images

Story: 2008795
Task: 42417

Change-Id: I3d231076052fbfa8416f34c038c02fd10a1c37f2
2021-05-04 16:03:08 +00:00
Pierre Riteau 56c1a886f5 Add ipa_build_upper_constraints_file variable
This variable allows to customise the upper constraints file used to
install packages inside the ipa-build-dib virtual environment. This can
be used when we need a newer version of diskimage-builder than the one
available in upper constraints for the current release.

Change-Id: Idbe57e7edc3fae25153f5e24ad6b7847b1c4660c
2021-02-19 16:13:38 +01:00
Mark Goddard 20fb05bfb4 IPA: Switch to IPA builder and CentOS 8
Switches to use the IPA builder project for building IPA images.

Switches the IPA images used by default to CentOS 8 based image.

Changes the file extension of the IPA kernel image from vmlinuz to
kernel.

Story: 2007070
Task: 37953

Change-Id: I82fc455f41f48dacb453e135870dd776895d7c99
Story: 2006574
Task: 39485
2020-06-12 17:24:31 +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
Will Szumski f16ff2b64e Switch default IPA images to centos
The CoreOS images are no longer built or maintained.

Change-Id: I8928c2def85070f6310e5fb859abf21b3e234256
Story: 2007021
Task: 37808
2019-12-16 10:11:17 +00:00
Zuul 27138f3a2f Merge "Support installing packages in IPA images" 2019-12-06 18:04:36 +00:00
Mark Goddard 6b4f180a1e Support installing packages in IPA images
Diskimage builder supports specifying a list of packages to install via
-p. We currently support this for the root image, but not IPA images.

This change adds a new configuration option, 'ipa_build_dib_packages',
that should be a list of additional packages to install in locally built
IPA images. This affects the following commands:

kayobe seed deployment image build
kayobe overcloud deployment image build

This depends on
https://github.com/stackhpc/ansible-role-os-images/pull/25.

Also adds an example to the documentation for the equivalent option for
root image.

Change-Id: I04191d9541894b6a264e966c9ecb1056e0edade4
Story: 2006855
Task: 37446
2019-11-28 16:32:30 +00:00
Mark Goddard 492605b64d Remove unused IPA config variables
These are not referenced anywhere in the code.

Change-Id: I0782fb095cc074fd586d87aa338cefb72b1b70e2
2019-11-08 11:10:10 +00:00
Mark Goddard 48c643abbe Include branch name in URL for IPA on master
While CoreOS images have a copy with and without the -master suffix,
tinyipa images which kayobe-config-dev has switched to, do not.

This change includes the branch name always.

https://tarballs.openstack.org/ironic-python-agent/coreos/files/

TrivialFix

Change-Id: Iff1504d17ecefd901d1c29c748a776a69a45b304
2019-08-22 13:52:42 +01:00
Will Szumski 96a946fee1 Fix custom ironic python agent environmental variables
See: e796b3bc18/diskimage_builder/elements/ironic-agent/environment.d/01-ironic-agent.sh (L5)

Story: 2006146
Task: 35642
Change-Id: Ice620746e3ab0e9aac05f085e8f43b432679f221
2019-07-01 15:46:01 +00:00
Mark Goddard 5b9f85d715 Update git.openstack.org to opendev.org
The project infrastructure is now hosted at opendev.org.

Kayobe projects have been moved from the openstack/ namespace to x/.

Change-Id: I16b523285eb34c1cd0eaf920aa4512d0ae1b4f05
2019-04-24 14:00:18 +01:00
Mark Goddard 73063732aa Add openstack_release and openstack_branch
Adds two new variables, 'openstack_release' and 'openstack_branch',
in ${KAYOBE_CONFIG_PATH}/openstack.yml for setting the current OpenStack
release and branch in a single place.

Also uses the master branch for the molecule tox job.

Change-Id: I851a1e6eddc6738005c1813599445b38c0ae0d57
2019-04-15 11:41:07 +00:00
Mark Goddard eda8246b7b Use master version of dependencies
Use master branch of:

* Kolla
* Kolla ansible
* Bifrost
* IPA
* OpenStack services
* Requirements

Also, use the infra docker registry mirror at port 8082 which does not
have any path component in its URL, and so works with Docker CE.

Depends-On: https://review.openstack.org/#/c/651254/
Change-Id: Icdb62aa0083d9272a08421138719cf5f6b52ec5a
Story: 2001864
Task: 14316
2019-04-09 16:55:02 +00:00
Mark Goddard 935d3cef6a Update dependencies to Rocky
Use stable/rocky branch of:

* Kolla
* Kolla ansible
* Bifrost
* IPA
* OpenStack services
* Requirements

Also updates Kolla Ansible inventory template.

The seed deploy job has been made non-voting and non-gating, because we
are waiting for bifrost change https://review.openstack.org/#/c/618740
to merge, be released, and for the kolla bifrost image to use the new
package.

Change-Id: Id5e7fdbd196f96e1e75ffc68bc93aab18fa38aa7
Story: 2001864
Task: 27798
Depends-On: I58e4f951d4a3dd89e0784fd82d8a62dbba374f79
2018-11-19 14:37:33 +00:00
Mark Goddard ef84890798 Fix IPA image download
The IPA ramdisk and kernel images may be built or downloaded via a URL.
If the latter option is used, any images previously downloaded to
$KOLLA_CONFIG_PATH/config/ironic/ironic-agent.* would previously not be
updated if the image contents change.

This change introduces variables for setting a URL to a file containing
checksums for the images. The algorithm used to compute the checksum is
also configurable (default sha256). This allows us to ensure we are
using the correct version of the image, while avoiding an expensive few
hundred megabyte image download just to check.

If a checksum is not specified, the image will be downloaded every time
to ensure that it is up to date.

Change-Id: I8120518ed98d61f3652f5205ce7ec9f798ab2aa1
Story: 2001660
Task: 6693
2018-10-02 13:30:11 +01:00
Mark Goddard f86c0ff48f Use queens version of dependencies
Use queens release of:

* Kolla
* Kolla ansible
* Bifrost
* IPA
* OpenStack services

Changes to kolla inventory files were made by comparing the multinode
inventory in kolla-ansible with the overcloud-services and
overcloud-components templates.

Kolla ansible added the concept of inner-compute and external-compute,
and these groups have been added to the top-level inventory.

We also synchronise globals.yml and kolla enablement flags.

Change-Id: I87b052f777567226e41294b955f736040e55e102
Story: 2001863
Task: 14315
2018-05-02 11:40:46 +01:00
Mark Goddard f008b6a675 Update software dependencies to pike releases
For kolla, kolla-ansible and bifrost, we are now using a stackhpc/<release> branch
naming scheme rather than referencing tags in forked repos. It is recommended to
override these branches to specific tags for repeatable builds.

The Ironic Python Agent source version and tarball URLs have also been updated to
point to the pike release artifacts.

Finally, the kolla_openstack_release has been set to 5.0.0, following the
kolla-ansible second pike release candidate on which the stackhpc/pike branches
are currently based.
2017-09-18 21:41:47 +01:00
Mark Goddard f17f82a0fc Improve configuration of IPA collectors and benchmarks
Rather than specifying kernel command line arguments directly, configuration of
IPA introspection data collectors and benchmarks is now possible by extending
lists of collector (ipa_collect_extra) and benchmark (ipa_benchmark_extra)
names.  LLDP collection is now controlled via a flag, ipa_collect_lldp.
Additional kernel arguments may be passed via ipa_kernel_options_extra.
2017-08-22 15:12:05 +00:00
Mark Goddard ebb81e49f1 Add command to build IPA deployment images for the seed
The CLI command is:

kayobe seed deployment image build

This command will build Ironic Python Agent (IPA) kernel and ramdisk images
using the Diskimage Builder (DIB) ironic-agent element. The built images will
be copied to the appropriate location in the bifrost_deploy container on the
seed.

This allows us to build a customised image with site- or hardware- specific
extensions.
2017-08-22 15:12:05 +00:00
Mark Goddard cb403208be Allow IPA images to be built locally
This will be performed by kayobe overcloud post configure if ipa_build_images
is True.
2017-04-21 16:39:28 +01:00
Mark Goddard d6f08f0c87 Add additional ironic inspector collectors
Benchmarks are currently disabled as they require an additional python module
(hardware) in the IPA ramdisk
2017-04-05 11:05:49 +01:00
Mark Goddard 70e3ab4ab2 Add support for registering IPA images in overcloud 2017-03-15 16:42:32 +00:00