Compare commits

...

12 Commits

Author SHA1 Message Date
608465b83d Merge "Add Mellanox Spectrum to firmware to remove list" 2025-06-24 13:41:42 +00:00
f4eb1c1266 Add Mellanox Spectrum to firmware to remove list
The Mellanox Spectrum series of ASICs are switch controllers.
The firmware packages which presently represent over 10% of the
size of an average Centos Stream based ironic-python-agent image.
Since this is not something we expect folks to really do,
and since it is for a switch device, it doesn't make sense to
ship these firmware binaries in the stock IPA ramdisk image.

Change-Id: Ic8ecf289f1e03e5ee7f36cc6ded707a25cb138c8
Signed-off-by: Julia Kreger <juliaashleykreger@gmail.com>
2025-06-17 17:19:53 +00:00
c1213ffe14 Merge "Build CS9 DIB IPA ramdisk with python 3.12" 2025-05-20 15:39:20 +00:00
14038a7d00 Merge "Update pip version in dib source install" 2025-05-20 15:13:33 +00:00
daf8da3a63 Build CS9 DIB IPA ramdisk with python 3.12
Change-Id: Id3da1c7bcd7aa68731eff4695e07e3f0f908a3d8
2025-05-19 12:03:53 +00:00
016b28f6e9 Update pip version in dib source install
It's been a while....

Depends-On: https://review.opendev.org/c/openstack/ironic-python-agent-builder/+/950235
Change-Id: Ib8267da67c7a5441af32c732139207a54587da54
2025-05-19 00:02:31 +00:00
800ebcd7fa Remove tinyipa CI testing
Change-Id: Idc33a27bf4daf83a58f194b6fed774783c8c4b84
2025-05-16 13:35:30 -07:00
8b246c2316 Don't install biosdevname in arm64/aarch64 arches
Closes-Bug: #2105867
Change-Id: I57e494c6e01c45a5e102c575eaa6101a2b440868
2025-04-01 17:07:40 +01:00
a9964026d5 Convert README.md to README.rst
Fixed the formatting issue.

Change-Id: I906b5c37601675b578276fc4c50629450c03bd55
2025-03-27 20:29:44 +00:00
aebdf6082d Merge "Create Podman DIB Element for container-based cleaning" 2025-03-26 23:06:59 +00:00
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
16 changed files with 286 additions and 29 deletions

@ -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

@ -13,5 +13,5 @@ smartmontools:
sysbench:
biosdevname:
not-arch: ppc64,ppc64el,ppc64le
not-arch: aarch64,arm64,ppc64,ppc64el,ppc64le
when: IPA_DISTRO_FAMILY = rh

@ -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,rtw88,rtw89,libertas,ath11k}
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,mellanox/mlxsw_spectrum}
# NOTE(TheJulia): List of what each item represents for future context
# amdgpu == AMD/ATI Radeon/Vega/Raven firmware for drivers
@ -17,3 +17,4 @@ export IPA_REMOVE_FIRMWARE=${IPA_REMOVE_FIRMWARE:-amdgpu,netronome,qcom,ti-commu
# rtw89 == Realtek wireless
# libertas == Marvell libertas wifi
# auth11k == Qualcomm atheros WLAN
# mellanox/mlxsw_spectrum = Mellanox Spectrum Switch ASIC

@ -13,10 +13,17 @@ IPADIR=/tmp/ironic-python-agent
UPPER_CONSTRAINTS=/tmp/requirements/upper-constraints.txt
VENVDIR=/opt/ironic-python-agent
# define default python
PYTHON_BIN="python3"
if [[ "${DISTRO_NAME}${DIB_RELEASE}" =~ "centos9" ]]; then
PYTHON_BIN="python3.12"
fi
# create the virtual environment using the default python
python3 -m venv $VENVDIR
REQUIRED_PIP_STR="21.3.1"
REQUIRED_PIP_TUPLE="(21, 3, 1)"
$PYTHON_BIN -m venv $VENVDIR
REQUIRED_PIP_STR="25.1.1"
REQUIRED_PIP_TUPLE="(25, 1, 1)"
HAS_PIP=$($VENVDIR/bin/python -c \
"import pip; print(tuple(map(int, pip.__version__.split('.'))) >= $REQUIRED_PIP_TUPLE)")

@ -1,15 +1,15 @@
{
"release": {
"rhel": {
"7": {
"python": "python",
"python-dev": "python-devel"
"9": {
"python": "python3.12",
"python-dev": "python3.12-devel"
}
},
"centos": {
"7": {
"python": "python",
"python-dev": "python-devel"
"9-stream": {
"python": "python3.12",
"python-dev": "python3.12-devel"
}
},
"debian": {

@ -0,0 +1,7 @@
---
other:
- |
Due to the deprecation of Python 3.9 support in OpenStack and the
evolution of python dependencies, CI test jobs for TinyIPA have
been removed. Overall code to build the test images should expect
to be removed from Ironic projects and tools as time progresses.

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

@ -6,6 +6,7 @@ Ironic Python Agent Builder Release Notes
:maxdepth: 1
unreleased
2025.1
2024.2
2024.1
2023.2

@ -16,12 +16,6 @@
ipa_raw_dir: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent/UPLOAD_RAW'
ipa_tar_dir: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent/UPLOAD_TAR'
- job:
name: ironic-python-agent-build-image-tinyipa
parent: ironic-python-agent-build-image-base
vars:
image_type: 'tinyipa'
- job:
name: ironic-python-agent-build-image-dib-centos9
parent: ironic-python-agent-build-image-base
@ -66,12 +60,6 @@
ipa_raw_dir: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent/UPLOAD_RAW'
ipa_tar_dir: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent/UPLOAD_TAR'
- job:
name: ironic-python-agent-check-image-tinyipa
parent: ironic-python-agent-check-image-base
vars:
image_type: 'tinyipa'
- job:
name: ironic-python-agent-check-image-dib-centos9
parent: ironic-python-agent-check-image-base

@ -7,8 +7,6 @@
jobs:
- openstack-tox-pep8
- ironic-standalone-ipa-src
- ipa-tempest-bios-ipmi-direct-tinyipa-src
- ironic-python-agent-check-image-tinyipa
- ironic-python-agent-check-image-dib-centos9
- ironic-python-agent-check-image-dib-centos9-extra
- ironic-python-agent-check-image-dib-debian
@ -31,8 +29,6 @@
jobs:
- openstack-tox-pep8
- ironic-standalone-ipa-src
- ipa-tempest-bios-ipmi-direct-tinyipa-src
- ironic-python-agent-check-image-tinyipa
- ironic-python-agent-check-image-dib-centos9
- ironic-python-agent-check-image-dib-centos9-extra
- ironic-python-agent-check-image-dib-debian
@ -41,8 +37,6 @@
post:
jobs:
- publish-openstack-python-branch-tarball
- ironic-python-agent-build-image-tinyipa:
branches: master
- ironic-python-agent-build-image-dib-centos9:
branches: master
- ironic-python-agent-build-image-dib-debian: