Commit Graph

306 Commits

Author SHA1 Message Date
Zuul 7a6af41a26 Merge "Deprecate ironic-inspector support" 2024-02-20 19:53:25 +00:00
Dmitry Tantsur dcbf1d98b9
Deprecate ironic-inspector support
Switches to the built-in inspection by default and deprecates support
for ironic-inspector. The actual removal should happen after we get
inspection rules in since it's the last feature that is relevant for
bifrost.

Depends-On: https://review.opendev.org/c/openstack/ironic/+/907398
Change-Id: Id157d5ada2ff3f87f3f4d161423b1f3989f73194
2024-02-01 14:50:16 +01:00
Sharpz7 4529d48afe [codespell] Fixing Spelling Mistakes
This is the first in a series of commits to add support for codespell. This is continuning the process completed in ironic-python-agent.

Future Commits will add a Tox Target, CI support and potentially a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.

Change-Id: I41b2db35cdf21917ac20ed0866af3b9c94789f0b
2024-01-25 21:31:33 +00:00
Zuul 3e19ff80eb Merge "Collect lshw output in json format" 2024-01-25 15:22:17 +00:00
Zuul 6065da92b1 Merge "Configure the new inspection implementation" 2024-01-25 11:26:44 +00:00
Riccardo Pittau 40b277b7bd Collect lshw output in json format
Add lshw json output to test logs

Change-Id: Id0689f7111719d166a52f45ac911923646439297
2024-01-22 12:41:56 +01:00
Riccardo Pittau c64f6ba5c1 Uplift default Ansible version to 8.x
Change-Id: Iabb9f55b8dacc7ef9965ac60d67e70b60dd723c5
2024-01-09 09:35:18 +01:00
Dmitry Tantsur ea0b4ec50b
Configure the new inspection implementation
The ironic-inspector one is still the default at this point.

Change-Id: I431ced6496ca6dac078a240f653afd33256048f6
2024-01-05 15:13:56 +01:00
Dmitry Tantsur 069cfae34e
Slightly reduce the disk size when testing DHCP
With 3 testing nodes, we're running out of space on Ubuntu nodes.

Change-Id: If1d430e347cadf1e3519ce9fcdfdf1b3070df7de
2023-12-19 12:28:10 +01:00
Riccardo Pittau 35c3d51dc4 Update default ansible version
Uplift default Ansible version to 7.x

Change-Id: I98d240e2ec2c61e662647dc8b0159934ada18431
2023-12-15 09:53:20 +01:00
Zuul 7a9e8b71bf Merge "Replace Cirros references with generic descriptors" 2023-09-05 17:05:38 +00:00
Matt Crees a6ce283146 Replace Cirros references with generic descriptors
Often it is beneficial to use the functionality provided by `use_cirros`
and `cirros_deploy_image_upstream_url` to download and test with images
of other OS distributions. This patch changes the variable names to
reflect that use case.

`use_cirros` -> `download_custom_deploy_image`
`cirros_deploy_image_upstream_url` -> `custom_deploy_image_upstream_url`

The functionality of the old variables is retained for backwards
compatability.

Co-Authored-By: Alex Welsh <alex@stackhpc.com>

Change-Id: I8b3a973bd5ef19333af563c170b2a28fbbfb5c76
2023-08-10 11:41:32 +01:00
Maksim Malchuk e3fb8c54d0 Create the log file for the disk-image-create command
Change-Id: Iab88b3a28378cc22f767204bef84128bc9627210
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
2023-05-09 09:03:07 +00:00
Riccardo Pittau fb6d6d6fe9 Fix enabling epel repo for rpm distributions
The epel packages are installed but their content is purged in the
centos nodes. Removing and reinstalling them when we run tests in
CI to reenable their content.

Change-Id: Ibf1d810a37811151449f79a24bb837db6663cce5
2023-03-08 16:43:58 +01:00
Steve Baker 51d988af54 Support PXE network boot with grub
It is now possible to do a PXE network boot with grub as an
alternative to iPXE. Grub is loaded via the signed shim, so it may
allow end-to-end automated deployments with secure-boot enabled.

To use grub network boot, deploy bifrost with variable
``default_boot_interface`` set to ``pxe``.

This feature is tested by job
bifrost-integration-redfish-uefi-fedora-latest.

test-bifrost.sh is also modified to only enable the hardware-type
driver which matches driver used for test nodes. This allows a default
interface to be set which is not supported by one of the enabled
drivers (for example, ironic will exit because the ilo driver doesn't
support the pxe boot interface)

Change-Id: I8ac33d0aa0f71b092d2c0538ac3a73491ff44921
2023-01-19 10:33:21 +13:00
Steve Baker ea99b85883 Copy shim and grub into tftp and http directories
In preparation for grub network boot, copy the shim and grub efi files
to serving directories.

Change-Id: If181b31c0c69201a1f6d6424f7f4c1322d61eea3
2023-01-19 10:31:00 +13:00
Riccardo Pittau 786f891749 Use ansible 6.x
Use tags instead of numerical ids for better compatibility
with latest ansible-lint versions.

