Inject gating repo in overcloud-full image as well

For some packages (puppet modules), we need to inject
them in both the undercloud and overcloud. This patch
handles the overcloud case, by first extracting the
overcloud-full image. Then, injecting the gating repo,
and finally, putting the updated image back on to
the undercloud.

Partial-Bug: 1572958
Change-Id: I2fc326b640d7f6020c27d2040f6328192cf890f3
This commit is contained in:
John Trowbridge 2016-05-23 08:21:12 -04:00 committed by Attila Darazs
parent 165cb2a41d
commit c682b00179
1 changed files with 25 additions and 5 deletions

View File

@ -4,11 +4,31 @@
src: inject_gating_repo.sh.j2
dest: "{{ working_dir }}/inject_gating_repo.sh"
- name: Inject the gating repo
command: >
virt-customize -a {{ working_dir }}/undercloud.qcow2
--upload {{ compressed_gating_repo }}:/tmp/gating_repo.tar.gz
--run '{{ working_dir }}/inject_gating_repo.sh'
- block:
# We need to extract the overcloud image, so we can inject the gating
# repo into it.
- name: Extract overcloud-full image
command: >
virt-copy-out -a {{ working_dir }}/undercloud.qcow2
/home/stack/overcloud-full.qcow2 {{ working_dir }}
- name: Inject the gating repo (overcloud-full)
command: >
virt-customize -a {{ working_dir }}/overcloud-full.qcow2
--upload {{ compressed_gating_repo }}:/tmp/gating_repo.tar.gz
--run '{{ working_dir }}/inject_gating_repo.sh'
- name: Copy updated overcloud-full image back to undercloud
command: >
virt-copy-in -a {{ working_dir }}/undercloud.qcow2
{{ working_dir }}/overcloud-full.qcow2 /home/stack/
- name: Inject the gating repo (undercloud)
command: >
virt-customize -a {{ working_dir }}/undercloud.qcow2
--upload {{ compressed_gating_repo }}:/tmp/gating_repo.tar.gz
--run '{{ working_dir }}/inject_gating_repo.sh'
environment:
LIBGUESTFS_BACKEND: direct
LIBVIRT_DEFAULT_URI: "{{ libvirt_uri }}"