
The critical part of this commit is adapting code that was still sourcing env-vars. This file was removed from Bifrost in the Victoria release, breaking the `kayobe seed deployment image build` command. The other changes are not yet breaking Kayobe: 1) Release notes claim that OpenStackClient is no longer installed when keystone is not enabled, but it appears to still be available. Use the ironic native baremetal command instead except in playbooks related to baremetal compute nodes (i.e. overcloud ironic). 2) The use of OS_CLOUD=bifrost-inspector is deprecated and should be replaced by OS_CLOUD=bifrost. Change-Id: I25078e69acdf41a4ef9957f99fe5047de54b778d Story: 2008558 Task: 41696
55 lines
2.1 KiB
YAML
55 lines
2.1 KiB
YAML
---
|
|
# Build and install an Ironic Python Agent (IPA) image for the seed host's
|
|
# ironic and ironic-inspector services.
|
|
|
|
- name: Ensure Ironic Python Agent images are built and installed
|
|
hosts: seed
|
|
tags:
|
|
- ipa-build
|
|
vars:
|
|
ipa_image_name: "ipa"
|
|
ipa_images:
|
|
- "{{ ipa_image_name }}.kernel"
|
|
- "{{ ipa_image_name }}.initramfs"
|
|
ipa_image_force_rebuild: false
|
|
tasks:
|
|
- block:
|
|
- name: Ensure Ironic Python Agent images are built
|
|
include_role:
|
|
name: stackhpc.os-images
|
|
vars:
|
|
os_images_venv: "{{ virtualenv_path }}/ipa-build-dib"
|
|
os_images_package_state: latest
|
|
os_images_upper_constraints_file: "{{ pip_upper_constraints_file }}"
|
|
os_images_cache: "{{ image_cache_path }}"
|
|
os_images_common: ""
|
|
os_images_list:
|
|
- name: "{{ ipa_image_name }}"
|
|
elements: "{{ ipa_build_dib_elements }}"
|
|
env: "{{ ipa_build_dib_env }}"
|
|
packages: "{{ ipa_build_dib_packages }}"
|
|
# Avoid needing to install qemu-img for qcow2 image.
|
|
type: raw
|
|
os_images_git_elements: "{{ ipa_build_dib_git_elements }}"
|
|
os_images_upload: False
|
|
os_images_force_rebuild: "{{ ipa_image_force_rebuild }}"
|
|
|
|
- name: Ensure Ironic Python Agent images are copied onto seed
|
|
copy:
|
|
src: "{{ image_cache_path }}/{{ ipa_image_name }}/{{ item }}"
|
|
dest: "/etc/kolla/bifrost/{{ item }}"
|
|
remote_src: True
|
|
with_items: "{{ ipa_images }}"
|
|
become: True
|
|
|
|
- name: Copy Ironic Python Agent images into /httpboot
|
|
command: >
|
|
docker exec bifrost_deploy
|
|
bash -c 'export OS_CLOUD=bifrost &&
|
|
ansible -vvvv target -i /bifrost/playbooks/inventory/target
|
|
-m copy
|
|
-a "src=/etc/bifrost/{{ item }} dest=/httpboot/{{ item }}"
|
|
-e "ansible_python_interpreter=/var/lib/kolla/venv/bin/python"'
|
|
with_items: "{{ ipa_images }}"
|
|
when: ipa_build_images | bool
|