diff --git a/roles/common/defaults/main.yml b/roles/common/defaults/main.yml index e53735a6e..6f3132725 100644 --- a/roles/common/defaults/main.yml +++ b/roles/common/defaults/main.yml @@ -23,7 +23,7 @@ image_cache_dir: "/var/cache/tripleo-quickstart/images/{{ release }}" image_fetch_dir: "{{ working_dir }}" # This determines whether to download a pre-built undercloud.qcow2 or -# whether to instead use an overcloud-full.qcow2 and convert it on +# whether to instead use an overcloud qcow2 and convert it on # the fly. The default is to use a pre-built undercloud.qcow2. overcloud_as_undercloud: false diff --git a/roles/convert-image/README.md b/roles/convert-image/README.md index 6f31ee691..ed1e5775a 100644 --- a/roles/convert-image/README.md +++ b/roles/convert-image/README.md @@ -1,6 +1,6 @@ # Convert an overcloud-full.qcow2 into an image to boot an undercloud from -The `convert-image` role transforms an overcloud-full image into one which an +The `convert-image` role transforms an overcloud image into one which an undercloud can be booted from in order to save time on package installs, while not needing to maintain/host a specific undercloud image. @@ -19,6 +19,6 @@ not needing to maintain/host a specific undercloud image. separate from the install list so that it can be allowed to fail without failing the conversion) * `overcloud_full_root_pwd`: If set the defined password will - set for the root user on the overcloud-full image. The + set for the root user on the overcloudl image. The resulting overcloud and undercloud instances will have the password set. diff --git a/roles/convert-image/tasks/main.yml b/roles/convert-image/tasks/main.yml index af2e43389..c1cadd740 100644 --- a/roles/convert-image/tasks/main.yml +++ b/roles/convert-image/tasks/main.yml @@ -4,9 +4,9 @@ src: "{{ convert_image_template }}" dest: "{{ convert_image_working_dir }}/convert_image.sh" -- name: check if we have an overcloud-full.qcow2 to start from +- name: check if we have an {{ overcloud_image }}.qcow2 to start from stat: - path: "{{ convert_image_working_dir }}/overcloud-full.qcow2" + path: "{{ convert_image_working_dir }}/{{ overcloud_image }}.qcow2" register: overcloud_full_qcow2 # This tasks is not be used in CI or on any public systems @@ -14,15 +14,15 @@ - name: set root password for image command: > virt-customize --smp 2 -m {{ convert_image_host_memory }} - -a {{ convert_image_working_dir }}/overcloud-full.qcow2 + -a {{ convert_image_working_dir }}/{{ overcloud_image }}.qcow2 --root-password password:{{ overcloud_full_root_pwd }} when: - overcloud_full_root_pwd is defined - overcloud_full_qcow2.stat.exists -- name: copy overcloud-full.qcow2 to undercloud.qcow2 +- name: copy {{ overcloud_image }}.qcow2 to undercloud.qcow2 command: > - cp {{ convert_image_working_dir }}/overcloud-full.qcow2 + cp {{ convert_image_working_dir }}/{{ overcloud_image }}.qcow2 {{ convert_image_working_dir }}/undercloud.qcow2 changed_when: true when: overcloud_full_qcow2.stat.exists and overcloud_as_undercloud|bool diff --git a/roles/libvirt/setup/undercloud/tasks/customize_overcloud.yml b/roles/libvirt/setup/undercloud/tasks/customize_overcloud.yml index 028c4ace1..5a6fd8e33 100644 --- a/roles/libvirt/setup/undercloud/tasks/customize_overcloud.yml +++ b/roles/libvirt/setup/undercloud/tasks/customize_overcloud.yml @@ -13,23 +13,23 @@ # so we can inject the gating repo into it. - name: check if overcloud image is already extracted stat: - path: '{{ working_dir }}/overcloud-full.qcow2' + path: '{{ working_dir }}/{{ overcloud_image }}.qcow2' register: overcloud_image_stat_for_customize - - name: Extract overcloud-full image + - name: Extract {{ overcloud_image }} image command: > virt-copy-out -a {{ working_dir }}/undercloud.qcow2 - /home/{{ undercloud_user }}/overcloud-full.qcow2 {{ working_dir }} + /home/{{ undercloud_user }}/{{ overcloud_image }}.qcow2 {{ working_dir }} when: not overcloud_image_stat_for_customize.stat.exists - # only customize overcloud-full image if that is not going to be + # only customize {{ overcloud_image }} image if that is not going to be # used as undercloud - name: Perform extra overcloud customizations command: > - virt-customize -a {{ working_dir }}/overcloud-full.qcow2 + virt-customize -a {{ working_dir }}/{{ overcloud_image }}.qcow2 --run '{{ working_dir }}/overcloud-customize.sh' - - name: Copy updated overcloud-full image back to undercloud + - name: Copy updated {{ overcloud_image }} image back to undercloud command: > virt-copy-in -a {{ working_dir }}/undercloud.qcow2 - {{ working_dir }}/overcloud-full.qcow2 /home/{{ undercloud_user }}/ + {{ working_dir }}/{{ overcloud_image }}.qcow2 /home/{{ undercloud_user }}/ diff --git a/roles/libvirt/setup/undercloud/tasks/main.yml b/roles/libvirt/setup/undercloud/tasks/main.yml index 23f1ada7f..c6bf54880 100644 --- a/roles/libvirt/setup/undercloud/tasks/main.yml +++ b/roles/libvirt/setup/undercloud/tasks/main.yml @@ -49,11 +49,11 @@ - include_tasks: inject_gating_repo.yml when: compressed_gating_repo is defined and compressed_gating_repo - # Converts an overcloud-full.qcow2 into a undercloud.qcow2 + # Converts an {{ overcloud_image }}.qcow2 into a undercloud.qcow2 - include_tasks: convert_image.yml when: overcloud_as_undercloud|bool or baseos_as_undercloud|bool - # Update images after we have converted the overcloud-full to an + # Update images after we have converted the overcloud to an # undercloud image when using devmode. This also clones tripleo-ci # on the undercloud image. - include_tasks: update_image.yml @@ -271,14 +271,14 @@ cacheable: true when: ssh_user != "root" - # NOTE(trown) We use the overcloud-full initramfs and kernel as DIB + # NOTE(trown) We use the overcloud initramfs and kernel as DIB # seems a bit smarter about extracting them than virt-get-kernel and - # the partition image is simply a converted overcloud-full + # the partition image is simply a converted overcloud - name: Extract the kernel and initramfs from the undercloud image command: > virt-copy-out -a '{{ working_dir }}/undercloud.qcow2' - '/home/{{ undercloud_user }}/overcloud-full.vmlinuz' - '/home/{{ undercloud_user }}/overcloud-full.initrd' + '/home/{{ undercloud_user }}/{{ overcloud_image }}.vmlinuz' + '/home/{{ undercloud_user }}/{{ overcloud_image }}.initrd' '{{ working_dir }}' environment: "{{ libvirt_environment }}" when: not undercloud_use_custom_boot_images|bool @@ -297,20 +297,20 @@ LIBVIRT_DEFAULT_URI: "{{ libvirt_uri }}" # NOTE(trown) The undercloudvm template expects this to be - # named overcloud-full.vmlinuz. We can update the devmode case + # named {{ overcloud_image }}.vmlinuz. We can update the devmode case # to not require this step - name: rename undercloud kernel command: > mv '{{ working_dir }}/vmlinuz' - '{{ working_dir }}/overcloud-full.vmlinuz' + '{{ working_dir }}/{{ overcloud_image }}.vmlinuz' # NOTE(trown) The undercloudvm template expects this to be - # named overcloud-full.initrd. We can update the devmode case + # named {{ overcloud_image }}.initrd. We can update the devmode case # to not require this step - name: rename undercloud initramfs command: > mv '{{ working_dir }}/initramfs' - '{{ working_dir }}/overcloud-full.initrd' + '{{ working_dir }}/{{ overcloud_image }}.initrd' # NOTE(trown): This is a bit of a hack to get the undercloud vm # template to use the external kernel and initrd. We should