Don't hard-code overcloud-full
This will soon be overcloud-hardened-uefi-full on master, and the download will be of a qcow2 file, not a tar file. This change moves whole_disk_images default setting to extras-common, and also adds default variable overcloud_image, which is used wherever 'overcloud-full' is currently hard-coded. Change-Id: Iba7833c16eae3d3129b7bab48434c66ec2e1efcf Blueprint: whole-disk-default
This commit is contained in:
@@ -31,7 +31,7 @@
|
|||||||
dib_yum_repo_conf: "{{ overcloud_repo_paths }}"
|
dib_yum_repo_conf: "{{ overcloud_repo_paths }}"
|
||||||
workspace: "{{ images_working_dir }}"
|
workspace: "{{ images_working_dir }}"
|
||||||
build_all_images: true
|
build_all_images: true
|
||||||
tripleo_image_type: overcloud-full
|
tripleo_image_type: "{{ overcloud_image }}"
|
||||||
tripleo_common_path: "/usr/share/tripleo-common"
|
tripleo_common_path: "/usr/share/tripleo-common"
|
||||||
include_role:
|
include_role:
|
||||||
name: oooci-build-images
|
name: oooci-build-images
|
||||||
@@ -45,7 +45,7 @@
|
|||||||
include_role:
|
include_role:
|
||||||
name: install-built-repo
|
name: install-built-repo
|
||||||
vars:
|
vars:
|
||||||
ib_repo_image_path: "{{ images_working_dir }}/overcloud-full.qcow2"
|
ib_repo_image_path: "{{ images_working_dir }}/{{ overcloud_image }}.qcow2"
|
||||||
|
|
||||||
- name: Enject repo in IPA image
|
- name: Enject repo in IPA image
|
||||||
include_role:
|
include_role:
|
||||||
@@ -100,7 +100,7 @@
|
|||||||
virt-cat -a {{ build_isolation_image.name }}.qcow2 \
|
virt-cat -a {{ build_isolation_image.name }}.qcow2 \
|
||||||
/ironic-python-agent.log > ironic-python-agent.log 2>&1 || true
|
/ironic-python-agent.log > ironic-python-agent.log 2>&1 || true
|
||||||
virt-cat -a {{ build_isolation_image.name }}.qcow2 \
|
virt-cat -a {{ build_isolation_image.name }}.qcow2 \
|
||||||
/overcloud-full.log > overcloud-full.log 2>&1 || true
|
/{{ overcloud_image }}.log > {{ overcloud_image }}.log 2>&1 || true
|
||||||
environment:
|
environment:
|
||||||
LIBGUESTFS_BACKEND: direct
|
LIBGUESTFS_BACKEND: direct
|
||||||
LIBVIRT_DEFAULT_URI: "{{ libvirt_uri }}"
|
LIBVIRT_DEFAULT_URI: "{{ libvirt_uri }}"
|
||||||
@@ -122,7 +122,7 @@
|
|||||||
include: modify-image.yml
|
include: modify-image.yml
|
||||||
vars:
|
vars:
|
||||||
modify_images_working_dir: "{{ images_working_dir }}"
|
modify_images_working_dir: "{{ images_working_dir }}"
|
||||||
image_to_modify: "{{ images_working_dir }}/overcloud-full.qcow2"
|
image_to_modify: "{{ images_working_dir }}/{{ overcloud_image }}.qcow2"
|
||||||
modify_script: "{{ images_working_dir }}/repo_setup.sh"
|
modify_script: "{{ images_working_dir }}/repo_setup.sh"
|
||||||
|
|
||||||
- name: convert the overcloud image to an undercloud image
|
- name: convert the overcloud image to an undercloud image
|
||||||
@@ -156,6 +156,6 @@
|
|||||||
|
|
||||||
- name: Clean up the images working dir
|
- name: Clean up the images working dir
|
||||||
shell: >-
|
shell: >-
|
||||||
rm -rf {{ images_working_dir }}/overcloud-full.d {{ images_working_dir }}/ironic-python-agent.d/
|
rm -rf {{ images_working_dir }}/{{ overcloud_image }}.d {{ images_working_dir }}/ironic-python-agent.d/
|
||||||
sudo chown $USER: {{ images_working_dir }}/overcloud-full.* {{ images_working_dir }}/ironic-python-agent.*
|
sudo chown $USER: {{ images_working_dir }}/{{ overcloud_image }}.* {{ images_working_dir }}/ironic-python-agent.*
|
||||||
when: cleanup_images_working_dir|bool
|
when: cleanup_images_working_dir|bool
|
||||||
|
@@ -50,3 +50,5 @@ Role Variables
|
|||||||
in undercloud.conf for the undercloud and install ara in the mistral executor container before deploying the overcloud.
|
in undercloud.conf for the undercloud and install ara in the mistral executor container before deploying the overcloud.
|
||||||
- `network_provision`: <false> Deploy composable network with "openstack
|
- `network_provision`: <false> Deploy composable network with "openstack
|
||||||
overcloud network provision" and deployed-networks, instead of with heat
|
overcloud network provision" and deployed-networks, instead of with heat
|
||||||
|
- `whole_disk_images`: <false> -- shows if we want to use partition or whole disk images (this will be available starting on Ocata)
|
||||||
|
- `overcloud_image`: <'overcloud-full'> Name of overcloud image to build/download/deploy without any file extension
|
||||||
|
@@ -167,3 +167,5 @@ undercloud_enable_swift: >-
|
|||||||
false
|
false
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
undercloud_enable_heat: "{{ not ephemeral_heat|default(false) }}"
|
undercloud_enable_heat: "{{ not ephemeral_heat|default(false) }}"
|
||||||
|
whole_disk_images: false
|
||||||
|
overcloud_image: overcloud-full
|
||||||
|
@@ -105,7 +105,7 @@ Example Usage
|
|||||||
- name: Install packages in the image
|
- name: Install packages in the image
|
||||||
hosts: virthost
|
hosts: virthost
|
||||||
vars:
|
vars:
|
||||||
image_to_modify: "{{ working_dir }}/overcloud-full.qcow2"
|
image_to_modify: "{{ working_dir }}/{{ overcloud_image }}.qcow2"
|
||||||
modify_image_install_packages:
|
modify_image_install_packages:
|
||||||
- 'package_to_be_installed_1'
|
- 'package_to_be_installed_1'
|
||||||
- 'package_to_be_installed_2'
|
- 'package_to_be_installed_2'
|
||||||
@@ -116,7 +116,7 @@ Example Usage
|
|||||||
- name: Upload an RPM file and install it in the image
|
- name: Upload an RPM file and install it in the image
|
||||||
hosts: virthost
|
hosts: virthost
|
||||||
vars:
|
vars:
|
||||||
image_to_modify: "{{ working_dir }}/overcloud-full.qcow2"
|
image_to_modify: "{{ working_dir }}/{{ overcloud_image }}.qcow2"
|
||||||
modify_image_upload_files:
|
modify_image_upload_files:
|
||||||
- src: "/tmp/rpm_to_be_uploaded.rpm"
|
- src: "/tmp/rpm_to_be_uploaded.rpm"
|
||||||
dest: /root/rpm_to_be_installed.rpm
|
dest: /root/rpm_to_be_installed.rpm
|
||||||
|
@@ -32,7 +32,6 @@ Role Variables
|
|||||||
Please note that in order to match root device hints with the associated nodes on `instackenv.json`,
|
Please note that in order to match root device hints with the associated nodes on `instackenv.json`,
|
||||||
the node `pm_address` will be used as a key.
|
the node `pm_address` will be used as a key.
|
||||||
At the moment only equal operator is supported, is not possible to use other operators or logical combinations.
|
At the moment only equal operator is supported, is not possible to use other operators or logical combinations.
|
||||||
- whole_disk_images: false -- shows if we want to use partition or whole disk images (this will be available starting on Ocata)
|
|
||||||
- step_introspect_with_retry: <false> -- a more robust version of the step_introspect option
|
- step_introspect_with_retry: <false> -- a more robust version of the step_introspect option
|
||||||
|
|
||||||
Dependencies
|
Dependencies
|
||||||
|
@@ -39,7 +39,5 @@ step_root_device_size: false
|
|||||||
disk_root_device_size: 1843
|
disk_root_device_size: 1843
|
||||||
step_root_device_hints: false
|
step_root_device_hints: false
|
||||||
root_device_hints: []
|
root_device_hints: []
|
||||||
whole_disk_images: false
|
|
||||||
|
|
||||||
download_overcloud_image: false
|
download_overcloud_image: false
|
||||||
overcloud_full_tar_name: overcloud-full.tar
|
|
||||||
|
@@ -7,10 +7,13 @@ set -eux
|
|||||||
## * Download specific Overcloud images
|
## * Download specific Overcloud images
|
||||||
## ::
|
## ::
|
||||||
|
|
||||||
if [ -f overcloud-full.qcow2 ]; then
|
if [ -f {{ overcloud_image }}.qcow2 ]; then
|
||||||
sudo rm -rf overcloud-full*
|
sudo rm -rf {{ overcloud_image }}.*
|
||||||
fi
|
fi
|
||||||
curl -L -O "{{ overcloud_image_url }}"
|
curl -L -O "{{ overcloud_image_url }}"
|
||||||
tar xvfp {{ overcloud_full_tar_name }}
|
|
||||||
|
{% if not whole_disk_images|bool %}
|
||||||
|
tar xvfp {{ overcloud_image }}.tar
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
### --stop_docs
|
### --stop_docs
|
||||||
|
Reference in New Issue
Block a user