diff --git a/.zuul.yaml b/.zuul.yaml index d1c8224..5c546c0 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -29,6 +29,17 @@ image_type: 'dib' image_distro: 'centos7' +- job: + name: ironic-python-agent-build-image-dib-centos8 + parent: ironic-python-agent-build-image-base + required-projects: + # NOTE(dtantsur): used for bindep only + - openstack/diskimage-builder + vars: + image_type: 'dib' + image_distro: 'centos-minimal' + image_release: 8 + - job: name: ironic-python-agent-check-image-base parent: base @@ -122,9 +133,7 @@ - ipa-tempest-wholedisk-bios-ipmi-direct-tinyipa-src - ipa-tempest-wholedisk-bios-ipmi-iscsi-tinyipa-src - ironic-python-agent-check-image-tinyipa - - ironic-python-agent-check-image-dib-centos7 - - ironic-python-agent-check-image-dib-centos8: - voting: false + - ironic-python-agent-check-image-dib-centos8 - ironic-python-agent-check-image-dib-fedora: voting: false - ironic-python-agent-check-image-dib-ubuntu: @@ -144,9 +153,9 @@ - ipa-tempest-wholedisk-bios-ipmi-direct-tinyipa-src - ipa-tempest-wholedisk-bios-ipmi-iscsi-tinyipa-src - ironic-python-agent-check-image-tinyipa - - ironic-python-agent-check-image-dib-centos7 + - ironic-python-agent-check-image-dib-centos8 post: jobs: - publish-openstack-python-branch-tarball - ironic-python-agent-build-image-tinyipa - - ironic-python-agent-build-image-dib-centos7 + - ironic-python-agent-build-image-dib-centos8 diff --git a/doc/source/admin/dib.rst b/doc/source/admin/dib.rst index 890e7e6..3dae528 100644 --- a/doc/source/admin/dib.rst +++ b/doc/source/admin/dib.rst @@ -20,13 +20,13 @@ You can add other diskimage-builder_ elements via the ``-e`` flag: .. code-block:: shell - ironic-python-agent-builder -e centos7 + ironic-python-agent-builder -e --release 8 centos-minimal You can specify the base name of the target images: .. code-block:: shell - ironic-python-agent-builder -o my-ipa centos7 + ironic-python-agent-builder -o my-ipa --release 8 centos-minimal You can specify the arch of the target image by setting ``ARCH`` environment variable (default is amd64): @@ -65,8 +65,9 @@ for example: .. code-block:: shell + export DIB_RELEASE=8 disk-image-create -o ironic-python-agent \ - ironic-python-agent-ramdisk centos7 dhcp-all-interfaces + ironic-python-agent-ramdisk centos-minimal To use a specific branch of ironic-python-agent, use: diff --git a/releasenotes/notes/centos8-46a95956fd871c90.yaml b/releasenotes/notes/centos8-46a95956fd871c90.yaml new file mode 100644 index 0000000..4e96ecb --- /dev/null +++ b/releasenotes/notes/centos8-46a95956fd871c90.yaml @@ -0,0 +1,11 @@ +--- +deprecations: + - | + Building images for CentOS 7 and other distribution releases that default + to Python 2 is deprecated. +other: + - | + Since ironic-python-agent has removed support for Python 2, CentOS 8 images + are now built and published on https://tarballs.openstack.org instead of + CentOS 7 ones. The CentOS 7 images should not be used for Ussuri and later + releases. diff --git a/roles/ipa-build-dib-image/defaults/main.yaml b/roles/ipa-build-dib-image/defaults/main.yaml index 870561e..ff495bb 100644 --- a/roles/ipa-build-dib-image/defaults/main.yaml +++ b/roles/ipa-build-dib-image/defaults/main.yaml @@ -1,5 +1,6 @@ -image_distro: centos7 +image_distro: centos-minimal image_release: +image_target_name: ipa_branch_path: '{{ zuul.branch | replace("/", "-") }}' ipa_source_path: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent' requirements_path: '{{ ansible_user_dir }}/src/opendev.org/openstack/requirements' diff --git a/roles/ipa-build-dib-image/tasks/main.yaml b/roles/ipa-build-dib-image/tasks/main.yaml index 830e2d7..bcda54f 100644 --- a/roles/ipa-build-dib-image/tasks/main.yaml +++ b/roles/ipa-build-dib-image/tasks/main.yaml @@ -1,6 +1,20 @@ +- name: Default to CentOS 8 + set_fact: + image_release: 8 + when: + - image_distro == "centos-minimal" + - not image_release + +- name: Generate a nice target name for CentOS + set_fact: + image_target_name: centos{{ image_release }} + when: + - image_distro == "centos-minimal" + - not image_target_name + - name: Generate image name set_fact: - image_name: ipa-{{ image_distro }}-{{ ipa_branch_path }} + image_name: ipa-{{ image_target_name | default(image_distro, true) }}-{{ ipa_branch_path }} - name: Build a DIB image command: |