Change-Id: I87431617eacf380aada94c5c3ed534476ddfb1ce
2022-11-29 14:32:56 +01:00
Zuul 243fb1dd97 Merge "Switch bifrost to use the dnsmasq DHCP driver" 2022-11-16 19:24:42 +00:00
Zuul 1eebf4b0ad Merge "Remove remaining traces of Suse" 2022-11-02 16:06:22 +00:00
Steve Baker 8d273d1314 Switch bifrost to use the dnsmasq DHCP driver
Enable the dnsmasq DHCP provider by default, so it is tested in all
jobs except bifrost-integration-dhcp-ubuntu-focal and
bifrost-integration-dhcp-centos-9, which use the "none" provider and
the old static dnsmasq.conf.

Depends-On: https://review.opendev.org/c/openstack/ironic/+/851681
Change-Id: I3a41541ededb647a45f91cb17aff1c6c9b84ab41
Story: 2010203
Task: 45923
2022-10-28 08:39:23 +13:00
Erik Berg 4a17e35adc Switching netstat to ss in report
Probably should have happened a long time ago [1]. netstat doesn't
come out-of-the-box with some distributions these days.

[1] https://lwn.net/Articles/710533/

Change-Id: Idcd2099cca715837a3ad9bd595fa8f08531ef863
2022-10-24 18:20:03 +02:00
Erik Berg eb5fab25a3 Remove remaining traces of Suse
It's been deprecated, time for removal.

Change-Id: I84c441f54c5793fe94b50810cda25f9eacee8c7e
2022-10-24 17:50:19 +02:00
Zuul 8f85e01fe1 Merge "Test redeploy-dynamic when cirros/tinyipa are used" 2022-07-15 15:58:51 +00:00
Dmitry Tantsur d95a1fe078 Test redeploy-dynamic when cirros/tinyipa are used
This is a documented feature, we need to validate it.

Rename a variable to prevent it from clashing with one in the roles.

Pull cloud configuration to be able to work with TLS.

Change-Id: Ie41060dba2ae8c2dd88e0e6f9b574b7214302983
2022-07-08 15:56:49 +02:00
Riccardo Pittau 969a5e623f Use Ansible 5.x
Support most recent version of Ansible up to 5.x as default.

Change-Id: Ia2e9c78c56f6d0314471973e71de0b45e3309d71
2022-06-01 11:27:21 +02:00
Erik Berg 7640a231a8 Allow for almalinux and rocky installations
With the changes to bifrost-ironic-install required_defaults for
the RedHat_family, we can now try to not get in the way of
deploying on distros like almalinux and rocky.

Fedora 32 has been EOL for close to a year, so we'll just assume
firewalld for that case. Distributions RedHat, CentOS and Fedora
are in the RedHat_family, so assume firewalld all distributions
in the family.

Change-Id: I1c8b768a3daf0af0d8e30d935558b6fdd912adfd
2022-04-19 15:29:06 +02:00
Dmitry Tantsur 2fe879dd0d Fix the CI on CentOS 9
* Prefer modern SSH key algorithms
* Generate an ECDSA key if Cirros is used
* Always resolve symlinks when copying logs

Remove all previous work-arounds.

Change-Id: Ie9248584c71f7d326d5839710d6b9bdf6d779749
2022-03-04 14:46:41 +01:00
Riccardo Pittau f2825ad1d9 Enable epel repository only when needed
The epel repository is used only when we need to build a debian-based
IPA image, so we enable it only in that case for CentOS Stream 8/9.

The configuration procedure is explained in the official guide [1].

[1] https://docs.fedoraproject.org/en-US/epel/#_el9

Change-Id: I57513883c0fa8d6ffb2c70debb81d5e7e6d8b221
2022-02-01 11:04:15 +01:00
Zuul 9c2a1790fc Merge "Make virtual environment owned by root" 2022-01-31 03:23:11 +00:00
Zuul f3061e0a42 Merge "Generate an environment file during bifrost-cli install" 2022-01-25 17:10:15 +00:00
Dmitry Tantsur 4cb0395d75 Make virtual environment owned by root
It's dangerous to allow a regular user to write into the source code of
the services. The repositories are still writable, so that the
development workflow can still use the ``--develop`` flag to make
modifications.

While here, remove the horribly outdated and broken ANSIBLE_INSTALL_ROOT.

Change-Id: Id2e25dd57668d24a11dc2cd16eea2b607b7a3f16
2022-01-25 15:59:42 +01:00
Zuul 5c83d1a7dc Merge "Use the combined Ironic service instead of API+conductor" 2022-01-25 12:20:23 +00:00
Dmitry Tantsur 3cb96f1b67 Tighten permissions for PXE directories
Make the HTTP directory not world readable by default.
Images may contain secrets, so regular users should not read them.

Add nginx and dnsmasq to the ironic group so that they can read ironic
files that are group accessible.

