Compare commits

...

121 Commits

Author SHA1 Message Date
Matt Anson
8b246c2316 Don't install biosdevname in arm64/aarch64 arches
Closes-Bug: #2105867
Change-Id: I57e494c6e01c45a5e102c575eaa6101a2b440868
2025-04-01 17:07:40 +01:00
satoshi-sh
a9964026d5 Convert README.md to README.rst
Fixed the formatting issue.

Change-Id: I906b5c37601675b578276fc4c50629450c03bd55
2025-03-27 20:29:44 +00:00
Zuul
aebdf6082d Merge "Create Podman DIB Element for container-based cleaning" 2025-03-26 23:06:59 +00:00
satoshi-sh
9b2277302d Create Podman DIB Element for container-based cleaning
Create ironic-python-agent-podman. It installs podman and create conf files for podman, ipa, and cleaning steps
Add explanation how to configure on README.rst

Partial-Bug: #2100556
Change-Id: Id78f0488b4aee34a2682f51d5e647ad81f9e505f
2025-03-26 19:17:15 +00:00
334fd79f97 Update master for stable/2025.1
Add file to the reno documentation build to show release notes for
stable/2025.1.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2025.1.

Sem-Ver: feature
Change-Id: I8f985f9a4393cc12e3fa8e1e5bf213b10be5b586
2025-03-18 17:21:56 +00:00
Zuul
72a02b7b68 Merge "Prevent service restart while in 'rescued' state" 2025-03-05 15:37:54 +00:00
Zuul
4dba6f4ef2 Merge "Change to maximum compression level when using lzma" 2025-03-05 14:41:45 +00:00
Zuul
4a9f329f69 Merge "fix: Adds bsdextrautils package for Debian which provides hexdump command" 2025-03-05 11:01:07 +00:00
Nicholas Kuechler
0b3f3dc110 fix: Adds bsdextrautils package for Debian which provides hexdump
command

Change-Id: I48cb65c94f697dbdd42cc09a2d473e4202ec48c8
2025-03-04 13:05:21 -06:00
cid
36b5e11de6 More reliable TinyIPA builds with network retries
Wraps `wget` command with sleep and mutiple retry
support for resilient network downloads and replaces
git clone with direct tarball downloads where possible.

Closes-Bug: #2098417
Change-Id: I49435f5c1a7c0628e4eb7e824322d4e1f2938588
2025-02-26 13:02:07 +01:00
Kaifeng Wang
f340ae3100 Change to maximum compression level when using lzma
The deploy image is getting larger and larger, by specifying a higher
compression level, usualy we can save a couple of MB. Smaller image
has higher performance when deploying nodes with PXE.

This patch changes the default compression level to 9 to have the
minimum image size.

Change-Id: Id20292e73796b2c0d72a4d3f5279e02fc3a2757a
2025-02-18 21:35:56 +08:00
cid
142834e41b Prevent service restart while in 'rescued' state
Closes-Bug: #2086865
Change-Id: I8c8b0c9f168ccc165c17e1c57a74831d12dfc1a7
2025-02-13 23:39:36 +01:00
Kaifeng Wang
46a8e0104e Remove unnecessary firmware from deploy image
Remove several wifi related firmware that is not required in the
deploy image.

Change-Id: I2cce855b600f5d5165012182bf1db342f23cdd96
2025-02-06 10:31:34 +08:00
Jay Faulkner
2cab2e4143 Deprecate ironic-lib
Ironic-lib code has been rolled into Ironic-Python-Agent and Ironic
where used; we no longer should support installing ironic-lib on master
versions of IPA-builder.

Depends-On: https://review.opendev.org/c/openstack/ironic-python-agent/+/937743
Change-Id: I29acfa275adc6aa3ec187883e6a096bf4038e9f6
2025-01-16 22:25:27 +00:00
Riccardo Pittau
ef33cc89e7 Move jobs and DIB builds to ubuntu noble
Change-Id: Iafb7606d57e69a88a0dfe36673d1489820551ede
2024-12-23 11:08:50 +01:00
d6008a941d reno: Update master for unmaintained/2023.1
Update the 2023.1 release notes configuration to build from
unmaintained/2023.1.

Change-Id: I024e3bb47243c97ce8e48f15150a86797ae3829f
2024-11-29 07:53:54 +00:00
LALLAU Bertrand
8a27cf7167 Fix vmedia network config drive handling
The publisher ID generated by Ironic (using oslo.util) is actualy in lowercase,
hence it will never match publisher ID generated by udevadm (uppercase).
In order to compare these strings without case conflict, we put both in lowercase.

Closes-Bug: #2085355
Change-Id: I501c8b46128de38c634b1c159a40ffb0d7a64f4c
2024-11-05 15:59:05 +01:00
Takashi Kajinami
ac07c360a5 Drop unnecessary 'x' bit from doc config file
This file is not actually executable.

Trivial-Fix

Change-Id: I70fd3dfba4e4bf1fad7680aee245b8874bc5220a
2024-10-21 11:20:46 +00:00
a23d3d0328 Update master for stable/2024.2
Add file to the reno documentation build to show release notes for
stable/2024.2.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.2.

Sem-Ver: feature
Change-Id: Ia9b6c4211bc920dce9b8b387155cf53366ea186d
2024-09-20 13:51:47 +00:00
Zuul
e29375da7e Merge "Block glean-early.sh from running" 2024-06-29 00:07:25 +00:00
Julia Kreger
a106110fcf Remove centos7 specific logic check
At this point, we are no longer supporting Centos7 ramdisks
and don't need to have extra logic to navigate the difference.

Change-Id: I9027b45f1f77f2cd188a8c5eed2ef082c3abdd09
2024-06-18 12:17:09 -07:00
Julia Kreger
6c3a8f174f Block glean-early.sh from running
Ironic has replaced the mount logic used by glean-early.sh with
it's own safer alternative.

Change-Id: If94901d1533ee6a51eaafe4ae114af901ab7e18d
2024-05-28 10:23:22 -07:00
Julia Kreger
76e2a71d58 Block cloud-init user-data loading
When cloud-init is present inside of an IPA ramdisk,
it can attempt to load user data it finds. This is not
needed in an IPA ramdisk.

https://docs.cloud-init.io/en/20.1/topics/format.html#disabling-user-data

Change-Id: Ic4fcbcc633833c062a35fc06b44843f4f6e5b1e9
2024-05-28 17:12:34 +00:00
Zuul
6a767738f4 Merge "Match publisher id" 2024-05-15 17:14:34 +00:00
Julia Kreger
f92befe127 Match publisher id
Take a publisher ID and match it for mounting configuration drives
to prevent the wrong device from being used.

Change-Id: Iafa77d9213eba864ca6dfa2d56d294e6ef4d2cd4
2024-05-07 14:27:37 +00:00
811c63b3b7 reno: Update master for unmaintained/zed
Update the zed release notes configuration to build from
unmaintained/zed.

Change-Id: I2aba74bd3975b15c90a39746a174d181f1bea817
2024-05-06 06:22:32 +00:00
6fdaa6fabc Update master for stable/2024.1
Add file to the reno documentation build to show release notes for
stable/2024.1.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2024.1.

Sem-Ver: feature
Change-Id: I844d71c552a6faf98f6ded9dd060161ecd79577b
2024-03-19 11:10:24 +00:00
Zuul
711899e575 Merge "reno: Update master for unmaintained/xena" 2024-03-14 11:57:56 +00:00
4b48bc311f reno: Update master for unmaintained/xena
Update the xena release notes configuration to build from
unmaintained/xena.

Change-Id: I00a37dc792fcb7e5866c492a63145f86ec3ea252
2024-03-14 11:26:44 +00:00
53030729dd reno: Update master for unmaintained/wallaby
Update the wallaby release notes configuration to build from
unmaintained/wallaby.

Change-Id: I6f011c9b9caecbd533a31850601e441c7c0363e5
2024-03-14 11:22:11 +00:00
Riccardo Pittau
1d2877e872 Update ipmitool version to 1.8.19
Change-Id: I75f6347a525bd30ad4d0cfe28c767620a9fb5aa5
2024-02-27 15:31:09 +01:00
Riccardo Pittau
dfd24a946e Update link to ipmitool repository
IPMITool is now hosted under https://codeberg.org/IPMITool/ipmitool.git

Change-Id: I64388569f09e95736376659e2921689b2a604814
2024-02-27 09:32:07 +00:00
Riccardo Pittau
99adeec0d7 Update tinyipa to tinycore 15.x
Tinycore 15.x is out!
https://forum.tinycorelinux.net/index.php/topic,26861.0.html

Change-Id: I0779c6ae783ddf2d0d102a85fdd2d4db474d8eaf
2024-02-26 14:45:20 +01:00
efe4b0d7f2 reno: Update master for unmaintained/yoga
Update the yoga release notes configuration to build from
unmaintained/yoga.

Change-Id: I239c1b3936b88b1bc636d92ea7852ca0e8c835e1
2024-02-06 15:03:29 +00:00
Zuul
1e5a1166dc Merge "[codespell] Adding CI target for Tox Codespell" 2024-02-01 00:44:15 +00:00
Zuul
800c6040fb Merge "[codespell] Adding Tox Target for Codespell" 2024-02-01 00:44:14 +00:00
Zuul
a00debaadd Merge "[codespell] Fixing Spelling Mistakes" 2024-02-01 00:44:13 +00:00
Takashi Kajinami
beabe8591c Bump hacking to 6.1.0
... which is the latest version available now.

Change-Id: I0829b8aa90d66037c9fa7d803203b835f8735414
2024-01-29 18:28:06 +09:00
Sharpz7
1458cbabd4 [codespell] Adding CI target for Tox Codespell
Third in a series of commits to add Codespell to Ironic Repos. This commit adds the Tox Target to CI

A future commit could potentially add a git-blame-ignore-revs file if their are lots of spelling mistakes that could clutter git blame.

Change-Id: Ica261e5e528bde8ec4f1627f3560e8c2022e3370
2024-01-26 04:11:47 +00:00
Sharpz7
da3fccba48 [codespell] Adding Tox Target for Codespell
Second in a series of commits to add Codespell to Ironic Repos. This one adds the command that was used to fix the spelling errors.

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

