diff --git a/doc/source/install/offline-install.rst b/doc/source/install/offline-install.rst index d0952ee1f..2d1720225 100644 --- a/doc/source/install/offline-install.rst +++ b/doc/source/install/offline-install.rst @@ -43,8 +43,8 @@ this. .. code-block:: yaml - ipa_kernel_upstream_url: file:///vagrant/coreos_production_pxe.vmlinuz - ipa_ramdisk_upstream_url: file:///vagrant/coreos_production_pxe_image-oem.cpio.gz + ipa_kernel_upstream_url: file:///vagrant/ipa-centos7-master.kernel + ipa_ramdisk_upstream_url: file:///vagrant/ipa-centos7-master.initramfs cirros_deploy_image_upstream_url: file:///vagrant/cirros-0.3.4-x86_64-disk.img dib_git_url: file:///vagrant/git/diskimage-builder ironicclient_git_url: file:///vagrant/git/python-ironicclient diff --git a/doc/source/user/howto.rst b/doc/source/user/howto.rst index 89c022032..5d7f10717 100644 --- a/doc/source/user/howto.rst +++ b/doc/source/user/howto.rst @@ -338,13 +338,13 @@ Build Custom Ironic Python Agent (IPA) images ============================================= Bifrost supports the ability for a user to build a custom IPA ramdisk -utilizing the diskimage-builder element "ironic-agent". In order to utilize -this feature, the ``download_ipa`` setting must be set to ``false`` and the -create_ipa_image must be set to "true". By default, the install playbook will -build a Debian stretch based IPA image, if a pre-existing IPA image is not -present on disk. If you wish to explicitly set a specific release to be -passed to diskimage-create, then the setting ``dib_os_release`` can be set in -addition to ``dib_os_element``. +utilizing diskimage-builder and ironic-python-agent-builder. In order +to utilize this feature, the ``download_ipa`` setting must be set to ``false`` +and the create_ipa_image must be set to "true". By default, the install +playbook will build a Debian stretch based IPA image, if a pre-existing IPA +image is not present on disk. If you wish to explicitly set a specific release +to be passed to diskimage-create, then the setting ``dib_os_release`` can be +set in addition to ``dib_os_element``. If you wish to include an extra element into the IPA disk image, such as a custom hardware manager, you can pass the variable ``ipa_extra_dib_elements`` diff --git a/doc/source/user/troubleshooting.rst b/doc/source/user/troubleshooting.rst index a53098e74..4815ff8b8 100644 --- a/doc/source/user/troubleshooting.rst +++ b/doc/source/user/troubleshooting.rst @@ -59,14 +59,12 @@ to enable debugging via the kernel command line at present. Custom IPA images can be built a number of ways, the most generally useful mechanism is with diskimage-builder as the distributions typically have -better hardware support than CoreOS and Tiny Core Linux. However, CoreOS -and Tiny Core based images are what are used by the OpenStack CI for -ironic tests. +better hardware support than Tiny Core Linux. -CoreOS:: - https://opendev.org/openstack/ironic-python-agent/src/branch/master/imagebuild/coreos/README.rst -TinyIPA:: - https://opendev.org/openstack/ironic-python-agent/src/branch/master/imagebuild/tinyipa/README.rst +DIB images: + https://docs.openstack.org/ironic-python-agent-builder/latest/admin/dib.html +TinyIPA: + https://docs.openstack.org/ironic-python-agent-builder/latest/admin/tinyipa.html For documentation on diskimage-builder, See:: https://docs.openstack.org/diskimage-builder/latest/. @@ -75,25 +73,12 @@ It should be noted that the steps for diskimage-builder installation and use to create an IPA image for Bifrost are the same as for ironic. See: https://docs.openstack.org/ironic/latest/install/deploy-ramdisk.html -This essentially boils down to the following steps: - -#. ``git clone https://opendev.org/openstack/ironic-python-agent`` -#. ``cd ironic-python-agent`` -#. ``pip install -r ./requirements.txt`` - #. If you don't already have docker installed, execute: - ``sudo apt-get install docker docker.io`` -#. ``cd imagebuild/coreos`` -#. Edit ``oem/cloudconfig.yml`` and add ``--debug`` to the end of the ExecStart - setting for the ironic-python-agent.service unit. -#. Execute ``make`` to complete the build process. - -Once your build is completed, you will need to copy the images files written -to the UPLOAD folder, into the /httpboot folder. If your utilizing the -default file names, executing `cp UPLOAD/* /httpboot/` should achieve this. +Once your build is completed, you will need to copy the images files into +the ``/httpboot`` folder. Since you have updated the image to be deployed, you will need to purge the -contents of /tftpboot/master_images for the new image to be utilized for the -deployment process. +contents of ``/tftpboot/master_images`` for the new image to be utilized for +the deployment process. ********************************************* Unexpected/Unknown failure with the IPA Agent @@ -115,8 +100,7 @@ Obtaining IPA logs via the console Parameters will vary by your hardware type and configuration, however the ``systemd.journald.forward_to_console=yes`` setting is - a default, and will only work for systemd based IPA images such as - the CoreOS image. + a default, and will only work for systemd based IPA images. The example above, effectively disables all attempts by the kernel to set the video mode, defines the console as ttyS0 or the first serial port, and @@ -127,44 +111,20 @@ Obtaining IPA logs via the console You will want to view the system console occurring. If possible, you may wish to use ``ipmitool`` and write the output to a log file. -Gaining access via SSH to a node running IPA on a CoreOS-based image -==================================================================== - -If you wish to SSH into a node running IPA on a CoreOS-based image, -you need to do the following: - -#. Add ``sshkey="ssh-rsa AAAA..."`` to ``pxe_append_params`` setting in - ``[pxe]`` section of ``/etc/ironic/ironic.conf`` config file. - -#. Restart the ironic-conductor service. - -#. If the node is deployed or awaiting deployment, put it in maintenance mode:: - - openstack baremetal node maintenance set - -#. Restart the node and wait for it to boot up. - -#. ``ssh core@`` - -#. Remember to unset maintenance on the node afterwards (if set previously):: - - openstack baremetal node maintenance unset - Gaining access via SSH to the node running IPA for custom images ================================================================ Custom built images will require a user to be burned into the image. -Typically a user would use the diskimage-builder devuser element -to achieve this. More detail on this can be located at:: - - https://opendev.org/openstack/diskimage-builder/src/branch/master/diskimage_builder/elements/devuser +Typically a user would use the diskimage-builder ``devuser`` element +to achieve this. More detail on this can be located at +https://docs.openstack.org/diskimage-builder/latest/elements/devuser/README.html. Example:: export DIB_DEV_USER_USERNAME=customuser export DIB_DEV_USER_PWDLESS_SUDO=yes export DIB_DEV_USER_AUTHORIZED_KEYS=$HOME/.ssh/id_rsa.pub - disk-image-create -o /path/to/custom-ipa debian ironic-agent devuser + ironic-python-agent-builder -o /path/to/custom-ipa -e devuser debian ************************************ ``ssh_public_key_path is not valid`` @@ -195,24 +155,24 @@ Example:: NOTE: The matching private key will need to be utilized to login to the machine deployed. -*********************************************************** -Changing from TinyIPA to CoreOS IPA, or any other IPA Image -*********************************************************** +****************************************** +Changing from TinyIPA to another IPA Image +****************************************** With-in the Newton cycle, the default IPA image for Bifrost was changed to TinyIPA, which is based on Tiny Core Linux. This has a greatly reduced boot time for testing, however should be expected to have less hardware -support. If on a fresh install, or a re-install, you wish to change to CoreOS -or any other IPA image, you will need to take the following steps: +support. If on a fresh install, or a re-install, you wish to change to +DIB-based or any other IPA image, you will need to take the following steps: -#. Remove the existing IPA image ipa.vmlinuz and ipa.initramfs. +#. Remove the existing IPA image ipa.kernel and ipa.initramfs. #. Edit the ``playbooks/roles/bifrost-ironic-install/defaults/main.yml`` file and update the ``ipa_kernel_upstream_url`` and ``ipa_kernel_upstream_url`` settings to a new URL. - For CoreOS, these urls would be, - ``https://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe.vmlinuz`` + For DIB-based images, these urls would be, + ``https://tarballs.openstack.org/ironic-python-agent/dib/files/ipa-centos7-master.kernel`` and - ``https://tarballs.openstack.org/ironic-python-agent/coreos/files/coreos_production_pxe_image-oem.cpio.gz`` + ``https://tarballs.openstack.org/ironic-python-agent/dib/files/ipa-centos7-master.initramfs`` respectively. #. Execute the installation playbook, and the set files will be automatically downloaded again. If the files are not removed prior to (re)installation, diff --git a/playbooks/install.yaml b/playbooks/install.yaml index 94ceb590a..ae63e6787 100644 --- a/playbooks/install.yaml +++ b/playbooks/install.yaml @@ -22,7 +22,7 @@ config_project_name: "{{ keystone.bootstrap.project_name }}" config_region_name: "{{ keystone.bootstrap.region_name }}" config_auth_url: "{{ keystone.bootstrap.public_url }}" - - { role: bifrost-create-dib-image, dib_imagename: "{{ http_boot_folder }}/ipa", build_ramdisk: false, dib_os_element: "{{ ipa_dib_os_element|default('debian') }}", dib_elements: "ironic-agent {{ ipa_extra_dib_elements | default('') }}", when: create_ipa_image | bool == true } + - { role: bifrost-create-dib-image, dib_imagename: "{{ http_boot_folder }}/ipa", build_ramdisk: false, dib_os_element: "{{ ipa_dib_os_element|default('debian') }}", dib_elements: "ironic-python-agent-ramdisk {{ ipa_extra_dib_elements | default('') }}", when: create_ipa_image | bool == true } - { role: bifrost-create-dib-image, dib_imagename: "{{ deploy_image }}", dib_imagetype: "qcow2", dib_elements: "{{ dib_image_type|default('vm') }} enable-serial-console {{ dib_init_element|default('simple-init') }} {{ extra_dib_elements|default('') }}", when: create_image_via_dib | bool == true and transform_boot_image | bool == false } environment: http_proxy: "{{ lookup('env','http_proxy') }}" diff --git a/playbooks/inventory/baremetal.json.example b/playbooks/inventory/baremetal.json.example index 4ad42b253..2366e1a7f 100644 --- a/playbooks/inventory/baremetal.json.example +++ b/playbooks/inventory/baremetal.json.example @@ -27,8 +27,8 @@ "name": "basicipmiexample0" }, "advancedipmiexample0": { - "ipa_kernel_url": "http://192.168.1.1:8080/custom_ipa.vmlinuz", - "ipa_ramdisk_url": "http://192.168.1.1:8080/custom_ipa_image.cpio.gz", + "ipa_kernel_url": "http://192.168.1.1:8080/custom_ipa.kernel", + "ipa_ramdisk_url": "http://192.168.1.1:8080/custom_ipa.initramfs", "uuid": "00000000-0000-0000-0000-000000000003", "driver_info": { "power": { diff --git a/playbooks/inventory/baremetal.yml.example b/playbooks/inventory/baremetal.yml.example index d51c4dbb7..63edcad79 100644 --- a/playbooks/inventory/baremetal.yml.example +++ b/playbooks/inventory/baremetal.yml.example @@ -20,8 +20,8 @@ cpus: "16" name: "basicipmiexample0" advancedipmiexample0: - ipa_kernel_url: "http://192.168.1.1:8080/custom_ipa.vmlinuz" - ipa_ramdisk_url: "http://192.168.1.1:8080/custom_ipa_image.cpio.gz" + ipa_kernel_url: "http://192.168.1.1:8080/custom_ipa.kernel" + ipa_ramdisk_url: "http://192.168.1.1:8080/custom_ipa.initramfs" uuid: "00000000-0000-0000-0000-000000000003" driver_info: power: diff --git a/playbooks/inventory/group_vars/baremetal b/playbooks/inventory/group_vars/baremetal index e0f7dab01..ed121f167 100644 --- a/playbooks/inventory/group_vars/baremetal +++ b/playbooks/inventory/group_vars/baremetal @@ -24,10 +24,10 @@ testing_user: root # IPA Image parameters. If these are changed, they must be changed in # Both localhost and baremetal groups. Presently the defaults # in each role should be sufficient for proper operation. -# ipa_kernel: "{{http_boot_folder}}/coreos_production_pxe.vmlinuz" -# ipa_ramdisk: "{{http_boot_folder}}/coreos_production_pxe_image-oem.cpio.gz" -# ipa_kernel_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{file_url_port}}/coreos_production_pxe.vmlinuz" -# ipa_ramdisk_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{file_url_port}}/coreos_production_pxe_image-oem.cpio.gz" +# ipa_kernel: "{{http_boot_folder}}/ipa.kernel" +# ipa_ramdisk: "{{http_boot_folder}}/ipa.initramfs" +# ipa_kernel_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{file_url_port}}/ipa.kernel" +# ipa_ramdisk_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{file_url_port}}/ipa.initramfs" # The http_boot_folder defines the root folder for the webserver. # If this setting is changed, it must be applied to both the baremetal diff --git a/playbooks/inventory/group_vars/localhost b/playbooks/inventory/group_vars/localhost index c1531bc8a..b15204499 100644 --- a/playbooks/inventory/group_vars/localhost +++ b/playbooks/inventory/group_vars/localhost @@ -31,10 +31,10 @@ mysql_password: # IPA Image parameters. If these are changed, they must be changed in # Both localhost and baremetal groups. Presently the defaults # in each role should be sufficient for proper operation. -# ipa_kernel: "{{http_boot_folder}}/coreos_production_pxe.vmlinuz" -# ipa_ramdisk: "{{http_boot_folder}}/coreos_production_pxe_image-oem.cpio.gz" -# ipa_kernel_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{file_url_port}}/coreos_production_pxe.vmlinuz" -# ipa_ramdisk_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{file_url_port}}/coreos_production_pxe_image-oem.cpio.gz" +# ipa_kernel: "{{http_boot_folder}}/ipa.kernel" +# ipa_ramdisk: "{{http_boot_folder}}/ipa.initramfs" +# ipa_kernel_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{file_url_port}}/ipa.kernel" +# ipa_ramdisk_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{file_url_port}}/ipa.initramfs" # The http_boot_folder defines the root folder for the webserver. # If this setting is changed, it must be applied to both the baremetal @@ -59,7 +59,7 @@ dib_image_type: vm # Setting to prepend a partition image with a boot sector and partition table. transform_boot_image: false -# Create IPA image instead of downloading an pre-made CoreOS IPA image. +# Create IPA image instead of downloading an pre-made IPA image. create_ipa_image: false # Dnsmasq default route for clients. If not defined, dnsmasq will push to diff --git a/playbooks/inventory/group_vars/target b/playbooks/inventory/group_vars/target index c1531bc8a..b15204499 100644 --- a/playbooks/inventory/group_vars/target +++ b/playbooks/inventory/group_vars/target @@ -31,10 +31,10 @@ mysql_password: # IPA Image parameters. If these are changed, they must be changed in # Both localhost and baremetal groups. Presently the defaults # in each role should be sufficient for proper operation. -# ipa_kernel: "{{http_boot_folder}}/coreos_production_pxe.vmlinuz" -# ipa_ramdisk: "{{http_boot_folder}}/coreos_production_pxe_image-oem.cpio.gz" -# ipa_kernel_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{file_url_port}}/coreos_production_pxe.vmlinuz" -# ipa_ramdisk_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{file_url_port}}/coreos_production_pxe_image-oem.cpio.gz" +# ipa_kernel: "{{http_boot_folder}}/ipa.kernel" +# ipa_ramdisk: "{{http_boot_folder}}/ipa.initramfs" +# ipa_kernel_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{file_url_port}}/ipa.kernel" +# ipa_ramdisk_url: "http://{{ hostvars[inventory_hostname]['ansible_' + network_interface]['ipv4']['address'] }}:{{file_url_port}}/ipa.initramfs" # The http_boot_folder defines the root folder for the webserver. # If this setting is changed, it must be applied to both the baremetal @@ -59,7 +59,7 @@ dib_image_type: vm # Setting to prepend a partition image with a boot sector and partition table. transform_boot_image: false -# Create IPA image instead of downloading an pre-made CoreOS IPA image. +# Create IPA image instead of downloading an pre-made IPA image. create_ipa_image: false # Dnsmasq default route for clients. If not defined, dnsmasq will push to diff --git a/playbooks/roles/bifrost-create-dib-image/defaults/main.yml b/playbooks/roles/bifrost-create-dib-image/defaults/main.yml index 7f0eda68c..e6a8e4071 100644 --- a/playbooks/roles/bifrost-create-dib-image/defaults/main.yml +++ b/playbooks/roles/bifrost-create-dib-image/defaults/main.yml @@ -16,6 +16,7 @@ dib_notmpfs: false dib_offline: false dib_skipbase: false dib_packages: "" +ipa_builder_git_folder: /opt/stack/ironic-python-agent-builder # Settings related to installing bifrost in a virtual environment enable_venv: false bifrost_venv_dir: "{{ lookup('env', 'VENV') | default('/opt/stack/bifrost') }}" diff --git a/playbooks/roles/bifrost-create-dib-image/tasks/main.yml b/playbooks/roles/bifrost-create-dib-image/tasks/main.yml index 41db6e96f..32797430c 100644 --- a/playbooks/roles/bifrost-create-dib-image/tasks/main.yml +++ b/playbooks/roles/bifrost-create-dib-image/tasks/main.yml @@ -30,7 +30,7 @@ register: test_image_dib_present when: test_image_present.stat.exists == false # Note(TheJulia): We need to explicitly test for initramfs in the case - # that the ironic-agent element is used to build the image. + # that the ironic-python-agent-ramdisk element is used to build the image. - name: "Test if image is present - {{ dib_imagename }}.initramfs" stat: path={{ dib_imagename }}.initramfs register: test_image_initramfs_present @@ -122,6 +122,9 @@ set_fact: dib_env_vars_final: "{{dib_env_vars_final | combine({'DIB_RELEASE':dib_os_release}) }}" when: dib_os_release is defined +- name: "Set the ELEMENTS_PATH environment variable" + set_fact: + dib_env_vars_final: "{{dib_env_vars_final | combine({'ELEMENTS_PATH': ipa_builder_git_folder + '/dib'}) }}" - name: "Set partitioning information if set" slurp: src: "{{ partitioning_file }}" diff --git a/playbooks/roles/bifrost-ironic-install/defaults/main.yml b/playbooks/roles/bifrost-ironic-install/defaults/main.yml index 01f690774..90221b8d4 100644 --- a/playbooks/roles/bifrost-ironic-install/defaults/main.yml +++ b/playbooks/roles/bifrost-ironic-install/defaults/main.yml @@ -53,9 +53,9 @@ ipa_upstream_release: "master" enable_uefi_ipxe: true ipxe_efi_binary: ipxe.efi -ipa_kernel: "{{http_boot_folder}}/ipa.vmlinuz" +ipa_kernel: "{{http_boot_folder}}/ipa.kernel" ipa_ramdisk: "{{http_boot_folder}}/ipa.initramfs" -ipa_kernel_url: "{{ ipa_file_protocol }}://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{file_url_port}}/ipa.vmlinuz" +ipa_kernel_url: "{{ ipa_file_protocol }}://{{ hostvars[inventory_hostname]['ansible_' + ans_network_interface]['ipv4']['address'] }}:{{file_url_port}}/ipa.kernel" ipa_kernel_upstream_url: "https://tarballs.openstack.org/ironic-python-agent/tinyipa/files/tinyipa-{{ ipa_upstream_release }}.vmlinuz" ipa_kernel_upstream_checksum_algo: "sha256" ipa_kernel_upstream_checksum_url: "{{ ipa_kernel_upstream_url }}.{{ ipa_kernel_upstream_checksum_algo }}" @@ -80,8 +80,10 @@ ironicclient_git_url: https://opendev.org/openstack/python-ironicclient openstacksdk_git_url: https://opendev.org/openstack/openstacksdk shade_git_url: https://opendev.org/openstack/shade ironic_git_url: https://opendev.org/openstack/ironic +staging_drivers_git_url: https://opendev.org/x/ironic-staging-drivers ironicinspector_git_url: https://opendev.org/openstack/ironic-inspector ironicinspectorclient_git_url: https://opendev.org/openstack/python-ironic-inspector-client +ipa_builder_git_url: https://opendev.org/openstack/ironic-python-agent-builder mysql_username: "root" mysql_password: "" # NOTE(TheJulia): While we have indicated we're going to deprecate ironic_db_password, @@ -101,7 +103,7 @@ staging_drivers_git_folder: /opt/stack/ironic-staging-drivers ironicinspector_git_folder: /opt/stack/ironic-inspector ironicinspectorclient_git_folder: /opt/stack/python-ironic-inspector-client sushy_git_folder: /opt/stack/sushy -staging_drivers_git_url: https://opendev.org/x/ironic-staging-drivers +ipa_builder_git_folder: /opt/stack/ironic-python-agent-builder enabled_hardware_types: "ipmi,redfish,ilo" default_deploy_interface: "direct" diff --git a/playbooks/roles/bifrost-ironic-install/tasks/install.yml b/playbooks/roles/bifrost-ironic-install/tasks/install.yml index 211983a28..c1ecb4b80 100644 --- a/playbooks/roles/bifrost-ironic-install/tasks/install.yml +++ b/playbooks/roles/bifrost-ironic-install/tasks/install.yml @@ -65,6 +65,13 @@ # as a result. when: skip_install is not defined and install_dib | bool == true +- name: "IPA-builder - Install" + include: pip_install.yml + package=ironic-python-agent-builder + sourcedir={{ ipa_builder_git_folder }} + source_install=true + when: skip_install is not defined and install_dib | bool == true + - name: "sushy - Install" include: pip_install.yml package=sushy diff --git a/playbooks/roles/bifrost-prep-for-install/defaults/main.yml b/playbooks/roles/bifrost-prep-for-install/defaults/main.yml index 63ce3692e..a36d30131 100644 --- a/playbooks/roles/bifrost-prep-for-install/defaults/main.yml +++ b/playbooks/roles/bifrost-prep-for-install/defaults/main.yml @@ -13,6 +13,7 @@ reqs_git_url: https://opendev.org/openstack/requirements staging_drivers_git_url: https://opendev.org/x/ironic-staging-drivers keystone_git_url: https://opendev.org/openstack/keystone sushy_git_url: https://opendev.org/openstack/sushy +ipa_builder_git_url: https://opendev.org/openstack/ironic-python-agent-builder # *_git_folder can be overridden by local clones for offline installs ironicclient_git_folder: "{{ git_root}}/python-ironicclient" ironic_git_folder: "{{ git_root}}/ironic" @@ -26,6 +27,7 @@ upper_constraints_file: "{{ lookup('env', 'UPPER_CONSTRAINTS_FILE') | default(re staging_drivers_git_folder: "{{ git_root }}/ironic-staging-drivers" keystone_git_folder: "{{ git_root}}/keystone" sushy_git_folder: "{{ git_root}}/sushy" +ipa_builder_git_folder: "{{ git_root}}/ironic-python-agent-builder" # *git_branch can be overridden for stable branch testing git_branch: master ironicclient_git_branch: "{{ git_branch }}" @@ -39,6 +41,7 @@ reqs_git_branch: "{{ git_branch }}" staging_drivers_git_branch: "{{ git_branch }}" keystone_git_branch: "{{ git_branch }}" sushy_git_branch: "{{ git_branch }}" +ipa_builder_git_branch: "{{ git_branch }}" # Conditional variables utilized based on CI or manual testing options. copy_from_local_path: false @@ -89,3 +92,7 @@ bifrost_install_sources: git_url: "{{ sushy_git_url }}" git_branch: "{{ sushy_git_branch }}" name: sushy + - git_folder: "{{ ipa_builder_git_folder }}" + git_url: "{{ ipa_builder_git_url }}" + git_branch: "{{ ipa_builder_git_branch }}" + name: ironic-python-agent-builder diff --git a/playbooks/roles/ironic-enroll-dynamic/defaults/main.yml b/playbooks/roles/ironic-enroll-dynamic/defaults/main.yml index 753e4c3ca..eca986ae5 100644 --- a/playbooks/roles/ironic-enroll-dynamic/defaults/main.yml +++ b/playbooks/roles/ironic-enroll-dynamic/defaults/main.yml @@ -11,7 +11,7 @@ network_interface: "virbr0" # documentation at http://ipxe.org/crypto ipa_file_protocol: "http" -ipa_kernel_url: "{{ ipa_file_protocol }}://{{ hostvars[inventory_hostname]['ansible_' + network_interface | replace('-', '_')]['ipv4']['address'] }}:{{file_url_port}}/ipa.vmlinuz" +ipa_kernel_url: "{{ ipa_file_protocol }}://{{ hostvars[inventory_hostname]['ansible_' + network_interface | replace('-', '_')]['ipv4']['address'] }}:{{file_url_port}}/ipa.kernel" ipa_ramdisk_url: "{{ ipa_file_protocol }}://{{ hostvars[inventory_hostname]['ansible_' + network_interface | replace('-', '_')]['ipv4']['address'] }}:{{file_url_port}}/ipa.initramfs" noauth_mode: true diff --git a/playbooks/test-bifrost.yaml b/playbooks/test-bifrost.yaml index 573985125..90e792fcd 100644 --- a/playbooks/test-bifrost.yaml +++ b/playbooks/test-bifrost.yaml @@ -40,6 +40,7 @@ sushy_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack/sushy" reqs_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack/requirements" staging_drivers_git_url: "{{ lookup('env', 'WORKSPACE') }}/x/ironic-staging-drivers" + ipa_builder_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack/ironic-python-agent-builder" when: lookup('env', 'ZUUL_BRANCH') | length > 0 - name: "Override the ipv4_gateway setting" set_fact: @@ -71,7 +72,7 @@ # NOTE(TheJulia): While the next step creates a ramdisk, some elements # do not support ramdisk-image-create as they invoke steps to cleanup # the ramdisk which causes ramdisk-image-create to believe it failed. - - { role: bifrost-create-dib-image, dib_imagename: "{{ http_boot_folder }}/ipa", build_ramdisk: false, dib_os_element: "{{ ipa_dib_os_element|default('debian') }}", dib_os_release: "stretch", dib_elements: "ironic-agent {{ ipa_extra_dib_elements | default('') }}", dib_packages: "bsdmainutils", when: create_ipa_image | bool == true } + - { role: bifrost-create-dib-image, dib_imagename: "{{ http_boot_folder }}/ipa", build_ramdisk: false, dib_os_element: "{{ ipa_dib_os_element|default('debian') }}", dib_os_release: "stretch", dib_elements: "ironic-python-agent-ramdisk {{ ipa_extra_dib_elements | default('') }}", dib_packages: "bsdmainutils", when: create_ipa_image | bool == true } # NOTE(TheJulia): This creates the guest image. - { role: bifrost-create-dib-image, dib_imagetype: "qcow2", dib_imagename: "{{deploy_image}}", dib_os_element: "debian", dib_os_release: "stretch", dib_elements: "vm enable-serial-console simple-init {{ extra_dib_elements|default('') }}", when: create_image_via_dib | bool == true and transform_boot_image | bool == false } - role: bifrost-keystone-client-config diff --git a/releasenotes/notes/ipa-builder-29d3db174048f1b4.yaml b/releasenotes/notes/ipa-builder-29d3db174048f1b4.yaml new file mode 100644 index 000000000..36a09dfb1 --- /dev/null +++ b/releasenotes/notes/ipa-builder-29d3db174048f1b4.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Uses `ironic-python-agent-builder + `_ instead of the + deprecated and broken ``ironic-agent`` element to build deploy ramdisk. diff --git a/zuul.d/bifrost-jobs.yaml b/zuul.d/bifrost-jobs.yaml index 9c8bf36d3..9b107d2df 100644 --- a/zuul.d/bifrost-jobs.yaml +++ b/zuul.d/bifrost-jobs.yaml @@ -18,6 +18,7 @@ - openstack/diskimage-builder - openstack/ironic - openstack/ironic-inspector + - openstack/ironic-python-agent-builder - openstack/keystone - openstack/openstacksdk - openstack/python-ironic-inspector-client