Change-Id: Iaa8585fb48e5db6c0d5063dca0d84c9d2300f0c9
2022-01-14 12:56:36 +01:00
Zuul 5fd6251f22 Merge "Move /httpboot to /var/lib/ironic" 2022-01-10 15:06:29 +00:00
Dmitry Tantsur 9b83665d83 Generate an environment file during bifrost-cli install
It is recommended to pass the same variables (e.g. testing) to other
commands and playbooks, the new file makes it possible.

Change-Id: I2adc4e2dcfd8555b2c9e6c3bf0f512f603367091
2022-01-06 15:36:47 +01:00
Dmitry Tantsur 779e4d8a1c Move /httpboot to /var/lib/ironic
There is no guarantee that /var is not on a separate filesystem. Also
we should not pollute the root directory with our stuff.

The TFTP directory /tftpboot is left where it is, since it needs to be
accessed by dnsmasq. We may consider moving it later on.

Removes the wildly outdated statement about purging the image cache
from the documentation.

Change-Id: Ib1e46e7a9c5eec193082858614026ca4c9f537ac
2022-01-05 16:07:15 +01:00
Dmitry Tantsur 30ea9714aa Change the default image to a DIB-built one
We should use production-friendly defaults. TinyIPA is not suitable for
real bare metal.

Change-Id: Ifcba626ba898bde443674beacd4417d2fe876bf4
2021-12-22 18:21:42 +01:00
Dmitry Tantsur ea2d2a37a4 Use the combined Ironic service instead of API+conductor
Change-Id: I9faecfe6ece6d3c35396e3378c1e3930a487e130
Depends-On: https://review.opendev.org/c/openstack/ironic/+/819620
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/820513
2021-12-06 11:39:54 +01:00
Zuul f7a36512a9 Merge "Revert "Explicitly trap on ERR" and fix exit code hanlding" 2021-11-22 22:52:22 +00:00
Zuul 5728a87682 Merge "Remove the keystone admin endpoint" 2021-11-22 14:31:19 +00:00
Dmitry Tantsur 3dbc7347ec Revert "Explicitly trap on ERR" and fix exit code hanlding
Trapping on ERR does not do what is implied here and is redundant when
trapping on EXIT is used together with `set -e`. The real problem is
that in the CI scripts we pipe test-bifrost.sh into tee with a log file
without setting -o pipefail in bash. This change fixes it.

This reverts commit b31bc66726.

Change-Id: Ifca4049f5967c0b2153ecffb4c153a96b4a62cc7
2021-11-22 10:35:29 +01:00
Michal Nasiadka 72ad77f914 Bump up Ansible to 4.x
As per [1] and [2] - Ansible versions prior to 4 are not maintained.

[1]: https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html#ansible-community-package-release-cycle
[2]: https://docs.ansible.com/ansible/devel/reference_appendices/release_and_maintenance.html#ansible-core-release-cycle

Change-Id: I06cf6723361010e0a7c6eb07f2d9e570192cd9a4
2021-10-22 08:05:07 +00:00
Dmitry Tantsur da084360e5 Remove the keystone admin endpoint
It's no longer needed and was deprecated in Xena.

Change-Id: Idff1097c13f483f8290bc800388cff3746324dbd
2021-10-04 14:46:27 +02:00
Zuul 3cb30372ca Merge "Explicitly trap on ERR" 2021-09-21 11:15:26 +00:00
Zuul dc9ac16ea1 Merge "Add uWSGI role and use systemd instead of emperor mode" 2021-09-20 10:52:37 +00:00
Julia Kreger b31bc66726 Explicitly trap on ERR
Change-Id: Ie4b9a281bf7dfe6b4ab05a03e8bf016619105953
2021-09-14 16:50:18 -07:00
Zuul 0b5d61b3f1 Merge "CI: collect keystone information" 2021-09-13 16:05:02 +00:00
Dmitry Tantsur 5c1881282c Add uWSGI role and use systemd instead of emperor mode
Using the emperor mode of uWSGI is redundant now that we depend on
systemd. This change switches uWSGI Keystone to systemd template services
based on the recipe from the uWSGI documentation [1].

A new role is created to encapsulate the uWSGI login in anticipation of
switching Ironic API to uWSGI as well. Reduce repetition in Keystone.

[1] https://uwsgi-docs.readthedocs.io/en/latest/Systemd.html

Change-Id: I50bc3f7a4faf14c36b92e7656b7149e9c833c85e
2021-09-04 15:57:04 +02:00
Dmitry Tantsur d4ddc05399 CI: collect keystone information
Change-Id: Icaff9cb99990e499565a4401f206a15650cefaf1
2021-08-26 16:14:55 +02:00
Dmitry Tantsur 7e1dbbd0de CI: copy bifrost logs to the log directory
Using them is more convenient than scrolling the whole output,
especially in case of upgrades.

Change-Id: Ib086f106a0e78d247bac5fa63801c2fecb40efa8
2021-08-26 16:13:43 +02:00