diff --git a/roles/build-images/README.md b/roles/build-images/README.md index 41ef8c7c3..4d3c4107b 100644 --- a/roles/build-images/README.md +++ b/roles/build-images/README.md @@ -50,6 +50,8 @@ Role Variables * `skip_build_images` -- skip building images if there present or cached (default: true), setting it to false will add '--no-skip' option to openstack image build command. +* `base_image_url` -- URL of base image +* `base_image_path` -- path to save base image on host Example Usage ------------- diff --git a/roles/build-images/templates/overcloud-image-build.sh.j2 b/roles/build-images/templates/overcloud-image-build.sh.j2 index 768f92789..f1cf3d351 100644 --- a/roles/build-images/templates/overcloud-image-build.sh.j2 +++ b/roles/build-images/templates/overcloud-image-build.sh.j2 @@ -25,7 +25,10 @@ export DIB_YUM_REPO_CONF="" {% for repo_path in overcloud_repo_paths %} export DIB_YUM_REPO_CONF="$DIB_YUM_REPO_CONF {{ repo_path }}" {% endfor %} - +{% if base_image_url is defined and base_image_path is defined %} +wget -nv {{ base_image_url }} -O {{ base_image_path }} +export DIB_LOCAL_IMAGE={{ base_image_path }} +{% endif %} {# note(trown): there was not support in tripleoclient for YAML config images in Newton #} {% if release == 'newton'-%} tripleo-build-images \