Change-Id: Ie6d9f79138c39a530daeb471b2cf4a9bf19b5a98
2024-01-26 04:11:43 +00:00
Sharpz7
a48825d260 [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: I6ce80cc993cdd4c8d38266f3ff3f8f134f0fc5a9
2024-01-26 04:11:31 +00:00
Zuul
bdbbc53885 Merge "Drop TripleO job" 2024-01-16 23:38:28 +00:00
Zuul
0b05bfc1bb Merge "Switch IPA building to Debian Bookworm" 2024-01-16 23:34:58 +00:00
Takashi Kajinami
e392a47c13 Drop TripleO job
The TripleO project has been deprecated and its master is no longer
maintained.

Change-Id: Ie7af68c26fcc345ca8f67ba437a0a9e83c12a6cf
2024-01-02 22:43:45 +09:00
Zuul
bf7fa6a615 Merge "Always generate checksum files on image builds" 2023-12-13 14:31:17 +00:00
Dmitry Tantsur
2a1c289cc5
Switch IPA building to Debian Bookworm
Bullseye has a broken lshw [1] so it will not work.
Fixes an issue with the firmware repo renaming in Bookworm.

[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1002025

Closes-Bug: #2043112
Change-Id: Ib0cb156b72e6fa90e1530796e81a9a41ffa9e54f
2023-12-08 15:43:55 +01:00
Dmitry Tantsur
9da0cf41d4
Fix building images for Bullseye and Bookworm
Bullseye requires installing lshw from backports because the default one
has broken JSON output:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1002025

Bookworm requires installing firmware from a different repository.

Change-Id: I1bfecfcaff1547f99fcb48cc54b8f7ff77f0b0d9
2023-12-08 15:38:23 +01:00
Steve Baker
055c999af9 Always generate checksum files on image builds
Checksums are good, lets provide them.

Change-Id: I5d79f3800966dc8e49a892f1097dcbde619ef9a3
2023-11-23 09:03:57 +13:00
Zuul
123c430db2 Merge "Remove USE_PYTHON3 option" 2023-11-12 23:41:51 +00:00
Jay Faulkner
572b780345 Add link to LP bug tracker
IPA-B has an LP bug tracker now; point to it!

Change-Id: Id8ec4f6bc73326496c13258955554cfbef9c8047
2023-11-08 10:48:29 -08:00
Zuul
095707537e Merge "Use systemd-networkd for debian" 2023-11-03 09:28:15 +00:00
Julia Kreger
eeeaa42b79 Remove USE_PYTHON3 option
The USE_PYTHON3 option has been defaulted to true for
some time, and is no longer used. It was initially added
to enable adoption of python3, we have long moved past
needing to choose between python2 and python3, and
default on python3.

Also, since python2 is no longer supported, this makes
the code cleaner to read.

Change-Id: Ia9e62634c954446b0b47067fcdcd28cac49fbf4b
2023-11-02 14:43:00 -07:00
Damien Rannou
112157b1a9 Use systemd-networkd for debian
Moving from networking to systemd-networkd for debian
Original networking is not capable to natively manage down/up on
interfaces that is necessary for rescue

Change-Id: Ia6e2f217bd3222641cc1c97931e776e7fb717755
2023-10-19 09:11:32 +02:00
Zuul
32fe65295b Merge "'sudo' group different between RH and Debian" 2023-10-18 17:59:06 +00:00
Damien Rannou
9aaf0ded2f 'sudo' group different between RH and Debian
When creating the rescue user, check if we are on Debian or RH based
in order to use the right sudo group

Change-Id: I894f47a1eb0ecbccbecc0900980de7ad9da72425
2023-10-18 15:55:06 +02:00
Julia Kreger
732852f31f CI: Change image-build to use Ubuntu Jammy
It appears openstack/project-config is still set to focal for image
artifact builds/uploads. After discussing with opendev infra team,
we think we might be crashing the host vm on the focal kernel
leaving us with minimal information to troubleshoot.

The cleanest path forward is to match what we run the check job on
which is Ubuntu Jammy, as a data point before we change the overall
project-config.

Change-Id: I9d6581132569b4a921e8cbc0a1b10c73a6aeba0d
2023-09-21 10:29:28 -07:00
3311c9b541 Update master for stable/2023.2
Add file to the reno documentation build to show release notes for
stable/2023.2.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.2.

Sem-Ver: feature
Change-Id: I3f44e26bf28da82d88a03995856c0837ceae0052
2023-09-21 11:23:34 +00:00
Zuul
7c2e1b341d Merge "Exclude .pyc encoding files." 2023-08-28 14:24:47 +00:00
Illia Polliul
ab1992b528 Exclude .pyc encoding files.
We use IPA ramdisk image as a minimal operating system to execute firmware updates for disks/NICs, i.e. things that cannot be updated through BMC. This requires the ability to run Ansible.

Closes-Bug: rhbz#2234514
Closes-Bug: 2032981
Change-Id: Ic6fbc5f48ddd385a9bbbbabebe0a2c5980142c6f
2023-08-25 10:35:48 +00:00
Riccardo Pittau
b5974ad713 Build tinyipa with tinycore 14.x
- update kernel module versions
- mount efivar partition manually as it's not done automatically
anymore in recent kernels
- link /bin/sh to bash as it's not done automatically anymore

Change-Id: Ic17ffa07e8429a88326f70addda7eebd2a6dbef6
2023-08-01 17:15:53 +02:00
Zuul
d2b8115631 Merge "Extend the DIB_CHECKSUM variable usage" 2023-07-08 20:10:22 +00:00
Riccardo Pittau
241d14cd24 Remove outdated install pyyaml with pip2
We don't support python2 since a while

Change-Id: I430ba8f86883b233b975f615e0e50b01e22c66e6
2023-06-19 10:48:21 +02:00
Zuul
612ce753c5 Merge "Add libaio engine for fio on Centos/Rhel9" 2023-06-06 21:58:19 +00:00
Julia Kreger
1c1b8cf663 Add libaio engine for fio on Centos/Rhel9
fio packaging previously contained everything in one RPM,
but at some point for EL9 builds, this was split into multiple
RPMs where each engine used was put into it's own RPM.

In order for integrated disk benchmarking to work with
introspection, we use python-hardware. Python-hardware uses
fio, with libaio as a default option.

So now, we will attempt to install the other package which
should make users of the feature happier as their ramdisk
images will come with the contents required to do a benchmark
upfront.

Change-Id: I2028ac1cf350d86903a33e4bd91c209887de1e5c
2023-06-02 06:44:29 -07:00
Maksim Malchuk
e118104f98 Extend the DIB_CHECKSUM variable usage
Followup on I2dd1c60e3bfd9c823a7382b1390b1d40c52a5c97

Change-Id: I5e2d454fb84b76810f3c5ed26a0caeef8ea06675
Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
2023-05-24 23:43:53 +03:00
Zuul
4969f5a1f4 Merge "Add a non-voting ubuntu arm64 build check job" 2023-04-27 17:11:17 +00:00
Jay Faulkner
f99b3da74b Update pep8 deps - including hacking v6
Upgraded to latest hacking. Also had to bump the upper limit for
pycodestyle to be in line with other repos in order for pip to be happy
installing new hacking.

Change-Id: I4fd9e1e135b6759738f7faecfe8a8a046274d566
2023-04-21 12:36:13 -07:00
Riccardo Pittau
607ecace37 Add a non-voting ubuntu arm64 build check job
Adding it non-voting for the time being as the standard ubuntu
build check job is also non-voting

Change-Id: I3c166dca2db48546dd18f975ef761552f9d40cdc
2023-04-19 16:56:55 +02:00
Riccardo Pittau
8cad404502 Move ubuntu jobs to jammy
Remove focal support
This is long due

DO not use tmpfs to build the jammy image, use the disk space instead.
This is to avoid increasing the tmpfs mounted partition, we have 80gb
disk space available.

Change-Id: I6d6ebbb217886ed0e65137b8c8f0825d97abec81
2023-04-12 13:57:53 +02:00
Riccardo Pittau
5cb6910043 Add the option to not use tmpfs to build dib images
Currently the dib images are built on tmpfs mounted partition.
As the images become bigger and bigger we may want to use disk
space instead of increasing the tmpfs, considering that a
standard VM in CI has around 80gb disk space while only
8gb of RAM.

Change-Id: Ifbb1f38700e6b57e1da7be80c27c532aa9949493
2023-04-12 13:32:22 +02:00
Riccardo Pittau
f997078c99 Collect disk usage info post CI jobs run
Add extra-logs playbook to collect more logs in the post phase.

Change-Id: I4f9144f45a8c38b098ed67b2fdacffd3a596ae0d
2023-04-12 13:19:46 +02:00
Zuul
aa1757438d Merge "Remove ussuri CI jobs" 2023-04-05 19:12:04 +00:00
Riccardo Pittau
cee31aad80 Remove ussuri CI jobs
Also remove ussuri exception for tinyipa build

Change-Id: Ibec5c50472901e71b275288302d63fe8824df853
2023-04-03 17:17:32 +02:00
Steve Baker
59d79f6ccd Add checksum generation support
DIB_CHECKSUM is set by the disk-image-create --checksum flag, and for
other images results in checksum files being generated for the
image[1].

This change ensures checksum files are generated for built
ramdisk/kernel as well.

[1] https://opendev.org/openstack/diskimage-builder/src/branch/master/diskimage_builder/lib/common-functions#L68

Change-Id: I6128fbad5d9db2ea6469f196f3ee13b6fab76837
2023-03-23 13:36:45 +13:00
Zuul
1949d5c09b Merge "Add DIB_IPA_HARDWARE_RDO to define repo behaviour" 2023-03-21 12:41:48 +00:00
Steve Baker
cb216b6cd8 Add DIB_IPA_HARDWARE_RDO to define repo behaviour
Currently the latest RDO repo is installed on centos9
for the python-hardware package. This would not be appropriate in the
following cases:
* When repos are copied in from the host via DIB_YUM_REPO_CONF
* When another element is responsible for setting up repos

This change adds environment variable DIB_IPA_HARDWARE_RDO, which will
only be set to `1` on centos9, when DIB_YUM_REPO_CONF isn't set, and
when the user hasn't explicitly set DIB_IPA_HARDWARE_RDO.

This retains the current default behaviour of just working, while
giving flexibility for repos to be set up another way.

Change-Id: I1cc0b9833baf642866e9762c6bae44360bffe20d
2023-03-16 14:42:20 +13:00
fee1da74ee Update master for stable/2023.1
Add file to the reno documentation build to show release notes for
stable/2023.1.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/2023.1.

Sem-Ver: feature
Change-Id: Ib41330d3e654e71012e1e6a49ff34ab2984e3788
2023-03-08 11:18:37 +00:00
Julia Kreger
49367bc9d6 Remove /var/tmp/* from images
In some cases, things such as dracut regenerating the
initramfs file, may leave some artifacts in /var/tmp/ from
the ramdisk build. These are not needed and can be discarded.

Change-Id: Ibd2a61a7e42adfea868679c52c7a786d9aab1b36
2023-01-03 08:57:23 -08:00
Riccardo Pittau
9416e82903 Fix tox4 and setuptools errors
- Remove skipsdist that it was never supported and causes breakage
when used with usedevelop.
- disable setuptools autodiscovery

Change-Id: I3dd1ab78de71a2a2feb9e7d59612b5c2a09e1f4a
2022-12-28 15:44:17 +01:00
943b80c1a3 Update master for stable/zed
Add file to the reno documentation build to show release notes for
stable/zed.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.

Sem-Ver: feature
Change-Id: Ie5d9ed7fdd15ed3d0e2ad0cb784af15e8f20169c
2022-09-09 10:27:37 +00:00
niuke
ddbd6594d5 remove unicode prefix from code
Change-Id: Ie5d6e0f2c5435dc66bd81e58e27a706e1e1c75ac
2022-08-27 16:14:06 +08:00
Zuul
a63bb7081c Merge "Document building an image with patches" 2022-07-18 17:26:01 +00:00
Zuul
9d5ce06ac0 Merge "Remove support for openSUSE since Python 3.6 is no longer supported" 2022-07-11 00:42:24 +00:00
Riccardo Pittau
020c4b3495 Remove CentOS Stream 8 leftovers
Change-Id: I74bf0eeaf5012728a5f738826b3adfb3ba24c9df
2022-07-06 11:29:15 +02:00
Zuul
f5ef66e413 Merge "Add smartmontools package to DIB image" 2022-07-04 13:29:44 +00:00
Mark Goddard
57f50f7e10 Add smartmontools package to DIB image
This package includes smartctl, which is necessary for ATA secure erase
disk cleaning.

Without this package, IPA will fall back to shredding ATA devices, and
you will lose hours of your life. Worse, until
https://review.opendev.org/c/openstack/ironic-python-agent/+/847591, the
lack of smartctl was silently ignored.

Change-Id: I6952b833e0be4a47e45e9c4d4459956093628b6a
2022-06-27 10:27:43 +01:00
Julia Kreger
43f2eae773 Remove some extra Centos Packages
Removes webkit and polkit from ramdisks which are not
operationally needed as we don't need to render web pages
in the ramdisk, and we don't need to do system wide policy
enforcement. This does chain them with || true, just to be
on the safe side as we're trying to opportunistically cut
excess cruft in order to save space overall.

Locally, these changes have taken the uncompressed ramdisk
footprint from 780MB to 730MB.

Change-Id: I402a60c61f1b88b98798d9fae52420b1ca256512
2022-06-23 16:07:51 -07:00
Dmitry Tantsur
3272b5478b Document building an image with patches
Change-Id: Ice5ffaa0b8eea9afacc58c64dcfdaa58d3147a26
2022-06-20 14:08:49 +02:00
Dmitry Tantsur
cd3408613a Remove support for openSUSE since Python 3.6 is no longer supported
The conditions are left in the code in case someone somehow make it
work. We can clean them up later.

Change-Id: I65f6da0e90560c00eb82e8e4366fdaf3bbde8da1
2022-05-18 09:48:49 +02:00
Dmitry Tantsur
d543aa8bf4 Remove support for distributions with Python 3.6
IPA can no longer be installed on them, other projects will follow.
Leave the jobs in place for projects that consume them.
Publish Stream 9 images (we'll need to clean up tarballs.o.o later).

Also force using Python 3.9 for tinyipa.

Change-Id: I350c563c1c4ab60ac10d7c9e4bb0715bfde1b1db
2022-05-13 12:25:25 +02:00
Iury Gregory Melo Ferreira
e5bf43c791 Add multipath-io element
This commits introduces a new element `multipath-io`
that should be used when the system contains multipath devices.

Change-Id: I52761aecf0e17ed7482897b50a9b64ee514edfbe
2022-04-04 21:10:10 -03:00
835f6483d2 Update master for stable/yoga
Add file to the reno documentation build to show release notes for
stable/yoga.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/yoga.

Sem-Ver: feature
Change-Id: I34c29fb486962154532ca1c8751881533ff0fc67
2022-03-22 15:52:57 +00:00
Riccardo Pittau
ab25ed462d Update qemu version
Change-Id: I985064e7f5e3eae70b0bbccc022afba85416de3a
2022-03-14 22:30:19 +01:00
Zuul
46e396af7b Merge "Make centos9 jobs voting, add to gate" 2022-03-09 15:58:25 +00:00
Steve Baker
86649a0cba Make centos9 jobs voting, add to gate
Change-Id: I56d271a6a512cb1967ac518c3165ee96ea1c4a8a
2022-03-08 11:10:33 +13:00
Zuul
65fc08446f Merge "Added element to enable RDO deps repo to install sysbench" 2022-02-25 12:10:25 +00:00
Zuul
dbe9995015 Merge "dhcp-all-interfaces: let NetworkManager doit." 2022-02-23 12:49:25 +00:00
Julia Kreger
94171f104c Create random character devices so systemd does not crash
Systemd, depending on the version and the configuration,
can attempt to open urandom when a ramdisk boots, before
the udevd is launched to handle the devices. In particular
in FIPS mode, this can result in the ramdisk crashing.

In order to handle this, we pre-create the chracter device
files which can be statically used in the early start sequence
to allow the agent to boot and deploy.

Change-Id: I587e66a0d6b652c4aeca6fc211602d999d4641e8
2022-02-16 09:19:57 -08:00
Zuul
8fd98f24b6 Merge "Remove ussuri job" 2022-02-14 22:12:09 +00:00
Zuul
86c1757da5 Merge "Build tinyipa on tinycore 13.x" 2022-02-14 22:12:06 +00:00
Riccardo Pittau
578d27c142 Remove ussuri job
Ussuri is EM, reducing CI commitment

Change-Id: Iedbecb6d9e51d3a511846b4b16adcdf6508426de
2022-02-09 10:08:00 +01:00
Riccardo Pittau
30415b17a9 Build tinyipa on tinycore 13.x
Change-Id: Idd9f77c7002026cbd97c78c23bb575009503ecdb
2022-02-03 14:50:33 +01:00
Riccardo Pittau
462dced261 Update documentation on supported CentOS version
We don't support CentOS 8 anymore, only CentOS Stream 8

Change-Id: Ie63a6865f7609385f5710cc9fcc8bfda1fa46976
2022-02-03 09:58:17 +01:00
Riccardo Pittau
8315c5d91f Use debian current stable for dib
The current stable release for debian is bullseye, this patch switches
dib-based images to that version.

Change-Id: Id607d7697c0aa8464b533047a4e5938648a0e25b
2022-02-01 15:31:26 +01:00
Chandan Kumar (raukadah)
bb6a4769ac Added element to enable RDO deps repo to install sysbench
In CentOS Stream/RHEL 9, synbench package is removed and
it is currently available and maintained under rdo deps repo.

Since sysbench is needed in extra-hardware element for running
tests.

This patch enables the repo to install sysbench.

Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: I8ebb405a1921282f49952e7cfdd19558ef7f1b1d
2022-01-25 19:22:02 +00:00
Chandan Kumar (raukadah)
a08dcb4c36 Move centos9 jobs from experimental to check
Change-Id: I31dd48509ad029c88ee79415516771019cd1314e
2022-01-25 03:38:39 +00:00
Harald Jensås
bdb387bb84 dhcp-all-interfaces: let NetworkManager doit.
Override the default for DIB_DHCP_NETWORK_MANAGER_AUTO
to `true` on RHEL and CentOS release 8 and later.

The dhcp-all-interfaces element is configured to only
apply NetworkManager configuration. The service:
dhcp-all-interfaces will not be enabled. Not enabling the
service allows NetworkManager to do the interface auto-
configuration. In release 8 and later it should do this
just as good, or even better, compared to the
dhcp-all-interfaces.sh script.

Depends-On: Id6f8d6aaaf52a78175bb6c065ec88274c364834e
Change-Id: I12950733bfe54cae62d299b4c5987449d551857a
2022-01-24 07:02:03 +00:00
Steve Baker
66206d0b27 Remove centos7 job, python2 support
This change does the following:
- Removes the centos7 job, it uses python2 even though python2 was
  dropped from IPA in 2019.
  (see Ifd0e0b99bb82a7d7e82d6c14309468196f5734fc)
- Allow 60-ironic-python-agent-ramdisk-install to assume python3 and
  the venv module, the remaining centos7-python3 job will also test this
- Replaces the pip-and-virtualenv element with ensure-venv.
  pip-and-virtualenv exists to install virtualenv for python2
  environments, and it is unmaintained and mostly technical debt.

Change-Id: I9b6e03f50a4eb2484a04748e51d7348401b6ca04
2022-01-21 13:35:01 +13:00
Chandan Kumar (raukadah)
811d9ff9e5 Replace genisoimage with xorriso
genisoimage has been removed from RHEL-9 and is replaced with
xorriso.

This patch updates the package map to xorriso instead of
replacing the genisoimage key map to avoid the breakage for
other distros.

Closes-Bug: #1953013

Signed-off-by: Chandan Kumar (raukadah) <chkumar@redhat.com>
Change-Id: I31f6d4f080afd93ae067c37348e9ef570f0a34d4
2021-12-02 15:00:14 +05:30
Zuul
32d19e3c8f Merge "add element-deps for element burn-in delete entries" 2021-11-22 11:01:01 +00:00
Bernd Mueller
c48f3141f6 add element-deps for element burn-in
delete entries

follow up of https://review.opendev.org/c/openstack/ironic-python-agent-builder/+/815453

Signed-off-by: Bernd Mueller <mueller@b1-systems.de>
Change-Id: I8be293a5d63826d7496473bbbdb076064be06304
Signed-off-by: Bernd Mueller <mueller@b1-systems.de>
2021-11-18 14:42:23 +01:00
Zuul
a594bc0451 Merge "more details where to find the iso-image-create script" 2021-11-18 13:17:47 +00:00
Zuul
8400b618a2 Merge "Build and publish arm64 debian based ipa ramdisk" 2021-11-18 10:49:01 +00:00
Riccardo Pittau
b1af22174b Build and publish arm64 debian based ipa ramdisk
Change-Id: Ic9a79fe9192ae09b13d7722dd5735ffc7709ce38
2021-11-15 08:21:56 +00:00
Bernd Mueller
4d474c7471 more details where to find the iso-image-create script
Signed-off-by: Bernd Mueller <mueller@b1-systems.de>
Change-Id: I4eb6e273c6c19dc9fdde6b0b13d46adc8557e2b6
2021-11-10 14:48:36 +01:00
Zuul
9dd67d4e86 Merge "new element burn-in for package stress-ng, added fio" 2021-11-09 11:52:21 +00:00
Zuul
349e00e7cc Merge "Bump pip for tinyipa to 21.3.1" 2021-11-03 16:38:32 +00:00
Riccardo Pittau
44b95bc047 Bump pip for tinyipa to 21.3.1
It is currently the latest stable version
https://pip.pypa.io/en/stable/news/#v21-3-1

Change-Id: I7a93122fbac109357c210e3c4830e6527465c302
2021-11-02 14:23:35 +01:00
Riccardo Pittau
de007a80af Associate pip version to python version in DIB based images
Use current latest version of pip for Python 3.x

For Python 2.x use the last pip version to support it [1].

[1] https://pypi.org/project/pip/20.3.4/

Change-Id: I7384beb16d3810ddede51e6e2660bb826bd47415
2021-10-29 10:47:31 +02:00
Bernd Mueller
09640d3d0f new element burn-in for package stress-ng, added fio
Signed-off-by: Bernd Mueller <mueller@b1-systems.de>

Change-Id: I244d7fdfa4967199be15a3669421b31992ff6044
2021-10-27 13:12:49 +02:00
bffece3c14 Update master for stable/xena
Add file to the reno documentation build to show release notes for
stable/xena.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/xena.

Sem-Ver: feature
Change-Id: Idb2e6fe598fa3ca185423f237bd048fe787cf176
2021-09-17 13:28:59 +00:00
90 changed files with 892 additions and 296 deletions
README.rst
dib
doc/source
ironic_python_agent_builder
playbooks/ironic-python-agent-build-image
releasenotes
roles
ipa-build-dib-image
ipa-build-tinyipa-image/tasks
setup.cfgsetup.py
tinyipa
tox.ini
zuul.d

@ -8,7 +8,7 @@ based on `Ironic Python Agent`_.
* Free software: Apache license
* Documentation: https://docs.openstack.org/ironic-python-agent-builder
* Source: https://opendev.org/openstack/ironic-python-agent-builder
* Bugs: https://storyboard.openstack.org/#!/project/948
* Bugs: https://bugs.launchpad.net/ironic-python-agent-builder
* Release Notes: https://docs.openstack.org/releasenotes/ironic-python-agent-builder/
.. _Ironic Python Agent: https://docs.openstack.org/ironic-python-agent

6
dib/burn-in/README.rst Normal file

@ -0,0 +1,6 @@
=================================
Ironic Python Agent (IPA) Burn In
=================================
This element adds packages needed to run burn-in tasks
to the Ironic Python Agent (IPA) ramdisk.

1
dib/burn-in/element-deps Normal file

@ -0,0 +1 @@
package-installs

@ -0,0 +1,7 @@
fio:
fio-engine-libaio:
when:
- IPA_DISTRO_FAMILY = rh
- DIB_RELEASE != 7
- DIB_RELEASE != 8
stress-ng:

@ -0,0 +1,191 @@
ironic-python-agent-podman
===========================
Adds Podman support and configuration files to ironic-python-agent-ramdisk.
Compatibility
-------------
This DIB element currently supports Debian-based images only. Additional
distribution support may be added in the future.
ironic-python-agent-config
--------------------------
**allow_arbitrary_containers**
- **Description:** Defines whether arbitrary containers are allowed. Set to true or false.
- **Environment Variable:** ``DIB_ALLOW_ARBITRARY_CONTAINERS``
- **Default:** ``false``
**allowed_containers**
- **Description:** Specifies a list of allowed container image URLs (ex "image1-url,image2-url").
- **Environment Variable:** ``DIB_ALLOWED_CONTAINERS``
- **Default:** Empty string (``""``)
**container_steps_file**
- **Description:** Specifies the path in the RAM to the YAML file containing container steps to be executed.
- **Environment Variable:** ``DIB_CONTAINER_STEPS_FILE``
- **Default:** ``/etc/ironic-python-agent.d/mysteps.yaml``
**runner**
- **Description:** Defines the container runtime to use, such as podman or docker.
- **Environment Variable:** ``DIB_RUNNER``
- **Default:** ``podman``
**pull_options**
- **Description:** Container pull options (e.g., --tls-verify=false).
- **Environment Variable:** ``DIB_PULL_OPTIONS``
- **Default:** ``--tls-verify=false``
**run_options**
- **Description:** Options passed when running the container (e.g., --rm --network=host).
- **Environment Variable:** ``DIB_RUN_OPTIONS``
- **Default:** ``--rm --network=host --tls-verify=false``
ironic-python-agent-podman
--------------------------
**podman_conf_file**
- **Description:** The path to the configuration file created in the RAM.
- **Environment Variable:** ``DIB_PODMAN_CONF_FILE``
- **Default:** ``/etc/containers/containers.conf``
ironic-python-agent-steps
--------------------------
**steps_file_path**
- **Description:** Path to the local step file to be copied to the RAM.
- **Environment Variable:** ``DIB_STEPS_FILE_PATH``
- **Default:** ``/etc/mysteps.yaml``
Example mysteps.yaml
--------------------
.. code-block:: yaml
steps:
- name: manage_container_cleanup
image: docker://172.24.4.1:5000/cleaning-image:latest
interface: deploy
reboot_requested: true
pull_options:
- --tls-verify=false
run_options:
- --rm
- --network=host
- --tls-verify=false
abortable: true
priority: 20
- name: manage_container_cleanup2
image: docker://172.24.4.1:5000/cleaning-image2:latest
interface: deploy
reboot_requested: true
pull_options:
- --tls-verify=false
run_options:
- --rm
- --network=host
- --tls-verify=false
abortable: true
priority: 10
Customization
-------------
You can override any of the default values by setting the corresponding
environment variables during the build process. This allows the configuration
to be dynamically adapted without modifying the script.
ironic-python-agent-podman
===========================
Adds Podman support and configuration files to ironic-python-agent-ramdisk.
Compatibility
-------------
This DIB element currently supports Debian-based images only. Additional
distribution support may be added in the future.
ironic-python-agent-config
--------------------------
**allow_arbitrary_containers**
- **Description:** Defines whether arbitrary containers are allowed. Set to true or false.
- **Environment Variable:** ``DIB_ALLOW_ARBITRARY_CONTAINERS``
- **Default:** ``false``
**allowed_containers**
- **Description:** Specifies a list of allowed container image URLs (ex "image1-url,image2-url").
- **Environment Variable:** ``DIB_ALLOWED_CONTAINERS``
- **Default:** Empty string (``""``)
**container_steps_file**
- **Description:** Specifies the path in the RAM to the YAML file containing container steps to be executed.
- **Environment Variable:** ``DIB_CONTAINER_STEPS_FILE``
- **Default:** ``/etc/ironic-python-agent.d/mysteps.yaml``
**runner**
- **Description:** Defines the container runtime to use, such as podman or docker.
- **Environment Variable:** ``DIB_RUNNER``
- **Default:** ``podman``
**pull_options**
- **Description:** Container pull options (e.g., --tls-verify=false).
- **Environment Variable:** ``DIB_PULL_OPTIONS``
- **Default:** ``--tls-verify=false``
**run_options**
- **Description:** Options passed when running the container (e.g., --rm --network=host).
- **Environment Variable:** ``DIB_RUN_OPTIONS``
- **Default:** ``--rm --network=host --tls-verify=false``
ironic-python-agent-podman
--------------------------
**podman_conf_file**
- **Description:** The path to the configuration file created in the RAM.
- **Environment Variable:** ``DIB_PODMAN_CONF_FILE``
- **Default:** ``/etc/containers/containers.conf``
ironic-python-agent-steps
--------------------------
**steps_file_path**
- **Description:** Path to the local step file to be copied to the RAM.
- **Environment Variable:** ``DIB_STEPS_FILE_PATH``
- **Default:** ``/etc/mysteps.yaml``
Example mysteps.yaml
--------------------
.. code-block:: yaml
steps:
- name: manage_container_cleanup
image: docker://172.24.4.1:5000/cleaning-image:latest
interface: deploy
reboot_requested: true
pull_options:
- --tls-verify=false
run_options:
- --rm
- --network=host
- --tls-verify=false
abortable: true
priority: 20
- name: manage_container_cleanup2
image: docker://172.24.4.1:5000/cleaning-image2:latest
interface: deploy
reboot_requested: true
pull_options:
- --tls-verify=false
run_options:
- --rm
- --network=host
- --tls-verify=false
abortable: true
priority: 10
Customization
-------------
You can override any of the default values by setting the corresponding
environment variables during the build process. This allows the configuration
to be dynamically adapted without modifying the script.

@ -0,0 +1,2 @@
ironic-python-agent-ramdisk
package-installs

@ -0,0 +1,21 @@
# Podman Config
PODMAN_CONF_INSIDEDIR=/etc/containers
export PODMAN_CONF_FILE=${DIB_IPA_PODMAN_CONF_FILE:-$TMP_BUILD_DIR/mnt/$PODMAN_CONF_INSIDEDIR/containers.conf}
# Ipa Config
IPA_CONF_INSIDEDIR=/etc/ironic-python-agent.d
export IPA_CONFFILE=$TMP_BUILD_DIR/mnt/$IPA_CONF_INSIDEDIR/ironic_python_agent.conf
export ALLOW_ARBITRARY_CONTAINERS="${DIB_ALLOW_ARBITRARY_CONTAINERS:-false}"
export ALLOWED_CONTAINERS="${DIB_ALLOWED_CONTAINERS:-""}"
export CONTAINER_STEPS_FILE="${DIB_CONTAINER_STEPS_FILE:-/etc/ironic-python-agent.d/mysteps.yaml}"
export RUNNER="${DIB_RUNNER:-podman}"
export PULL_OPTIONS="${DIB_PULL_OPTIONS:---tls-verify=false}"
export RUN_OPTIONS="${DIB_RUN_OPTIONS:---rm --network=host --tls-verify=false}"
# Steps Config
STEPS_INSIDEDIR=/etc/ironic-python-agent.d
export STEPS_FILE=$TMP_BUILD_DIR/mnt/$STEPS_INSIDEDIR/mysteps.yaml
export STEPS_FILE_PATH="${DIB_STEPS_FILE_PATH:-/etc/mysteps.yaml}"

@ -0,0 +1,2 @@
podman:
phase: install.d

@ -0,0 +1,10 @@
#!/bin/bash
# Ensure the directory exists
sudo mkdir -p $(dirname $PODMAN_CONF_FILE)
# Create Podman configuration file inside the ramdisk with sudo tee
echo "[engine]
no_pivot_root = true" | sudo tee $PODMAN_CONF_FILE > /dev/null
echo "Podman configuration written to $PODMAN_CONF_FILE"

@ -0,0 +1,17 @@
#!/bin/bash
# Ensure the directory exists
sudo mkdir -p $(dirname $IPA_CONFFILE)
# Write the configuration inside the ramdisk
cat <<EOF | sudo tee $IPA_CONFFILE
[container]
allow_arbitrary_containers="$ALLOW_ARBITRARY_CONTAINERS"
allowed_containers="$ALLOWED_CONTAINERS"
container_steps_file="$CONTAINER_STEPS_FILE"
runner="$RUNNER"
pull_options="$PULL_OPTIONS"
run_options="$RUN_OPTIONS"
EOF
echo "Ironic Python Agent config written to $IPA_CONFFILE"

@ -0,0 +1,10 @@
#!/bin/bash
# Copy the YAML file to the ramdisk location
if [[ -f $STEPS_FILE_PATH ]]; then
sudo cp $STEPS_FILE_PATH $STEPS_FILE
echo "Local mysteps.yaml copied to ramdisk: $STEPS_FILE"
else
echo "No valid mysteps.yaml file found at $STEPS_FILE_PATH. Please provide a valid file or check the default path."
exit 1
fi

@ -19,3 +19,5 @@ doing a source-based installation:
* ``DIB_IPA_HARDWARE_VERSION`` the version of the ``hardware`` package to
install when ``DIB_IPA_HARDWARE_PACKAGE`` is unset. If unset, the latest
version will be installed.
* ``DIB_IPA_HARDWARE_RDO`` set to ``0`` to prevent the latest RDO package repositories
being installed on CentOS-9-Stream (ignored when ``DIB_YUM_REPO_CONF`` is set).

@ -0,0 +1,14 @@
if [[ "${DISTRO_NAME}${DIB_RELEASE}" =~ "centos9" ]]; then
if [ -n "${DIB_YUM_REPO_CONF:-}" ] ; then
# Always disable if DIB_YUM_REPO_CONF is defined
export DIB_IPA_HARDWARE_RDO=0
else
# Default to enabled, but overridable by the host
export DIB_IPA_HARDWARE_RDO=${DIB_IPA_HARDWARE_RDO:-1}
fi
else
# Always disable if not centos-9
export DIB_IPA_HARDWARE_RDO=0
fi

@ -1,5 +1,10 @@
ethtool:
fio:
fio-engine-libaio:
when:
- IPA_DISTRO_FAMILY = rh
- DIB_RELEASE != 7
- DIB_RELEASE != 8
hdparm:
infiniband-diags:
lldpad:
@ -8,5 +13,5 @@ smartmontools:
sysbench:
biosdevname:
not-arch: ppc64,ppc64el,ppc64le
not-arch: aarch64,arm64,ppc64,ppc64el,ppc64le
when: IPA_DISTRO_FAMILY = rh

@ -0,0 +1,9 @@
#!/bin/bash
# It enables RDO deps repo when DIB_IPA_HARDWARE_RDO=1
set -eux
set -o pipefail
if [ ${DIB_IPA_HARDWARE_RDO:-0} -ne 0 ]; then
curl -o /etc/yum.repos.d/dlrn-deps.repo https://trunk.rdoproject.org/centos9-master/dlrn-deps.repo
fi

@ -3,7 +3,7 @@ dhcp-all-interfaces
ibft-interfaces
install-static
package-installs
pip-and-virtualenv
ensure-venv
pkg-map
source-repositories
svc-map

@ -1,5 +1,10 @@
# IPA is built with non-free firmware by default.
export DIB_DEBIAN_COMPONENTS=${DIB_DEBIAN_COMPONENTS:-main,contrib,non-free}
DIB_DEBIAN_NON_FREE=non-free-firmware
if [[ "$DIB_RELEASE" == "bullseye" ]]; then
# Starting with bookworm, firmware is in a separate repository
DIB_DEBIAN_NON_FREE=non-free
fi
export DIB_DEBIAN_COMPONENTS=${DIB_DEBIAN_COMPONENTS:-main,contrib,$DIB_DEBIAN_NON_FREE}
if [[ $DIB_DEBIAN_COMPONENTS =~ non-free ]]; then
export IPA_DEBIAN_NONFREE=true

@ -1,4 +1,4 @@
export IPA_REMOVE_FIRMWARE=${IPA_REMOVE_FIRMWARE:-amdgpu,netronome,qcom,ti-communication,ti-keystone,ueagle-atm,rsi,mrvl,brcm,mediatek,ath10k,rtlwifi}
export IPA_REMOVE_FIRMWARE=${IPA_REMOVE_FIRMWARE:-amdgpu,netronome,qcom,ti-communication,ti-keystone,ueagle-atm,rsi,mrvl,brcm,mediatek,ath10k,rtlwifi,rtw88,rtw89,libertas,ath11k}
# NOTE(TheJulia): List of what each item represents for future context
# amdgpu == AMD/ATI Radeon/Vega/Raven firmware for drivers
@ -13,3 +13,7 @@ export IPA_REMOVE_FIRMWARE=${IPA_REMOVE_FIRMWARE:-amdgpu,netronome,qcom,ti-commu
# mediatek == Mediatek wifi and SoC (think chromebook) firmware
# ath10k == Qualcom Atheros 10k firmware
# rtlwifi == Realtek Wifi firmware
# rtw88 == Realtek wireless
# rtw89 == Realtek wireless
# libertas == Marvell libertas wifi
# auth11k == Qualcomm atheros WLAN

@ -1,10 +1,13 @@
# TODO(dtantsur): verify if opensuse can be added here
if [[ $DISTRO_NAME =~ (fedora|centos|centos7|rhel|rhel7) ]]; then
if [[ $DISTRO_NAME =~ (fedora|centos|rhel) ]]; then
export IPA_DISTRO_FAMILY=rh
else
export IPA_DISTRO_FAMILY=other
fi
if [[ ${DISTRO_NAME} =~ (centos|rhel) ]]; then
export DIB_DHCP_NETWORK_MANAGER_AUTO=${DIB_DHCP_NETWORK_MANAGER_AUTO:-true}
fi
# NOTE(rpittau) force Python version to 3 for debian
if [[ $DISTRO_NAME =~ debian ]]; then
DIB_PYTHON_VERSION=3

@ -10,36 +10,13 @@ export LC_ALL=C.UTF-8
SCRIPTDIR=$(dirname $0)
IPADIR=/tmp/ironic-python-agent
IRLIBDIR=/tmp/ironic-lib
UPPER_CONSTRAINTS=/tmp/requirements/upper-constraints.txt
VENVDIR=/opt/ironic-python-agent
# 19.1.1 is required for cryptography.
REQUIRED_PIP_STR="19.1.1"
REQUIRED_PIP_TUPLE="(19, 1, 1)"
IPA_PYTHON_VERSION=$DIB_PYTHON_VERSION
IPA_PYTHON="$DIB_PYTHON"
case "$DISTRO_NAME" in
centos7|rhel7)
# NOTE(dtantsur): C.UTF-8 doesn't seem to exist in CentOS 7
export LC_ALL=en_US.UTF-8
if grep -q 'Python :: 3 :: Only' $IPADIR/setup.cfg; then
echo "WARNING: using Python 3 on CentOS 7, this is not recommended"
${YUM:-yum} install -y python3 python3-devel
IPA_PYTHON=python3
IPA_PYTHON_VERSION=3
fi
;;
esac
# create the virtual environment using the default python
if [ $IPA_PYTHON_VERSION == 3 ]; then
$IPA_PYTHON -m venv $VENVDIR
else
$IPA_PYTHON -m virtualenv $VENVDIR
fi
python3 -m venv $VENVDIR
REQUIRED_PIP_STR="21.3.1"
REQUIRED_PIP_TUPLE="(21, 3, 1)"
HAS_PIP=$($VENVDIR/bin/python -c \
"import pip; print(tuple(map(int, pip.__version__.split('.'))) >= $REQUIRED_PIP_TUPLE)")
@ -52,7 +29,7 @@ fi
# NOTE(rpittau): if we want to keep compatibility with Python 2.x, we need to
# upgrade setuptools in the virtualenv as the default installed has issues
# when parsing requirements.
if [ "$DISTRO_NAME" == "opensuse" ] || [ $IPA_PYTHON_VERSION == 2 ]; then
if [ "$DISTRO_NAME" == "opensuse" ]; then
$VENVDIR/bin/pip install -U setuptools
fi
@ -68,12 +45,6 @@ $VENVDIR/bin/pip install -c $UPPER_CONSTRAINTS $IPADIR
ln -s $VENVDIR/bin/ironic-python-agent /usr/local/bin/
ln -s $VENVDIR/bin/ironic-collect-introspection-data /usr/local/bin/
# install ironic-lib from source if requested
if [ ${IRONIC_LIB_FROM_SOURCE:-false} == "true" ]; then
$VENVDIR/bin/pip install -c $UPPER_CONSTRAINTS -r $IRLIBDIR/requirements.txt
$VENVDIR/bin/pip install $IRLIBDIR
fi
case "$DIB_INIT_SYSTEM" in
upstart)
install -D -g root -o root -m 0755 ${SCRIPTDIR}/ironic-python-agent.conf /etc/init/ironic-python-agent.conf

@ -3,6 +3,7 @@ Description=Ironic Python Agent
After=network-online.target
[Service]
ConditionPathExists=!/etc/.rescued
ExecStartPre=/sbin/modprobe vfat
ExecStart=/usr/local/bin/ironic-python-agent --config-dir /etc/ironic-python-agent.d/
Restart=always

@ -27,6 +27,8 @@ e2fsprogs:
nvme-cli:
# This provides iscsistart which is required for iBFT support
open-iscsi:
# smartctl is required for ATA secure erase.
smartmontools:
libffi-dev:
build-only: true
@ -57,6 +59,11 @@ amd64-microcode:
- DISTRO_NAME = debian
- IPA_DEBIAN_NONFREE = true
# Packages needed by Debian
# bsdextrautils provides the 'hexdump' command used by IPA.
bsdextrautils:
when: DISTRO_NAME = debian
# Packages that should not normally be present on IPA images
cloud-init:
phase: post-install.d

@ -11,10 +11,16 @@
"python": "python",
"python-dev": "python-devel"
}
},
"debian": {
"bullseye": {
"lshw": "lshw/bullseye-backports"
}
}
},
"family": {
"redhat": {
"genisoimage": "xorriso",
"libffi-dev": "libffi-devel",
"libssl-dev": "openssl-devel",
"open-iscsi": "iscsi-initiator-utils",

@ -7,6 +7,7 @@ set -eu
set -o pipefail
DIB_IPA_ENABLE_RESCUE=${DIB_IPA_ENABLE_RESCUE:-true}
DIB_IPA_ENABLE_SYSTEMD_NETWORKD=${DIB_IPA_ENABLE_SYSTEMD_NETWORKD:-true}
if $DIB_IPA_ENABLE_RESCUE; then
# Make sure rescue works
@ -30,6 +31,7 @@ case "$DIB_INIT_SYSTEM" in
if $DIB_IPA_ENABLE_RESCUE; then
systemctl enable ironic-agent-create-rescue-user.path
fi
systemctl enable ironic-agent-resolve-config-drive.service
# NOTE(rpittau) disable caching remote package index to prevent
# delays due to failures.
# This is a new service for dnf-based systems (e.g. Centos8) to speed
@ -42,6 +44,34 @@ case "$DIB_INIT_SYSTEM" in
systemctl disable dnf-makecache.timer
fi
fi
# NOTE(drannou) debian by default is using networking instead of
# systemd-networkd. In some usecase like rescue, we need IPA to
# re-launch dhclient when modifications are made on the interface.
# The easiest way to manage that is to activate systemd-networkd.
if $DIB_IPA_ENABLE_SYSTEMD_NETWORKD; then
if [[ $DISTRO_NAME =~ debian ]] ; then
rm /etc/network/interfaces
rm -rf /etc/network/interfaces.d
echo "[Match]
Name=en*
[Network]
DHCP=yes" > /etc/systemd/network/99-dhcp.network
systemctl enable systemd-networkd
fi
fi
if [ -e /usr/lib/systemd/system/glean-early.service ]; then
# Disable Glean-early start
# Under normal circumstances, glean-early attempts to mount a config
# drive, configure ssh and a hostname. We only need the mount, and we
# trigger that in ironic-agent-resolve-config-drive.service.
# This is largely because glean uses /mnt/config by default,
# where as cloud-init uses a random folder name.
systemctl disable glean-early.service || true
rm /usr/lib/systemd/system/glean-early.service
fi
;;
sysv)
update-rc.d iptables disable
@ -51,3 +81,10 @@ case "$DIB_INIT_SYSTEM" in
exit 1
;;
esac
# Blocks out userdata from being acted upon by cloud-init if present.
if [[ -x /etc/cloud/cloud.cfg.d ]]; then
cat > /etc/cloud/cloud.cfg.d/94-ironic-python-agent-disable-userdata.cfg <<EOF
allow_userdata: false
EOF
fi

@ -21,11 +21,20 @@ done
# TODO(dtantsur): implement the same for debian-based systems
case "$DISTRO_NAME" in
fedora|centos|centos7|rhel|rhel7)
fedora|centos|rhel)
${YUM:-yum} remove -y postfix gcc make
# Remove webkit... Save ~26MB. This is a ramdisk, not a web browser.
${YUM:-yum} remove -y webkit2gtk3-jsc libproxy-webkitgtk4 || true
# Remove polkit... Save ~23 MB. This is a ramdisk, not a desktop.
${YUM:-yum} remove -y polkit polkit-libs PackageKit polkit-pkla-compat || true
${YUM:-yum} clean all
# Rebuilding the rpm database after removing packages will reduce
# its size
rpm --rebuilddb
;;
esac
# NOTE(TheJulia): remove any excess temporary files from /var/tmp
# In particular, dracut may leave some items we don't need/want.
rm -r -f /var/tmp/*

@ -1 +0,0 @@
ironic-lib git /tmp/ironic-lib https://opendev.org/openstack/ironic-lib

@ -0,0 +1,13 @@
[Unit]
Description=Ironic agent config drive setup
Wants=network-pre.target
Before=network-pre.target
After=local-fs.target
[Service]
ExecStart=/bin/bash /usr/local/bin/ironic-python-agent-resolve-configdrive.sh
Type=oneshot
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

@ -5,5 +5,13 @@ set -o pipefail
echo "Adding rescue user with root privileges..."
crypted_pass=$(</etc/ipa-rescue-config/ipa-rescue-password)
useradd -m rescue -G wheel -p $crypted_pass
# 'rescue' user should belong to sudo group
# on RH based it's wheel, on Debian based it's sudo
sudo_group=wheel
if [ "$(grep -Ei 'debian|ubuntu' /etc/*release)" ] ; then
sudo_group=sudo
fi
useradd -m rescue -G $sudo_group -p $crypted_pass
echo "rescue ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/rescue

@ -0,0 +1,47 @@
#!/bin/bash
set -eux
set -o pipefail
echo "Resolving the configuration drive for Ironic."
PATH=/bin:/usr/bin:/sbin:/usr/sbin
# Inspired by/based on glean-early.sh
# https://opendev.org/opendev/glean/src/branch/master/glean/init/glean-early.sh
# NOTE(TheJulia): We care about iso images, and would expect lower case as a
# result. In the case of VFAT partitions, they would be upper case.
CONFIG_DRIVE_LABEL="config-2"
# Identify the number of devices
device_count=$(lsblk -o PATH,LABEL | grep $CONFIG_DRIVE_LABEL | wc -l)
# Identify if we have an a publisher id set
publisher_id=""
if grep -q "ir_pub_id" /proc/cmdline; then
publisher_id=$(cat /proc/cmdline | sed -e 's/^.*ir_pub_id=//' -e 's/ .*$//')
fi
if [ $device_count -lt 1 ]; then
# Nothing to do here, exit!
exit 0
else
# We have *something* to do here.
mkdir -p /mnt/config
if [[ "${publisher_id}" != "" ]]; then
# We need to enumerate through the devices, and obtain the
for device in $(lsblk -o PATH,LABEL|grep config-2|cut -f1 -d" "); do
device_id=$(udevadm info --query=property --property=ID_FS_PUBLISHER_ID $device | sed s/ID_FS_PUBLISHER_ID=//)
if [[ "${publisher_id,,}" == "${device_id,,}" ]]; then
# SUCCESS! Valid device! Do it!
echo "Device ${device} matches the ${publisher_id}. Mounting..."
mount -t iso9660 -o ro,mode=0700 "${device}" /mnt/config || true
# We've mounted the device, the world is happy.
exit 0
else
echo "Did not identify $device as a valid ISO for Ironic."
fi
done
fi
fi

@ -7,7 +7,7 @@ If enabled without any environment variables set to modify configuration,
this element will enable TLS API support in IPA with a self-signed certificate
and key created at build time.
Optionally, you can provide your own SSL certifiate and key, and optionally
Optionally, you can provide your own SSL certificate and key, and optionally
ca, via the following environment variables. They should be set to an
accessible path on the build systems filesystem. If set, they will be copied
into the built ramdisk, and IPA will be configured to use them.

@ -24,6 +24,20 @@ echo "#disabled" > ./tmp/fstab.new
sudo mv ./tmp/fstab.new ./etc/fstab
sudo ln -s ./sbin/init ./
# NOTE(TheJulia): Make a random and urandom entry to handle
# long standing systemd bug cases where it may, depending on
# underlying OS config/version, try to open the random number
# generator before initializing.
# This class of issue has appeared frequently with systemd,
# https://github.com/systemd/systemd/issues/4167 is a commonly
# referenced example of this behavior.
if ! [ -a ./dev/random ]; then
sudo mknod ./dev/random c 1 8
fi
if ! [ -a ./dev/urandom ]; then
sudo mknod ./dev/urandom c 1 9
fi
# Note(JayF): to anyone trying to make this more configurable in the future,
# there are significant hurdles around shell quoting if you try to put these
# find commands into variables for making them more configurable.
@ -64,7 +78,7 @@ else
-path './usr/src/kernels/*' -prune -o \
-path './var/cache/*' -prune -o \
-path './var/log/*' -prune -o \
-name '*.pyc' -prune -o \
-name '*.pyc' ! -path '*encodings/*' -prune -o \
-name '*.pyo' -prune -o \
-print | sudo cpio -o -H newc | ${DIB_IPA_COMPRESS_CMD} > ${IMAGE_PATH}.initramfs
fi
@ -72,5 +86,12 @@ fi
select_boot_kernel_initrd $TARGET_ROOT
sudo cp $BOOTDIR/$KERNEL ${IMAGE_PATH}.kernel
sudo chown $USER: ${IMAGE_PATH}.kernel
if [[ -n "$DIB_CHECKSUM" && "$DIB_CHECKSUM" != "0" ]]; then
pushd $(dirname ${IMAGE_PATH})
[[ "$DIB_CHECKSUM" == "1" ]] && DIB_CHECKSUM="md5,sha256"
[[ "$DIB_CHECKSUM" == *md5* ]] && md5sum ${IMAGE_NAME}.initramfs ${IMAGE_NAME}.kernel > ${IMAGE_NAME}.md5
[[ "$DIB_CHECKSUM" == *sha256* ]] && sha256sum ${IMAGE_NAME}.initramfs ${IMAGE_NAME}.kernel > ${IMAGE_NAME}.sha256
popd
fi
# Output image sizes for debugging
sudo ls -lh ${IMAGE_PATH}.*

@ -0,0 +1 @@
export DIB_CHECKSUM=${DIB_CHECKSUM:-0}

@ -0,0 +1,6 @@
============
multipath-io
============
Updates the ironic agent, installing multipath and iscsi packages,
and enabling needed modules by default, to execute a modprobe for
the needed drivers before it is started.

@ -0,0 +1,2 @@
install-static
package-installs

@ -0,0 +1,2 @@
iscsi-initiator-utils:
device-mapper-multipath:

@ -0,0 +1,9 @@
qla4xxx
cxgb3i
cxgb4i
bnx2i
be2iscsi
iscsi_boot_sysfs
iscsi_ibft
iscsi_tcp
target_core_mod

@ -4,14 +4,13 @@ diskimage-builder images
Images built using diskimage-builder_ are recommended for production use on
real hardware. The recommended distributions are:
* CentOS 8 (regular and stream)
* Debian Buster (``debian-minimal`` element)
* CentOS Stream 9
* Debian Bookworm (``debian-minimal`` element)
The following should work but receive only limited testing and support:
* CentOS 7 (using Python 3.6)
* openSUSE Leap 15.1
* Ubuntu 20.04 Focal
* Debian Bullseye (``debian-minimal`` element)
Building
--------
@ -29,13 +28,13 @@ You can add other diskimage-builder_ elements via the ``-e`` flag:
.. code-block:: shell
ironic-python-agent-builder -e <extra-element> --release 8 centos-minimal
ironic-python-agent-builder -e <extra-element> --release 9-stream centos
You can specify the base name of the target images:
.. code-block:: shell
ironic-python-agent-builder -o my-ipa --release 8 centos-minimal
ironic-python-agent-builder -o my-ipa --release 9-stream centos
You can specify the arch of the target image by setting ``ARCH`` environment
variable (default is amd64):
@ -43,7 +42,7 @@ variable (default is amd64):
.. code-block:: shell
export ARCH=aarch64
ironic-python-agent-builder -o my-ipa --release 8-stream centos
ironic-python-agent-builder -o my-ipa --release 9-stream centos
... with diskimage-builder
~~~~~~~~~~~~~~~~~~~~~~~~~~
@ -74,9 +73,9 @@ for example:
.. code-block:: shell
export DIB_RELEASE=8
export DIB_RELEASE=9-stream
disk-image-create -o ironic-python-agent \
ironic-python-agent-ramdisk centos-minimal
ironic-python-agent-ramdisk centos
To use a specific branch of ironic-python-agent, use:
@ -85,14 +84,6 @@ To use a specific branch of ironic-python-agent, use:
export DIB_REPOREF_ironic_python_agent=origin/stable/queens
export DIB_REPOREF_requirements=origin/stable/queens
To build ironic-lib from source, do:
.. code-block:: bash
export IRONIC_LIB_FROM_SOURCE=true
# Optionally:
#export DIB_REPOREF_ironic_lib=<branch>
To build image for architectures other than amd64, you can either set the
``ARCH`` environment variable or use ``-a`` to specify the target
architecture:
@ -106,8 +97,9 @@ ISO Images
~~~~~~~~~~
Additionally, the IPA ramdisk can be packaged inside of an ISO for use with
some virtual media drivers. Use the ``iso-image-create`` utility, passing it
the initrd and the kernel, for example:
some virtual media drivers. Use the ``iso-image-create`` script in
``ironic-python-agent-builder`` repository, passing it the initrd and the
kernel, for example:
.. code-block:: console
@ -168,7 +160,7 @@ required for instance image or deploy image.
.. code-block:: bash
ironic-python-agent-builder -e stable-interface-names --release 8 centos-minimal
ironic-python-agent-builder -e stable-interface-names --release 9-stream centos
.. _diskimage-builder: https://docs.openstack.org/diskimage-builder
@ -186,7 +178,7 @@ unlikely to be encountered. If you want to override this, change the
of directories or files under ``/usr/lib/firmware``.
Set it to an empty string to disable firmware removal.
Fimrware removed:
Firmware removed:
* ``amdgpu``
* ``netronome``
@ -275,7 +267,7 @@ Adds TLS support to ironic-python-agent-ramdisk.
By default this element will enable TLS API support in IPA with a self-signed
certificate and key created at build time.
Optionally, you can provide your own SSL certifiate and key, and optionally
Optionally, you can provide your own SSL certificate and key, and optionally
CA, via the following environment variables. They should be set to an
accessible path on the build systems filesystem. If set, they will be copied
into the built ramdisk, and IPA will be configured to use them.

@ -154,18 +154,6 @@ If you want to collect BIOS given names of NICs in the inventory, set
export TINYIPA_REQUIRE_BIOSDEVNAME=true
Using ironic-lib from source
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ironic-lib_ contains important parts of the provisioning logic. If you would
like to build an IPA image with your local checkout of ironic-lib_, export
the following variable:
.. code-block:: bash
export IRONIC_LIB_SOURCE=/absolute/path/to/ironic-lib/checkout
.. _Ironic Python Agent: https://docs.openstack.org/ironic-python-agent
.. _TinyCoreLinux: http://tinycorelinux.net
.. _ironic-lib: https://opendev.org/openstack/ironic-lib

6
doc/source/conf.py Executable file → Normal file

@ -37,7 +37,7 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
copyright = u'2017, OpenStack Developers'
copyright = '2017, OpenStack Developers'
# openstackdocstheme options
openstackdocs_repo_name = 'openstack/ironic-python-agent-builder'
@ -72,8 +72,8 @@ htmlhelp_basename = 'ironic-python-agent-builderdoc'
latex_documents = [
('index',
'doc-ironic-python-agent-builder.tex',
u'Ironic Python Agent Builder Documentation',
u'OpenStack Developers', 'manual'),
'Ironic Python Agent Builder Documentation',
'OpenStack Developers', 'manual'),
]
# Example configuration for intersphinx: refer to the Python standard library.

@ -3,3 +3,22 @@
===========================
.. include:: ../../../CONTRIBUTING.rst
Testing changes in DIB images
=============================
Testing a local ironic-python-agent change in :doc:`/admin/dib` requires
rebuilding an image with the following procedure.
#. Make sure your changes are committed to your local repository. DIB needs to
know a branch name to use (``my-test-branch`` in the example below).
#. Build an image as described in :doc:`/admin/dib`, providing a location of
your local repository and the branch name, for example:
.. code-block:: bash
DIB_REPOLOCATION_ironic_python_agent=/home/user/path/to/repo \
DIB_REPOREF_ironic_python_agent=my-test-branch \
ironic-python-agent-builder -o my-ipa --release 9-stream centos

@ -80,7 +80,11 @@ def main():
os.environ['DIB_REPOREF_requirements'] = args.branch
if args.lzma:
os.environ['DIB_IPA_COMPRESS_CMD'] = \
'xz --format=lzma --compress --stdout'
'xz --format=lzma --compress --stdout -9'
# Enable checksum generation by default
if 'DIB_CHECKSUM' not in os.environ:
os.environ['DIB_CHECKSUM'] = 'sha256'
extra_args = shlex.split(args.extra_args) if args.extra_args else []
if args.verbose:
extra_args.append("-x")

@ -0,0 +1,7 @@
- hosts: all
tasks:
- name: Collect disk usage info
shell: "df > {{ zuul_output_dir }}/logs/df.txt"
become: yes

@ -1,4 +1,8 @@
- hosts: all
environment:
PIP_BREAK_SYSTEM_PACKAGES: 1
roles:
- ensure-pip

@ -1,5 +1,8 @@
- hosts: all
environment:
PIP_BREAK_SYSTEM_PACKAGES: 1
tasks:
- name: Create a target directory for raw images

@ -0,0 +1,5 @@
---
upgrade:
- |
CentOS 7 and 8 are no longer supported since OpenStack dropped support
for Python 3.6. Please use CentOS 9 (Stream) instead.

@ -0,0 +1,7 @@
---
fixes:
- |
Fixes excess files being housed in /var/tmp inside of a ramdisk image
which may, in some cases, result in a much larger ramdisk than expected.
Files and folders in /var/tmp within a ramdisk are now removed prior to
the ramdisk being packaged as part of a DIB based image build.

@ -0,0 +1,9 @@
---
fixes:
- |
Fixes issues with ramdisks potentially crashing when starting due to
systemd attempting to access a random number generator before udevd has
been launched. Depending on the mode of operation and underlying
and configuration, i.e. in FIPS mode, the system could have crashed as
a result. We will now always create the character devices devices, which
can be used early in the boot sequence.

@ -0,0 +1,4 @@
---
fixes:
- |
Fixes building images for Debian Bullseye and Bookworm.

@ -0,0 +1,4 @@
---
other:
- |
We now build and publish diskimage-builder debian based image on arm64.

@ -0,0 +1,4 @@
---
other:
- |
Debian images are now published using Bookworm instead of Bullseye.

@ -1,6 +1,6 @@
---
fixes:
- |
Add support for TinyIPA predictible device names in dhcp.sh script by changing
Add support for TinyIPA predictable device names in dhcp.sh script by changing
of NETDEVICES variable. It will support any device from /proc/net/dev starting
with e or p letter.

@ -0,0 +1,4 @@
---
features:
- |
Changes lzma compression level to 9 for smaller images.

@ -0,0 +1,6 @@
---
features:
- |
Adds a new element ``multipath-io`` for configuring setups
using multipath.

@ -0,0 +1,14 @@
---
other:
- |
On RHEL and CentOS 8 and later the *dhcp-all-interfaces* diskimage-builder
element is now configured to only apply NetworkManager configuration by
default. The *dhcp-all-interfaces* service will not be enabled.
To re-enable the *dhcp-all-interfaces* service, set
``DIB_DHCP_NETWORK_MANAGER_AUTO=false`` in the environment.
NetworkManager is quite capable to do automatic interface configuration.
NetworkManager will by default try to auto-configure any interface with
no configuration, it will use DHCP for IPv4 and Router Advertisements to
decide how to initialize IPv6.

@ -0,0 +1,4 @@
---
upgrade:
- |
Support for openSUSE Leap 15.* has been removed.

@ -0,0 +1,10 @@
---
upgrade:
- |
Support for python2 in ironic-python-agent was dropped in the Ussuri release
however it was still possible to build (non-functional) python2 images for
CentOS 7. This python2 support is now dropped from the image build also. As
part of this change, the `pip-and-virtualenv` element is not longer a
dependency, so any custom elements which depend on this element will need to
either include it explicitly or migrate to the recommended `ensure-venv`
element.

@ -1,8 +1,8 @@
---
fixes:
- |
Removes support for ``PYOPTIMIZE_TINYIPA``, which now casues the TinyIPA
image to be approximately 5 MB larger. This was due to an incompatability
Removes support for ``PYOPTIMIZE_TINYIPA``, which now causes the TinyIPA
image to be approximately 5 MB larger. This was due to an incompatibility
with the ``oslo.privsep`` library dependency on ``pycparser`` which cannot
load into precompiled python programs where the original source embedded
documentation is not present.

@ -0,0 +1,4 @@
---
upgrade:
- |
The tinyipa image is now built using tinycore 13.x

@ -0,0 +1,6 @@
===========================
2023.1 Series Release Notes
===========================
.. release-notes::
:branch: unmaintained/2023.1

@ -0,0 +1,6 @@
===========================
2023.2 Series Release Notes
===========================
.. release-notes::
:branch: stable/2023.2

@ -0,0 +1,6 @@
===========================
2024.1 Series Release Notes
===========================
.. release-notes::
:branch: stable/2024.1

@ -0,0 +1,6 @@
===========================
2024.2 Series Release Notes
===========================
.. release-notes::
:branch: stable/2024.2

@ -0,0 +1,6 @@
===========================
2025.1 Series Release Notes
===========================
.. release-notes::
:branch: stable/2025.1

@ -52,8 +52,8 @@ source_suffix = '.rst'
master_doc = 'index'
# General information about the project.
project = u'Ironic Python Agent Builder Release Notes'
copyright = u'2017, OpenStack Developers'
project = 'Ironic Python Agent Builder Release Notes'
copyright = '2017, OpenStack Developers'
# openstackdocstheme options
openstackdocs_repo_name = 'openstack/ironic-python-agent-builder'
@ -212,8 +212,8 @@ latex_elements = {
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'ironic_python_agent_builderReleaseNotes.tex',
u'Ironic Python Agent Builder Release Notes Documentation',
u'OpenStack Foundation', 'manual'),
'Ironic Python Agent Builder Release Notes Documentation',
'OpenStack Foundation', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
@ -243,8 +243,8 @@ latex_documents = [
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'ironic_python_agent_builderrereleasenotes',
u'Ironic Python Agent Builder Release Notes Documentation',
[u'OpenStack Foundation'], 1)
'Ironic Python Agent Builder Release Notes Documentation',
['OpenStack Foundation'], 1)
]
# If true, show URL addresses after external links.
@ -258,8 +258,8 @@ man_pages = [
# dir menu entry, description, category)
texinfo_documents = [
('index', 'ironic_python_agent_builder ReleaseNotes',
u'Ironic Python Agent Builder Release Notes Documentation',
u'OpenStack Foundation', 'ironic_python_agent_builderReleaseNotes',
'Ironic Python Agent Builder Release Notes Documentation',
'OpenStack Foundation', 'ironic_python_agent_builderReleaseNotes',
'Release notes for Ironic Python Agent Builder.',
'Miscellaneous'),
]

@ -6,4 +6,12 @@ Ironic Python Agent Builder Release Notes
:maxdepth: 1
unreleased
2025.1
2024.2
2024.1
2023.2
2023.1
zed
yoga
xena
wallaby

@ -3,4 +3,4 @@ Wallaby Series Release Notes
============================
.. release-notes::
:branch: stable/wallaby
:branch: unmaintained/wallaby

@ -0,0 +1,6 @@
=========================
Xena Series Release Notes
=========================
.. release-notes::
:branch: unmaintained/xena

@ -0,0 +1,6 @@
=========================
Yoga Series Release Notes
=========================
.. release-notes::
:branch: unmaintained/yoga

@ -0,0 +1,6 @@
========================
Zed Series Release Notes
========================
.. release-notes::
:branch: unmaintained/zed

@ -8,4 +8,5 @@ ipa_raw_dir: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-age
ipa_tar_dir: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent/UPLOAD_TAR'
dib_extra_args:
dib_from_source: true
dib_no_tmpfs: 0
extra_elements: ["dynamic-login"]

@ -26,13 +26,3 @@
become: true
when: dib_from_source
# NOTE(dtantsur): work around the issue in older DIB versions when some
# elements try to use the default Python instead of the one DIB is using,
# failing with "No module named yaml"
- name: Install PyYAML in Python 2
pip:
name: PyYAML
extra_args: -c "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt"
executable: pip2
become: true
ignore_errors: true

@ -1,6 +1,6 @@
- name: Default to CentOS 8
- name: Default to CentOS Stream 9
set_fact:
image_release: 8
image_release: 9-stream
when:
- image_distro in ["centos-minimal", "centos"]
- not image_release
@ -35,6 +35,11 @@
environment:
# Increase from the default value of 30
DIB_DHCP_TIMEOUT: 60
# Use or not tmpfs to build the image, default to use it.
# As images become bigger and bigger, in the future we may
# decide to switch to not use it by default since we have
# enough disk space.
DIB_NO_TMPFS: '{{ dib_no_tmpfs }}'
# Use repositories checked out by Zuul (combined with -b HEAD above)
DIB_REPOLOCATION_ironic_python_agent: '{{ ipa_source_path }}'
DIB_REPOLOCATION_requirements: '{{ requirements_path }}'

@ -13,7 +13,6 @@
environment:
BRANCH_PATH: '{{ ipa_branch_path }}'
IPA_SOURCE_DIR: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent'
when: "'ussuri' not in ipa_branch_path"
- name: Move resulting files
shell: |

@ -23,3 +23,8 @@ packages =
# TODO(dtantsur): figure out a sane way to distribute tinyipa scripts
data_files =
share/ironic-python-agent-builder/dib = dib/*
[codespell]
quiet-level = 4
# Words to ignore:
# ignore-words-list = example

@ -17,4 +17,5 @@ import setuptools
setuptools.setup(
setup_requires=['pbr>=2.0.0'],
py_modules=[],
pbr=True)

@ -11,7 +11,7 @@
#
# By default, id_rsa or id_dsa keys of the user performing the build
# are baked into the image as authorized_keys for 'tc' user.
# To supply different public ssh key, befor running this script set
# To supply different public ssh key, before running this script set
# SSH_PUBLIC_KEY environment variable to point to absolute path to the key.
#
# This script produces "ansible-<tinyipa-ramdisk-name>" ramdisk that can serve

@ -6,16 +6,78 @@ source ${WORKDIR}/common.sh
IRONIC_LIB_SOURCE=${IRONIC_LIB_SOURCE:-}
TC_RELEASE="12.x"
QEMU_RELEASE="v4.2.0"
TC_RELEASE="15.x"
QEMU_RELEASE="5.2.0"
LSHW_RELEASE="B.02.18"
BIOSDEVNAME_RELEASE="0.7.2"
IPMITOOL_GIT_HASH="710888479332a46bad78f3d736eff0cbdefd2d1b"
IPMITOOL_GIT_HASH="19d78782d795d0cf4ceefe655f616210c9143e62"
CHROOT_CMD="sudo chroot $BUILDDIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$http_proxy https_proxy=$https_proxy no_proxy=$no_proxy"
function clone_single_branch {
git clone --branch $3 --depth=1 $1 $2
DOWNLOAD_RETRY_MAX=${DOWNLOAD_RETRY_MAX:-5}
DOWNLOAD_RETRY_DELAY=${DOWNLOAD_RETRY_DELAY:-10}
function download_with_retry() {
local source_url=$1
local destination_path=$2
local attempts=1
declare -A tar_flags=(
["tar.gz"]="z"
["tgz"]="z"
["tar.bz2"]="j"
["tbz2"]="j"
["tar.xz"]="J"
["txz"]="J"
)
echo "Downloading $source_url to $destination_path"
while [ $attempts -le $DOWNLOAD_RETRY_MAX ]; do
for ext in "${!tar_flags[@]}"; do
if [[ "$source_url" =~ \.${ext}$ ]]; then
mkdir -p "$destination_path"
if wget --timeout=30 --tries=3 -O - "$source_url" | tar -x${tar_flags[$ext]} -C "$destination_path" --strip-components=1 -f -; then
echo "Successfully downloaded $source_url on attempt $attempts"
return 0
fi
break
fi
done
if [[ ! "$source_url" =~ \.tar\.[a-z]+$ ]]; then
if wget --timeout=30 --tries=3 "$source_url" -O "${destination_path}"; then
echo "Successfully downloaded $source_url on attempt $attempts"
return 0
fi
fi
echo "Download attempt $attempts failed for $source_url, retrying in $DOWNLOAD_RETRY_DELAY seconds..."
sleep $DOWNLOAD_RETRY_DELAY
attempts=$((attempts + 1))
done
echo "Failed to download $source_url after $DOWNLOAD_RETRY_MAX attempts"
return 1
}
function tce_load_with_retry() {
local package=$1
local attempts=1
echo "Loading package $package with tce-load"
while [ $attempts -le $DOWNLOAD_RETRY_MAX ]; do
if sudo chroot --userspec=$TC:$STAFF $BUILDDIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$http_proxy https_proxy=$https_proxy no_proxy=$no_proxy tce-load -wci $package; then
echo "Successfully loaded $package on attempt $attempts"
return 0
fi
echo "tce-load attempt $attempts failed for $package, retrying in $DOWNLOAD_RETRY_DELAY seconds..."
sleep $DOWNLOAD_RETRY_DELAY
attempts=$((attempts + 1))
done
echo "Failed to load $package with tce-load after $DOWNLOAD_RETRY_MAX attempts"
return 1
}
echo "Building tinyipa:"
@ -37,12 +99,12 @@ fi
choose_tc_mirror
cd $WORKDIR/build_files
wget -N $TINYCORE_MIRROR_URL/$TC_RELEASE/x86_64/release/distribution_files/corepure64.gz
wget -N $TINYCORE_MIRROR_URL/$TC_RELEASE/x86_64/release/distribution_files/vmlinuz64
download_with_retry "$TINYCORE_MIRROR_URL/$TC_RELEASE/x86_64/release/distribution_files/corepure64.gz" "corepure64.gz"
download_with_retry "$TINYCORE_MIRROR_URL/$TC_RELEASE/x86_64/release/distribution_files/vmlinuz64" "vmlinuz64"
cd $WORKDIR
########################################################
# Build Required Python Dependecies in a Build Directory
# Build Required Python Dependencies in a Build Directory
########################################################
# Make directory for building in
@ -55,13 +117,13 @@ mkdir "$BUILDDIR"
sudo sh -c "echo $TINYCORE_MIRROR_URL > $BUILDDIR/opt/tcemirror"
# Download Qemu-utils, Biosdevname and IPMItool source
clone_single_branch "https://github.com/qemu/qemu.git" "${BUILDDIR}/tmp/qemu" "$QEMU_RELEASE"
clone_single_branch "https://github.com/lyonel/lshw.git" "${BUILDDIR}/tmp/lshw" "$LSHW_RELEASE"
download_with_retry "https://download.qemu.org/qemu-${QEMU_RELEASE}.tar.xz" "${BUILDDIR}/tmp/qemu"
download_with_retry "https://github.com/lyonel/lshw/archive/refs/tags/${LSHW_RELEASE}.tar.gz" "${BUILDDIR}/tmp/lshw"
if $TINYIPA_REQUIRE_BIOSDEVNAME; then
wget -N -O - https://linux.dell.com/biosdevname/biosdevname-${BIOSDEVNAME_RELEASE}/biosdevname-${BIOSDEVNAME_RELEASE}.tar.gz | tar -xz -C "${BUILDDIR}/tmp" -f -
download_with_retry "https://linux.dell.com/biosdevname/biosdevname-${BIOSDEVNAME_RELEASE}/biosdevname-${BIOSDEVNAME_RELEASE}.tar.gz" "${BUILDDIR}/tmp/biosdevname"
fi
if $TINYIPA_REQUIRE_IPMITOOL; then
git clone https://github.com/ipmitool/ipmitool.git "${BUILDDIR}/tmp/ipmitool-src"
git clone https://codeberg.org/IPMITool/ipmitool.git "${BUILDDIR}/tmp/ipmitool-src"
cd "${BUILDDIR}/tmp/ipmitool-src"
git reset $IPMITOOL_GIT_HASH --hard
cd -
@ -76,23 +138,12 @@ cd $IPA_SOURCE_DIR
rm -rf *.egg-info
pwd
PYTHON_COMMAND="python"
if [[ $USE_PYTHON3 == "True" ]]; then
PYTHON_COMMAND="python3"
fi
PYTHON_COMMAND="python3"
$PYTHON_COMMAND setup.py sdist --dist-dir "$BUILDDIR/tmp/localpip" --quiet
ls $BUILDDIR/tmp/localpip || true
cp requirements.txt $BUILDDIR/tmp/ipa-requirements.txt
if [ -n "$IRONIC_LIB_SOURCE" ]; then
pushd $IRONIC_LIB_SOURCE
rm -rf *.egg-info
$PYTHON_COMMAND setup.py sdist --dist-dir "$BUILDDIR/tmp/localpip" --quiet
cp requirements.txt $BUILDDIR/tmp/ironic-lib-requirements.txt
popd
fi
if [ -n "$PYTHON_EXTRA_SOURCES_DIR_LIST" ]; then
IFS="," read -ra PKGDIRS <<< "$PYTHON_EXTRA_SOURCES_DIR_LIST"
for PKGDIR in "${PKGDIRS[@]}"; do
@ -108,9 +159,6 @@ if [ -n "$PYTHON_EXTRA_SOURCES_DIR_LIST" ]; then
fi
$WORKDIR/generate_tox_constraints.sh upper-constraints.txt
if [ -n "$IRONIC_LIB_SOURCE" ]; then
sed -i '/ironic-lib/d' upper-constraints.txt $BUILDDIR/tmp/ipa-requirements.txt
fi
cp upper-constraints.txt $BUILDDIR/tmp/upper-constraints.txt
echo Using upper-constraints:
cat upper-constraints.txt
@ -145,39 +193,29 @@ $CHROOT_CMD mkdir -m777 /etc/sysconfig/tcedir
$CHROOT_CMD touch /etc/sysconfig/tcuser
$CHROOT_CMD chmod a+rwx /etc/sysconfig/tcuser
mkdir $BUILDDIR/tmp/overides
cp $WORKDIR/build_files/fakeuname $BUILDDIR/tmp/overides/uname
mkdir $BUILDDIR/tmp/overrides
cp $WORKDIR/build_files/fakeuname $BUILDDIR/tmp/overrides/uname
sudo cp $WORKDIR/build_files/ntpdate $BUILDDIR/bin/ntpdate
PY_REQS="buildreqs_python2.lst"
if [[ $USE_PYTHON3 == "True" ]]; then
PY_REQS="buildreqs_python3.lst"
fi
PY_REQS="buildreqs_python3.lst"
# NOTE(rpittau) change ownership of the tce info dir to prevent writing issues
sudo chown $TC:$STAFF $BUILDDIR/usr/local/tce.installed
while read line; do
sudo chroot --userspec=$TC:$STAFF $BUILDDIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$http_proxy https_proxy=$https_proxy no_proxy=$no_proxy tce-load -wci $line
tce_load_with_retry "$line"
done < <(paste $WORKDIR/build_files/$PY_REQS $WORKDIR/build_files/buildreqs.lst)
PIP_COMMAND="pip"
TINYIPA_PYTHON_EXE="python"
if [[ $USE_PYTHON3 == "True" ]]; then
PIP_COMMAND="pip3"
TINYIPA_PYTHON_EXE="python3"
fi
TINYIPA_PYTHON_EXE="python3.9"
PIP_COMMAND="$TINYIPA_PYTHON_EXE -m pip"
# Build python wheels
$CHROOT_CMD ${TINYIPA_PYTHON_EXE} -m ensurepip
$CHROOT_CMD ${PIP_COMMAND} install --upgrade pip==${PIP_VERSION} wheel
$CHROOT_CMD ${PIP_COMMAND} install pbr
$CHROOT_CMD ${PIP_COMMAND} wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels -r /tmp/ipa-requirements.txt
if [ -n "$IRONIC_LIB_SOURCE" ]; then
$CHROOT_CMD ${PIP_COMMAND} wheel -c /tmp/upper-constraints.txt --wheel-dir /tmp/wheels -r /tmp/ironic-lib-requirements.txt
$CHROOT_CMD ${PIP_COMMAND} wheel -c /tmp/upper-constraints.txt --no-index --pre --wheel-dir /tmp/wheels --find-links=/tmp/localpip --find-links=/tmp/wheels ironic-lib
fi
if [ -n "$PYTHON_EXTRA_SOURCES_DIR_LIST" ]; then
IFS="," read -ra PKGDIRS <<< "$PYTHON_EXTRA_SOURCES_DIR_LIST"
@ -196,7 +234,7 @@ ls -1 $BUILDDIR/tmp/wheels
# Build qemu-utils
rm -rf $WORKDIR/build_files/qemu-utils.tcz
$CHROOT_CMD /bin/sh -c "cd /tmp/qemu && ./configure --disable-system --disable-user --disable-linux-user --disable-bsd-user --disable-guest-agent --disable-blobs --python=/usr/local/bin/$TINYIPA_PYTHON_EXE && make && make install DESTDIR=/tmp/qemu-utils"
$CHROOT_CMD /bin/sh -c "cd /tmp/qemu && CFLAGS=-Wno-error ./configure --disable-system --disable-user --disable-linux-user --disable-bsd-user --disable-guest-agent --disable-blobs --enable-tools --python=/usr/local/bin/$TINYIPA_PYTHON_EXE && make && make install DESTDIR=/tmp/qemu-utils"
find $BUILDDIR/tmp/qemu-utils/ -type f -executable | xargs file | awk -F ':' '/ELF/ {print $1}' | sudo xargs strip
cd $WORKDIR/build_files && mksquashfs $BUILDDIR/tmp/qemu-utils qemu-utils.tcz && md5sum qemu-utils.tcz > qemu-utils.tcz.md5.txt
# Create qemu-utils.tcz.dep

@ -2,7 +2,7 @@
# put other system startup commands here
#exec > /tmp/installlogs 2>&1
set -x
set -ux
echo "Starting bootlocal script:"
date
@ -24,7 +24,7 @@ fi
# Maybe save some RAM?
#rm -rf /tmp/builtin
# Install IPA and dependecies
# Install IPA and dependencies
if ! type "ironic-python-agent" > /dev/null ; then
PIP_COMMAND="pip"
if hash pip3 2>/dev/null; then
@ -67,6 +67,11 @@ configure_dhcp_network
mkdir -p /etc/ironic-python-agent.d/
if [ -d /sys/firmware/efi ] ; then
echo "Make efivars available"
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
fi
# Run IPA
echo "Starting Ironic Python Agent:"
date

@ -11,15 +11,16 @@ gdisk.tcz
git.tcz
glib2-dev.tcz
hdparm.tcz
ipv6-netfilter-5.10.3-tinycore64.tcz
ipv6-netfilter-6.6.8-tinycore64.tcz
libpci-dev.tcz
libtool-dev.tcz
libtool.tcz
ninja.tcz
parted.tcz
pciutils.tcz
pixman-dev.tcz
raid-dm-5.10.3-tinycore64.tcz
scsi-5.10.3-tinycore64.tcz
raid-dm-6.6.8-tinycore64.tcz
scsi-6.6.8-tinycore64.tcz
udev-lib.tcz
util-linux.tcz
zlib_base-dev.tcz
zlib_base-dev.tcz

@ -1,2 +0,0 @@
python.tcz
python-dev.tcz

@ -1,2 +1,2 @@
python3.6.tcz
python3.6-dev.tcz
python3.9.tcz
python3.9-dev.tcz

@ -2,7 +2,7 @@
S="Linux"
N="box"
R="5.10.3-tinycore64"
R="6.6.8-tinycore64"
P="unknown"
V="#2017 SMP"
M="x86_64"

@ -4,22 +4,22 @@ dmidecode.tcz
dosfstools.tcz
efibootmgr.tcz
efivar.tcz
filesystems-5.10.3-tinycore64.tcz
filesystems-6.6.8-tinycore64.tcz
file.tcz
gdisk.tcz
glib2.tcz
haveged.tcz
hdparm.tcz
iproute2.tcz
ipv6-netfilter-5.10.3-tinycore64.tcz
ipv6-netfilter-6.6.8-tinycore64.tcz
libxml2.tcz
mdadm.tcz
ntpclient.tcz
parted.tcz
pciutils.tcz
popt.tcz
raid-dm-5.10.3-tinycore64.tcz
scsi-5.10.3-tinycore64.tcz
raid-dm-6.6.8-tinycore64.tcz
scsi-6.6.8-tinycore64.tcz
smartmontools.tcz
udev-lib.tcz
util-linux.tcz
util-linux.tcz

@ -1 +0,0 @@
python.tcz

@ -1,2 +1,2 @@
python3.6.tcz
expat2.tcz
python3.9.tcz
expat2.tcz

@ -5,11 +5,10 @@ source ${WORKDIR}/tc-mirror.sh
BUILDDIR="$WORKDIR/tinyipabuild"
PIP_VERSION="20.2.2"
PIP_VERSION="21.3.1"
TINYIPA_REQUIRE_BIOSDEVNAME=${TINYIPA_REQUIRE_BIOSDEVNAME:-false}
TINYIPA_REQUIRE_IPMITOOL=${TINYIPA_REQUIRE_IPMITOOL:-true}
USE_PYTHON3=${USE_PYTHON3:-True}
# PYTHON_EXTRA_SOURCES_DIR_LIST is a csv list of python package dirs to include
PYTHON_EXTRA_SOURCES_DIR_LIST=${PYTHON_EXTRA_SOURCES_DIR_LIST:-}
@ -25,7 +24,7 @@ export BRANCH_EXT
TC=1001
STAFF=50
CHROOT_PATH="/tmp/overides:/usr/local/sbin:/usr/local/bin:/apps/bin:/usr/sbin:/usr/bin:/sbin:/bin"
CHROOT_PATH="/tmp/overrides:/usr/local/sbin:/usr/local/bin:/apps/bin:/usr/sbin:/usr/bin:/sbin:/bin"
CHROOT_CMD="sudo chroot $DST_DIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$http_proxy https_proxy=$https_proxy no_proxy=$no_proxy"
TC_CHROOT_CMD="sudo chroot --userspec=$TC:$STAFF $DST_DIR /usr/bin/env -i PATH=$CHROOT_PATH http_proxy=$http_proxy https_proxy=$https_proxy no_proxy=$no_proxy"

@ -85,15 +85,12 @@ if $TINYIPA_REQUIRE_IPMITOOL; then
cp $WORKDIR/build_files/ipmitool.* $FINALDIR/tmp/builtin/optional
fi
mkdir $FINALDIR/tmp/overides
cp $WORKDIR/build_files/fakeuname $FINALDIR/tmp/overides/uname
mkdir $FINALDIR/tmp/overrides
cp $WORKDIR/build_files/fakeuname $FINALDIR/tmp/overrides/uname
sudo cp $WORKDIR/build_files/ntpdate $FINALDIR/bin/ntpdate
sudo chmod 755 $FINALDIR/bin/ntpdate
PY_REQS="finalreqs_python2.lst"
if [[ $USE_PYTHON3 == "True" ]]; then
PY_REQS="finalreqs_python3.lst"
fi
PY_REQS="finalreqs_python3.lst"
# NOTE(rpittau) change ownership of the tce info dir to prevent writing issues
sudo chown $TC:$STAFF $FINALDIR/usr/local/tce.installed
@ -140,12 +137,8 @@ fi
# Ensure tinyipa picks up installed kernel modules
$CHROOT_CMD depmod -a `$WORKDIR/build_files/fakeuname -r`
PIP_COMMAND="pip"
TINYIPA_PYTHON_EXE="python"
if [[ $USE_PYTHON3 == "True" ]]; then
PIP_COMMAND="pip3"
TINYIPA_PYTHON_EXE="python3"
fi
PIP_COMMAND="pip3"
TINYIPA_PYTHON_EXE="python3"
# Install pip
# NOTE(rpittau): pip MUST be the same version used in the build script or
@ -188,7 +181,7 @@ sudo sed -i '/# Main/a NOZSWAP=1' "$FINALDIR/etc/init.d/tc-config"
# Place ipv6 modprobe config so the kernel support loads.
sudo cp "$WORKDIR/build_files/modprobe.conf" "$FINALDIR/etc/modproble.conf"
# NOTE(rpittau): workaorund for hwclock
# NOTE(rpittau): workaround for hwclock
# The adjtime file used by hwclock in tinycore is /var/lib/hwclock/adjtime
# but for some reason (bug?) the file is not created when hwclock is
# invoked, causing hwclock to fail when using certain options, for example
@ -228,6 +221,10 @@ for target in *; do
fi
done
popd
# symlink bash to sh if /bin/sh is not there
if [ ! -f "$FINALDIR/bin/sh" ]; then
$CHROOT_CMD ln -sf "/bin/bash" "/bin/sh"
fi
set -x
# Rebuild build directory into gz file

15
tox.ini

@ -1,7 +1,6 @@
[tox]
minversion = 3.18.0
envlist = pep8
skipsdist = True
ignore_basepython_conflict = true
[testenv]
@ -16,10 +15,10 @@ deps =
[testenv:pep8]
deps =
hacking>=3.1.0,<4.0.0 # Apache-2.0
hacking~=6.1.0 # Apache-2.0
flake8-import-order>=0.17.1 # LGPLv3
doc8>=0.6.0 # Apache-2.0
pycodestyle>=2.0.0,<2.7.0 # MIT
pycodestyle>=2.0.0,<3.0.0 # MIT
commands =
flake8 ironic_python_agent_builder
doc8 doc/source README.rst CONTRIBUTING.rst
@ -53,3 +52,13 @@ application-import-names = ironic_python_agent_builder
# [H210] Require 'autospec', 'spec', or 'spec_set' in mock.patch/mock.patch.object calls
# [H904] Delay string interpolations at logging calls.
enable-extensions=H106,H203,H204,H205,H210,H904
[testenv:codespell]
description =
Run codespell to check spelling
deps = codespell
# note(JayF): {posargs} lets us run `tox -ecodespell -- -w` to get codespell
# to correct spelling issues in our code it's aware of.
commands =
codespell {posargs}

@ -1,9 +1,12 @@
- job:
name: ironic-python-agent-build-image-base
parent: publish-openstack-artifacts
nodeset: ubuntu-noble
pre-run: playbooks/ironic-python-agent-build-image/pre.yaml
run: playbooks/ironic-python-agent-build-image/run.yaml
post-run: playbooks/ironic-python-agent-build-image/post.yaml
post-run:
- playbooks/ironic-python-agent-build-image/post.yaml
- playbooks/ironic-python-agent-build-image/extra-logs.yaml
timeout: 1800
required-projects:
- openstack/requirements
@ -20,25 +23,15 @@
image_type: 'tinyipa'
- job:
name: ironic-python-agent-build-image-dib-centos7
parent: ironic-python-agent-build-image-base
override-branch: stable/train
required-projects:
- openstack/diskimage-builder
vars:
image_type: 'dib'
image_distro: 'centos7'
- job:
name: ironic-python-agent-build-image-dib-centos8
name: ironic-python-agent-build-image-dib-centos9
parent: ironic-python-agent-build-image-base
required-projects:
- openstack/diskimage-builder
vars:
image_type: 'dib'
image_distro: 'centos'
image_release: '8-stream'
image_target_name: 'centos8'
image_release: '9-stream'
image_target_name: 'centos9'
- job:
name: ironic-python-agent-build-image-dib-debian
@ -48,14 +41,15 @@
vars:
image_type: 'dib'
image_distro: 'debian-minimal'
image_release: 'buster'
image_release: 'bookworm'
- job:
name: ironic-python-agent-check-image-base
parent: base
nodeset: ubuntu-focal
nodeset: ubuntu-noble
pre-run: playbooks/ironic-python-agent-build-image/pre.yaml
run: playbooks/ironic-python-agent-build-image/run.yaml
post-run: playbooks/ironic-python-agent-build-image/extra-logs.yaml
timeout: 1800
required-projects:
- openstack/requirements
@ -78,42 +72,6 @@
vars:
image_type: 'tinyipa'
- job:
name: ironic-python-agent-check-image-dib-centos7
parent: ironic-python-agent-check-image-base
override-branch: stable/train
required-projects:
- openstack/diskimage-builder
vars:
image_type: 'dib'
image_distro: 'centos7'
- job:
name: ironic-python-agent-check-image-dib-centos7-python3
parent: ironic-python-agent-check-image-base
required-projects:
- openstack/diskimage-builder
vars:
image_type: 'dib'
image_distro: 'centos7'
- job:
name: ironic-python-agent-check-image-dib-centos8
parent: ironic-python-agent-check-image-base
required-projects:
- openstack/diskimage-builder
vars:
image_type: 'dib'
image_distro: 'centos'
image_release: '8-stream'
image_target_name: 'centos8'
- job:
name: ironic-python-agent-check-image-dib-centos8-extra
parent: ironic-python-agent-check-image-dib-centos8
vars:
extra_elements: ["extra-hardware"]
- job:
name: ironic-python-agent-check-image-dib-centos9
parent: ironic-python-agent-check-image-base
@ -131,15 +89,6 @@
vars:
extra_elements: ["extra-hardware"]
- job:
name: ironic-python-agent-check-image-dib-opensuse
parent: ironic-python-agent-check-image-base
required-projects:
- openstack/diskimage-builder
vars:
image_type: 'dib'
image_distro: 'opensuse'
- job:
name: ironic-python-agent-check-image-dib-debian
parent: ironic-python-agent-check-image-base
@ -148,7 +97,27 @@
vars:
image_type: 'dib'
image_distro: 'debian-minimal'
image_release: 'buster'
image_release: 'bookworm'
- job:
name: ironic-python-agent-check-image-dib-debian-bullseye
parent: ironic-python-agent-check-image-dib-debian
vars:
image_release: 'bullseye'
- job:
name: ironic-python-agent-check-image-dib-debian-arm64
parent: ironic-python-agent-check-image-dib-debian
nodeset: debian-bullseye-arm64
vars:
image_target_name: debian-arm64
- job:
name: ironic-python-agent-build-image-dib-debian-arm64
parent: ironic-python-agent-build-image-dib-debian
nodeset: debian-bullseye-arm64
vars:
image_target_name: debian-arm64
- job:
name: ironic-python-agent-check-image-dib-debian-extra
@ -164,30 +133,20 @@
vars:
image_type: 'dib'
image_distro: 'ubuntu'
image_release: 'focal'
image_release: 'noble'
dib_no_tmpfs: '1'
- job:
name: ironic-python-agent-build-image-tinyipa-ussuri
parent: ironic-python-agent-build-image-tinyipa
nodeset: ubuntu-bionic
required-projects:
- name: openstack/ironic-python-agent-builder
override-checkout: 2.2.0
- job:
name: ironic-python-agent-check-image-tinyipa-ussuri
parent: ironic-python-agent-check-image-tinyipa
nodeset: ubuntu-bionic
required-projects:
- name: openstack/ironic-python-agent-builder
override-checkout: 2.2.0
- job:
name: ironic-python-agent-test-image-tinyipa-ussuri
parent: ironic-python-agent-check-image-tinyipa-ussuri
required-projects:
- name: openstack/ironic-python-agent
override-checkout: stable/ussuri
- name: openstack/requirements
override-checkout: stable/ussuri
name: ironic-python-agent-check-image-dib-ubuntu-arm64
parent: ironic-python-agent-check-image-dib-ubuntu
nodeset: ubuntu-noble-arm64
vars:
ipa_branch_path: "stable-ussuri"
image_target_name: ubuntu-arm64
- job:
name: ironic-python-agent-builder-tox-codespell
parent: openstack-tox
timeout: 7200
vars:
tox_envlist: codespell

@ -9,25 +9,23 @@
- ironic-standalone-ipa-src
- ipa-tempest-bios-ipmi-direct-tinyipa-src
- ironic-python-agent-check-image-tinyipa
- ironic-python-agent-check-image-dib-centos8
- ironic-python-agent-check-image-dib-centos8-extra
- ironic-python-agent-check-image-dib-centos7
- ironic-python-agent-check-image-dib-centos9
- ironic-python-agent-check-image-dib-centos9-extra
- ironic-python-agent-check-image-dib-debian
- ironic-python-agent-check-image-dib-debian-arm64
- ironic-python-agent-check-image-dib-debian-extra
# Non-voting jobs
- ironic-python-agent-check-image-dib-centos7-python3:
- ironic-python-agent-check-image-dib-debian-bullseye:
voting: false
- ironic-python-agent-check-image-dib-ubuntu:
voting: false
- ironic-python-agent-check-image-dib-opensuse:
- ironic-python-agent-check-image-dib-ubuntu-arm64:
voting: false
- ipa-tempest-bios-ipmi-direct-src:
voting: false
- ipa-tempest-ironic-inspector-src:
voting: false
- tripleo-buildimage-ironic-python-agent-centos-8:
voting: false
- ironic-python-agent-test-image-tinyipa-ussuri:
- ironic-python-agent-builder-tox-codespell:
voting: false
gate:
jobs:
@ -35,23 +33,19 @@
- ironic-standalone-ipa-src
- ipa-tempest-bios-ipmi-direct-tinyipa-src
- ironic-python-agent-check-image-tinyipa
- ironic-python-agent-check-image-dib-centos8
- ironic-python-agent-check-image-dib-centos8-extra
- ironic-python-agent-check-image-dib-centos7
- ironic-python-agent-check-image-dib-centos9
- ironic-python-agent-check-image-dib-centos9-extra
- ironic-python-agent-check-image-dib-debian
- ironic-python-agent-check-image-dib-debian-arm64
- ironic-python-agent-check-image-dib-debian-extra
post:
jobs:
- publish-openstack-python-branch-tarball
- ironic-python-agent-build-image-tinyipa:
branches: master
- ironic-python-agent-build-image-dib-centos8:
- ironic-python-agent-build-image-dib-centos9:
branches: master
- ironic-python-agent-build-image-dib-debian:
branches: master
experimental:
jobs:
- ironic-python-agent-check-image-dib-centos9:
voting: false
- ironic-python-agent-check-image-dib-centos9-extra:
voting: false
- ironic-python-agent-build-image-dib-debian-arm64:
branches: master