diff --git a/playbooks/roles/bifrost-create-dib-image/defaults/main.yml b/playbooks/roles/bifrost-create-dib-image/defaults/main.yml index e6a8e4071..8ff8e4724 100644 --- a/playbooks/roles/bifrost-create-dib-image/defaults/main.yml +++ b/playbooks/roles/bifrost-create-dib-image/defaults/main.yml @@ -16,6 +16,8 @@ dib_notmpfs: false dib_offline: false dib_skipbase: false dib_packages: "" +ipa_git_folder: /opt/stack/ironic-python-agent +reqs_git_folder: /opt/stack/requirements ipa_builder_git_folder: /opt/stack/ironic-python-agent-builder # Settings related to installing bifrost in a virtual environment enable_venv: false diff --git a/playbooks/roles/bifrost-create-dib-image/tasks/main.yml b/playbooks/roles/bifrost-create-dib-image/tasks/main.yml index 32797430c..2f60666d4 100644 --- a/playbooks/roles/bifrost-create-dib-image/tasks/main.yml +++ b/playbooks/roles/bifrost-create-dib-image/tasks/main.yml @@ -115,9 +115,22 @@ set_fact: dib_os_release: "stretch" when: dib_os_element == "debian" and dib_os_release is undefined +- name: "Initialize DIB source-repository variables" + set_fact: + # NOTE(dtantsur): these options have two copies of the same + # configuration: one for the old element in DIB (ironic-agent), the other - + # for the new element in IPA-builder (ironic-python-agent). + dib_source_repositories: + DIB_REPOLOCATION_ironic_agent: "{{ ipa_git_folder }}" + DIB_REPOLOCATION_ironic_python_agent: "{{ ipa_git_folder }}" + DIB_REPOLOCATION_requirements: "{{ reqs_git_folder }}" + # NOTE(dtantsur): using HEAD to avoid changing whatever is checked out + DIB_REPOREF_ironic_agent: HEAD + DIB_REPOREF_ironic_python_agent: HEAD + DIB_REPOREF_requirements: HEAD - name: "Initialize the DIB environment variables fact" set_fact: - dib_env_vars_final: "{{dib_env_vars}}" + dib_env_vars_final: "{{dib_env_vars | combine(dib_source_repositories)}}" - name: "Set the DIB_RELEASE environment variable if set" set_fact: dib_env_vars_final: "{{dib_env_vars_final | combine({'DIB_RELEASE':dib_os_release}) }}" diff --git a/playbooks/roles/bifrost-ironic-install/defaults/main.yml b/playbooks/roles/bifrost-ironic-install/defaults/main.yml index 90221b8d4..6e2b0b862 100644 --- a/playbooks/roles/bifrost-ironic-install/defaults/main.yml +++ b/playbooks/roles/bifrost-ironic-install/defaults/main.yml @@ -83,6 +83,7 @@ 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_git_url: https://opendev.org/openstack/ironic-python-agent ipa_builder_git_url: https://opendev.org/openstack/ironic-python-agent-builder mysql_username: "root" mysql_password: "" @@ -103,6 +104,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 +ipa_git_folder: /opt/stack/ironic-python-agent ipa_builder_git_folder: /opt/stack/ironic-python-agent-builder enabled_hardware_types: "ipmi,redfish,ilo" diff --git a/playbooks/roles/bifrost-prep-for-install/defaults/main.yml b/playbooks/roles/bifrost-prep-for-install/defaults/main.yml index a36d30131..3e82fcb8a 100644 --- a/playbooks/roles/bifrost-prep-for-install/defaults/main.yml +++ b/playbooks/roles/bifrost-prep-for-install/defaults/main.yml @@ -27,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_git_folder: "{{ git_root}}/ironic-python-agent" ipa_builder_git_folder: "{{ git_root}}/ironic-python-agent-builder" # *git_branch can be overridden for stable branch testing git_branch: master @@ -41,6 +42,7 @@ reqs_git_branch: "{{ git_branch }}" staging_drivers_git_branch: "{{ git_branch }}" keystone_git_branch: "{{ git_branch }}" sushy_git_branch: "{{ git_branch }}" +ipa_git_branch: "{{ git_branch }}" ipa_builder_git_branch: "{{ git_branch }}" # Conditional variables utilized based on CI or manual testing options. @@ -92,6 +94,10 @@ bifrost_install_sources: git_url: "{{ sushy_git_url }}" git_branch: "{{ sushy_git_branch }}" name: sushy + - git_folder: "{{ ipa_git_folder }}" + git_url: "{{ ipa_git_url }}" + git_branch: "{{ ipa_git_branch }}" + name: ironic-python-agent - git_folder: "{{ ipa_builder_git_folder }}" git_url: "{{ ipa_builder_git_url }}" git_branch: "{{ ipa_builder_git_branch }}" diff --git a/playbooks/test-bifrost.yaml b/playbooks/test-bifrost.yaml index 90e792fcd..45da6f555 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_git_url: "{{ lookup('env', 'WORKSPACE') }}/openstack/ironic-python-agent" 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" diff --git a/releasenotes/notes/ipa-branch-6d1d30876b584cbf.yaml b/releasenotes/notes/ipa-branch-6d1d30876b584cbf.yaml new file mode 100644 index 000000000..3ff69d0d8 --- /dev/null +++ b/releasenotes/notes/ipa-branch-6d1d30876b584cbf.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Uses the appropriate ironic-python-agent branch when building a deploy + ramdisk instead of unconditionally using master. Set ``ipa_git_branch`` + to override. diff --git a/zuul.d/bifrost-jobs.yaml b/zuul.d/bifrost-jobs.yaml index 9b107d2df..6bd889ecd 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 - openstack/ironic-python-agent-builder - openstack/keystone - openstack/openstacksdk