Support role specific ContainerImagePrepare

This implements partial support for overriding the ContainerImaePrepare
parameter for individual roles, so that users can use different set
of images for each role.

example:
parameter_defaults:
  ContainerImagePrepare:
    - push_destination: true
      set:
        name_prefix: openstack-
        name_suffix: ''
        namespace: quay.io/repository/tripleowallabycentos9
        ...
  ComputeEl8ContainerImagePrepare:
    - push_destination: true
      set:
        name_prefix: openstack-
        name_suffix: ''
        namespace: quay.io/repository/tripleowallabycentos8
        ...

This change ensures that container image prepare process, which is
executed by external tasks, pulls container images according to these
layer definitions so that the required container images are downloaded
and pushed to the undercloud image-server during deployment.

Depends-on: https://review.opendev.org/c/openstack/tripleo-ansible/+/851689
Change-Id: I7c96d7d0f23fd999e76b417f456ac6a2764c4a3e
This commit is contained in:
Takashi Kajinami 2022-08-01 12:04:33 +09:00
parent 10e2926132
commit 3dd4107b13

View File

@ -79,6 +79,14 @@ parameters:
type: comma_delimited_list
{% for role in roles %}
{{ role.name }}ContainerImagePrepare:
description: Used to run "openstack tripleo container image prepare".
This is run after the registry is installed to populate
the registry with images. This is used for a specific role and
replaces the ContainerImagePrepare parameter.
type: json
default: {}
# Parameters generated for {{role.name}} Role
{{ role.name }}Services:
description: A list of service resources (configured in the Heat
@ -118,6 +126,7 @@ outputs:
ContainerImageRegistryCredentials: {get_param: ContainerImageRegistryCredentials}
AdditionalArchitectures: {get_param: AdditionalArchitectures}
{% for role in roles %}
{{ role.name }}ContainerImagePrepare: {get_param: {{role.name}}ContainerImagePrepare}
{{ role.name }}Services: {get_param: {{role.name}}Services}
{{ role.name }}Count: {get_param: {{role.name}}Count}
{% endfor %}