From 3c1b9c4d9a2dabb0ce91198b974518f20e1e20d1 Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Thu, 1 Dec 2022 12:02:43 +0000 Subject: [PATCH] Remove kolla_install_type variable Kolla removed support for binary images in the Zed release, as well as the install_type config option. It also changed the image tag format. Yoga & earlier: openstack.kolla/centos-source-base:yoga Zed & later: openstack.kolla/base:zed-centos-stream9 This change removes the kolla_install_type variable. It also adds a kolla_base_distro_version variable, which is passed to kolla and kolla-ansible. The following two variables are also removed, since all images are now of type source: * overcloud_container_image_regex_map_source * overcloud_container_image_regexes_source Change-Id: I0023765438c0c73394c3465828c4d98f766d9350 --- ansible/container-image-build.yml | 4 +- ansible/inventory/group_vars/all/kolla | 44 +++++++++---------- ansible/inventory/group_vars/all/swift | 2 +- ansible/kolla-build.yml | 1 + ansible/roles/kolla-ansible/defaults/main.yml | 6 +-- ansible/roles/kolla-ansible/tasks/config.yml | 8 ++++ .../kolla-ansible/templates/kolla/globals.yml | 19 +------- .../kolla-ansible/tests/test-defaults.yml | 4 +- .../roles/kolla-ansible/tests/test-extras.yml | 4 +- .../tests/test-globals-merge.yml | 2 +- .../kolla-ansible/tests/test-requirements.yml | 2 +- ansible/roles/kolla-build/defaults/main.yml | 10 ++--- .../templates/kolla/kolla-build.conf | 4 +- .../configuration/reference/kolla-ansible.rst | 15 +++---- doc/source/configuration/reference/kolla.rst | 17 ++++--- etc/kayobe/kolla.yml | 15 ++++--- etc/kayobe/overcloud-dib.yml | 2 +- .../kolla-install-type-e00a7bd8db2e6ab4.yaml | 5 +++ 18 files changed, 80 insertions(+), 84 deletions(-) create mode 100644 releasenotes/notes/kolla-install-type-e00a7bd8db2e6ab4.yaml diff --git a/ansible/container-image-build.yml b/ansible/container-image-build.yml index f3ddbeafd..a790201b1 100644 --- a/ansible/container-image-build.yml +++ b/ansible/container-image-build.yml @@ -20,8 +20,7 @@ - name: Display the regexes for container images that will be built debug: msg: > - Building container images of type - '{{ item.type | default(kolla_install_type) }}' matching + Building container images matching '{{ item.regexes }}'. Build logs will be appended to {{ kolla_build_log_path }}. with_items: "{{ container_image_sets }}" @@ -52,7 +51,6 @@ . {{ kolla_venv }}/bin/activate && kolla-build --config-dir {{ kolla_build_config_path }} - {% if item.type is defined %}--type {{ item.type }}{% endif %} {% if kolla_docker_registry is not none %}--registry {{ kolla_docker_registry }}{% endif %} {% if push_images | bool %}--push{% endif %} {% if nocache | bool %}--nocache{% endif %} diff --git a/ansible/inventory/group_vars/all/kolla b/ansible/inventory/group_vars/all/kolla index 7acc5e711..8ce83f463 100644 --- a/ansible/inventory/group_vars/all/kolla +++ b/ansible/inventory/group_vars/all/kolla @@ -53,12 +53,22 @@ kolla_node_custom_config_path: "{{ kolla_config_path }}/config" # Kolla configuration. # Kolla base container image distribution. Options are "centos", "debian", -# "ubuntu". Default is +# "rocky", "ubuntu". Default is # {{ 'centos' if os_distribution == 'rocky' else os_distribution }}. kolla_base_distro: "{{ 'centos' if os_distribution == 'rocky' else os_distribution }}" -# Kolla container image type: binary or source. -kolla_install_type: "source" +# Kolla base container image distribution version default map. +# Defines default versions for each distribution. +kolla_base_distro_version_default_map: { + "centos": "stream9", + "debian": "bullseye", + "rocky": "9", + "ubuntu": "jammy", +} + +# Kolla base container image distribution version. +# Default is kolla_base_distro_version_default_map[kolla_base_distro]. +kolla_base_distro_version: "{{ kolla_base_distro_version_default_map[kolla_base_distro] }}" # Docker namespace to use for Kolla images. kolla_docker_namespace: "openstack.kolla" @@ -85,8 +95,8 @@ kolla_openstack_release: "{{ openstack_release }}" # {{ kolla_openstack_release }}. kolla_tag: "{{ kolla_openstack_release }}" -# Dict mapping names of sources to their definitions for -# kolla_install_type=source. See kolla.common.config for details. +# Dict mapping names of sources to their definitions. +# See kolla.common.config for details. # Example: # kolla_sources: # ironic-base: @@ -115,8 +125,7 @@ seed_container_image_regexes: "{{ seed_container_image_regex_map | selectattr('e # List of container image sets for the seed. This is used when building # container images to determine which images to build. seed_container_image_sets: - - type: source - regexes: "{{ seed_container_image_regexes | join(' ') }}" + - regexes: "{{ seed_container_image_regexes | join(' ') }}" # List of regular expressions matching names of container images to build for # overcloud hosts. @@ -149,6 +158,8 @@ overcloud_container_image_regex_map: enabled: "{{ kolla_enable_etcd | bool }}" - regex: ^fluentd enabled: "{{ kolla_enable_fluentd | bool }}" + - regex: freezer + enabled: "{{ kolla_enable_freezer | bool }}" - regex: ^glance enabled: "{{ kolla_enable_glance | bool }}" - regex: ^gnocchi @@ -197,13 +208,14 @@ overcloud_container_image_regex_map: enabled: "{{ kolla_enable_memcached | bool }}" - regex: ^mistral enabled: "{{ kolla_enable_mistral | bool }}" + - regex: monasca + enabled: "{{ kolla_enable_monasca | bool }}" - regex: ^multipathd enabled: "{{ kolla_enable_multipathd | bool }}" - regex: ^murano enabled: "{{ kolla_enable_murano | bool }}" - regex: neutron-server enabled: "{{ kolla_enable_neutron | bool }}" - # Neutron SFC agent not currently supported on CentOS binary builds. - regex: "neutron-\\(dhcp\\|l3\\|metadata\\|linuxbridge\\|openvswitch\\)-agent" enabled: "{{ kolla_enable_neutron | bool }}" - regex: neutron-mlnx-agent @@ -263,26 +275,10 @@ overcloud_container_image_regex_map: # overcloud hosts. overcloud_container_image_regexes: "{{ overcloud_container_image_regex_map | selectattr('enabled') | map(attribute='regex') | list }}" -# List of regular expressions matching names of container images to build for -# overcloud hosts. These images only support source builds. -overcloud_container_image_regex_map_source: - - regex: freezer - enabled: "{{ kolla_enable_freezer | bool }}" - - regex: monasca - enabled: "{{ kolla_enable_monasca | bool }}" - -# List of regular expressions matching names of container images to build for -# overcloud hosts. These images onlt support source builds. -overcloud_container_image_regexes_source: "{{ overcloud_container_image_regex_map_source | selectattr('enabled') | map(attribute='regex') | list }}" - # List of container image sets for overcloud hosts. This is used when building # container images to determine which images to build. overcloud_container_image_sets: - # Default image type. - regexes: "{{ overcloud_container_image_regexes | join(' ') }}" - # Source-only images. - - regexes: "{{ overcloud_container_image_regexes_source | join(' ') }}" - type: source # Dict mapping Jinja2 block names in kolla's Docker images to their contents. kolla_build_blocks: {} diff --git a/ansible/inventory/group_vars/all/swift b/ansible/inventory/group_vars/all/swift index 00f7c5b6d..bd509434b 100644 --- a/ansible/inventory/group_vars/all/swift +++ b/ansible/inventory/group_vars/all/swift @@ -7,7 +7,7 @@ swift_ring_build_image_name: swift-object # Full name of the kolla container image used to build rings. -swift_ring_build_image: "{{ kolla_docker_registry ~ '/' if kolla_docker_registry else '' }}{{ kolla_docker_namespace }}/{{ kolla_base_distro }}-{{ kolla_install_type }}-{{ swift_ring_build_image_name }}:{{ kolla_openstack_release }}" +swift_ring_build_image: "{{ kolla_docker_registry ~ '/' if kolla_docker_registry else '' }}{{ kolla_docker_namespace }}/{{ swift_ring_build_image_name }}:{{ openstack_release }}-{{ kolla_base_distro }}-{{ kolla_base_distro_version }}" # Ansible host pattern matching hosts on which Swift object storage services # are deployed. The default is to use hosts in the 'storage' group. diff --git a/ansible/kolla-build.yml b/ansible/kolla-build.yml index a02a533b1..388709eaa 100644 --- a/ansible/kolla-build.yml +++ b/ansible/kolla-build.yml @@ -10,3 +10,4 @@ kolla_build_config_paths_extra: - "{{ kayobe_config_path }}" - "{{ kayobe_env_config_path }}" + kolla_base_tag: "{{ kolla_base_distro_version }}" diff --git a/ansible/roles/kolla-ansible/defaults/main.yml b/ansible/roles/kolla-ansible/defaults/main.yml index 05b3ecf21..c8c51ddb3 100644 --- a/ansible/roles/kolla-ansible/defaults/main.yml +++ b/ansible/roles/kolla-ansible/defaults/main.yml @@ -100,11 +100,11 @@ kolla_overcloud_inventory_kolla_top_level_groups: [] ############################################################################### # Kolla-ansible global configuration options. -# Valid options are [ centos, fedora, oraclelinux, ubuntu ] +# Valid options are [ centos, debian, rocky, ubuntu ] kolla_base_distro: -# Valid options are [ binary, source ] -kolla_install_type: +# Kolla base container image distribution version. +kolla_base_distro_version: # Docker namespace to use for Kolla images. kolla_docker_namespace: diff --git a/ansible/roles/kolla-ansible/tasks/config.yml b/ansible/roles/kolla-ansible/tasks/config.yml index 276700f01..8f4ad0a23 100644 --- a/ansible/roles/kolla-ansible/tasks/config.yml +++ b/ansible/roles/kolla-ansible/tasks/config.yml @@ -1,4 +1,12 @@ --- +# TODO(mgoddard): Remove this task in the Antelope release. +- name: Fail if kolla_install_type is defined + fail: + msg: > + Support for binary images was removed in the Zed release. + kolla_install_type should no longer be set. + when: kolla_install_type is defined + # NOTE: We're not looping over the two inventory files to avoid having the file # content displayed in the ansible-playbook output. diff --git a/ansible/roles/kolla-ansible/templates/kolla/globals.yml b/ansible/roles/kolla-ansible/templates/kolla/globals.yml index 3a2f974a8..6574f4e21 100644 --- a/ansible/roles/kolla-ansible/templates/kolla/globals.yml +++ b/ansible/roles/kolla-ansible/templates/kolla/globals.yml @@ -11,11 +11,10 @@ # Valid options are [ COPY_ONCE, COPY_ALWAYS ] config_strategy: "COPY_ALWAYS" -# Valid options are ['centos', 'debian', 'oraclelinux', 'rhel', 'ubuntu'] +# Valid options are ['centos', 'debian', 'rocky', 'ubuntu'] kolla_base_distro: "{{ kolla_base_distro }}" -# Valid options are [ binary, source ] -kolla_install_type: "{{ kolla_install_type }}" +kolla_base_distro_version: "{{ kolla_base_distro_version }}" # Valid option is Docker repository tag openstack_release: "{{ kolla_openstack_release }}" @@ -521,20 +520,6 @@ ironic_inspector_kernel_cmdline_extras: # telemetry data. #telegraf_enable_docker_input: "no" -##################################### -# Bifrost - Bare Metal Provisioning -##################################### - -# The Bifrost deployment image only supports a source installation. -bifrost_install_type: source - -################################# -# Monasca - Monitoring & Alerting -################################# - -# Monasca doesn't support binary type container builds -monasca_install_type: source - ############################################ # Grafana - Data visualisation & Monitoring ############################################ diff --git a/ansible/roles/kolla-ansible/tests/test-defaults.yml b/ansible/roles/kolla-ansible/tests/test-defaults.yml index 9c948829c..fd9142280 100644 --- a/ansible/roles/kolla-ansible/tests/test-defaults.yml +++ b/ansible/roles/kolla-ansible/tests/test-defaults.yml @@ -26,7 +26,7 @@ kolla_ansible_passwords_path: "{{ temp_path }}/passwords.yml" # Required config. kolla_base_distro: "fake-distro" - kolla_install_type: "fake-install-type" + kolla_base_distro_version: "1.23" kolla_docker_namespace: "fake-namespace" kolla_openstack_release: "fake-release" kolla_internal_vip_address: "10.0.0.1" @@ -67,7 +67,7 @@ expected_variables: config_strategy: "COPY_ALWAYS" kolla_base_distro: "fake-distro" - kolla_install_type: "fake-install-type" + kolla_base_distro_version: "1.23" openstack_release: "fake-release" kolla_internal_vip_address: "10.0.0.1" kolla_internal_fqdn: "fake.internal.fqdn" diff --git a/ansible/roles/kolla-ansible/tests/test-extras.yml b/ansible/roles/kolla-ansible/tests/test-extras.yml index cc55011b0..dd63639fd 100644 --- a/ansible/roles/kolla-ansible/tests/test-extras.yml +++ b/ansible/roles/kolla-ansible/tests/test-extras.yml @@ -86,7 +86,7 @@ kolla_ansible_user: "fake-user" kolla_ansible_group: "fake-group" kolla_base_distro: "fake-distro" - kolla_install_type: "fake-install-type" + kolla_base_distro_version: "1.23" kolla_docker_namespace: "fake-namespace" kolla_docker_registry: "fake-registry" kolla_docker_registry_username: "fake-username" @@ -229,7 +229,7 @@ kolla_user: "fake-user" kolla_group: "fake-group" kolla_base_distro: "fake-distro" - kolla_install_type: "fake-install-type" + kolla_base_distro_version: "1.23" openstack_release: "fake-release" kolla_internal_vip_address: "10.0.0.1" kolla_internal_fqdn: "fake.internal.fqdn" diff --git a/ansible/roles/kolla-ansible/tests/test-globals-merge.yml b/ansible/roles/kolla-ansible/tests/test-globals-merge.yml index 5110836df..7613815cb 100644 --- a/ansible/roles/kolla-ansible/tests/test-globals-merge.yml +++ b/ansible/roles/kolla-ansible/tests/test-globals-merge.yml @@ -58,7 +58,7 @@ kolla_ansible_passwords_path: "{{ temp_path }}/passwords.yml" # Required config. kolla_base_distro: "fake-distro" - kolla_install_type: "fake-install-type" + kolla_base_distro_version: "1.23" kolla_docker_namespace: "fake-namespace" kolla_openstack_release: "fake-release" kolla_internal_vip_address: "10.0.0.1" diff --git a/ansible/roles/kolla-ansible/tests/test-requirements.yml b/ansible/roles/kolla-ansible/tests/test-requirements.yml index 67d928f18..874a2ff9e 100644 --- a/ansible/roles/kolla-ansible/tests/test-requirements.yml +++ b/ansible/roles/kolla-ansible/tests/test-requirements.yml @@ -25,7 +25,7 @@ kolla_ansible_passwords_path: "{{ temp_path }}/passwords.yml" # Required config. kolla_base_distro: "fake-distro" - kolla_install_type: "fake-install-type" + kolla_base_distro_version: "1.23" kolla_docker_namespace: "fake-namespace" kolla_openstack_release: "fake-release" kolla_internal_vip_address: "10.0.0.1" diff --git a/ansible/roles/kolla-build/defaults/main.yml b/ansible/roles/kolla-build/defaults/main.yml index aecb0bfec..ef6d931c4 100644 --- a/ansible/roles/kolla-build/defaults/main.yml +++ b/ansible/roles/kolla-build/defaults/main.yml @@ -12,11 +12,11 @@ kolla_build_config_paths_extra: [] # Paths to extra kolla configuration files. kolla_build_config_paths: "{{ kolla_build_config_paths_default + kolla_build_config_paths_extra }}" -# Valid options are [ centos, fedora, oraclelinux, ubuntu ] +# Valid options are [ centos, debian, rocky, ubuntu ] kolla_base_distro: -# Valid options are [ binary, source ] -kolla_install_type: +# Kolla base container image tag. +kolla_base_tag: # Docker namespace to use for Kolla images. kolla_docker_namespace: @@ -24,8 +24,8 @@ kolla_docker_namespace: # Valid option is Docker repository tag kolla_tag: -# Dict mapping names of sources to their definitions for -# kolla_install_type=source. See kolla.common.config for details. +# Dict mapping names of sources to their definitions. +# See kolla.common.config for details. # Example: # kolla_sources: # ironic-base: diff --git a/ansible/roles/kolla-build/templates/kolla/kolla-build.conf b/ansible/roles/kolla-build/templates/kolla/kolla-build.conf index 78f5285d0..700269ec8 100644 --- a/ansible/roles/kolla-build/templates/kolla/kolla-build.conf +++ b/ansible/roles/kolla-build/templates/kolla/kolla-build.conf @@ -3,8 +3,8 @@ # Base container image distribution. base={{ kolla_base_distro }} -# Method of OpenStack install. Valid options are [ binary, source ] -install_type={{ kolla_install_type }} +# Base container image tag. +base_tag={{ kolla_base_tag }} # Docker namespace to use for Kolla images. namespace={{ kolla_docker_namespace }} diff --git a/doc/source/configuration/reference/kolla-ansible.rst b/doc/source/configuration/reference/kolla-ansible.rst index f4ab06eed..dc926c48f 100644 --- a/doc/source/configuration/reference/kolla-ansible.rst +++ b/doc/source/configuration/reference/kolla-ansible.rst @@ -114,9 +114,9 @@ accessed. ``kolla_base_distro`` Kolla base container image distribution. Default is ``centos``. -``kolla_install_type`` - Kolla container image type: ``binary`` or ``source``. Default is - ``source``. +``kolla_base_distro_version`` + Kolla base container image distribution version. Default is dependent on + ``kolla_base_distro``. ``kolla_docker_registry`` URL of docker registry to use for Kolla images. Default is not set, in which case Dockerhub will be used. @@ -138,24 +138,23 @@ accessed. (e.g. ``rocky``) on stable branches and tagged releases, or ``master`` on the Kayobe ``master`` branch. -For example, to deploy Kolla ``centos`` ``binary`` images with a namespace of +For example, to deploy Kolla ``centos`` images with a namespace of ``example``, and a private Docker registry at ``registry.example.com:4000``, -tagged with ``7.0.0.1``: +and the ``zed`` release. .. code-block:: yaml :caption: ``$KAYOBE_CONFIG_PATH/kolla.yml`` kolla_base_distro: centos - kolla_install_type: binary kolla_docker_namespace: example kolla_docker_registry: registry.example.com:4000 - kolla_openstack_release: 7.0.0.1 + kolla_openstack_release: zed The deployed ``ironic-api`` image would be referenced as follows: .. code-block:: console - registry.example.com:4000/example/centos-binary-ironic-api:7.0.0.1 + registry.example.com:4000/example/ironic-api:zed-centos-stream9 Ansible ------- diff --git a/doc/source/configuration/reference/kolla.rst b/doc/source/configuration/reference/kolla.rst index a4b4e4f4c..f50daafc0 100644 --- a/doc/source/configuration/reference/kolla.rst +++ b/doc/source/configuration/reference/kolla.rst @@ -74,10 +74,10 @@ affect :ref:`Kolla Ansible configuration `. ``kolla_base_distro`` Kolla base container image distribution. Options are ``centos``, - ``debian``, or ``ubuntu``. Default is ``{{ os_distribution }}``. -``kolla_install_type`` - Kolla container image type: ``binary`` or ``source``. Default is - ``source``. + ``debian``, ``rocky``, or ``ubuntu``. Default is ``{{ os_distribution }}``. +``kolla_base_distro_version`` + Kolla base container image distribution version. Default is dependent on + ``kolla_base_distro``. ``kolla_docker_namespace`` Docker namespace to use for Kolla images. Default is ``kolla``. ``kolla_docker_registry`` @@ -97,25 +97,24 @@ affect :ref:`Kolla Ansible configuration `. Kolla container image tag. This is the tag that will be applied to built container images. Default is ``kolla_openstack_release``. -For example, to build the Kolla ``centos`` ``binary`` images with a namespace +For example, to build the Kolla ``centos`` images with a namespace of ``example``, and a private Docker registry at ``registry.example.com:4000``, -tagged with ``7.0.0.1``: +using the ``zed`` release: .. code-block:: yaml :caption: ``kolla.yml`` kolla_base_distro: centos - kolla_install_type: binary kolla_docker_namespace: example kolla_docker_registry: registry.example.com:4000 - kolla_openstack_release: 7.0.0.1 + kolla_openstack_release: zed The ``ironic-api`` image built with this configuration would be referenced as follows: .. code-block:: console - registry.example.com:4000/example/centos-binary-ironic-api:7.0.0.1 + registry.example.com:4000/example/ironic-api:zed-centos-stream9 Further customisation of the Kolla configuration file can be performed by writing a file at ``${KAYOBE_CONFIG_PATH/kolla/kolla-build.conf``. For example, diff --git a/etc/kayobe/kolla.yml b/etc/kayobe/kolla.yml index 816397e3f..a1e54ad7c 100644 --- a/etc/kayobe/kolla.yml +++ b/etc/kayobe/kolla.yml @@ -67,12 +67,17 @@ # Kolla configuration. # Kolla base container image distribution. Options are "centos", "debian", -# "ubuntu". Default is +# "rocky", "ubuntu". Default is # {{ 'centos' if os_distribution == 'rocky' else os_distribution }}. #kolla_base_distro: -# Kolla container image type: binary or source. Default is 'source'. -#kolla_install_type: +# Kolla base container image distribution version default map. +# Defines default versions for each distribution. +#kolla_base_distro_version_default_map: + +# Kolla base container image distribution version. +# Default is kolla_base_distro_version_default_map[kolla_base_distro]. +#kolla_base_distro_version: # URL of docker registry to use for Kolla images. Default is not set, in which # case Dockerhub will be used. @@ -102,8 +107,8 @@ # {{ kolla_openstack_release }}. #kolla_tag: -# Dict mapping names of sources to their definitions for -# kolla_install_type=source. See kolla.common.config for details. +# Dict mapping names of sources to their definitions. +# See kolla.common.config for details. # Example: # kolla_sources: # ironic-base: diff --git a/etc/kayobe/overcloud-dib.yml b/etc/kayobe/overcloud-dib.yml index 3d95fa65f..0efa25f40 100644 --- a/etc/kayobe/overcloud-dib.yml +++ b/etc/kayobe/overcloud-dib.yml @@ -7,7 +7,7 @@ # Whether to build host disk images with DIB directly instead of through # Bifrost. Setting it to true disables Bifrost image build and allows images to # be built with the `kayobe overcloud host image build` command. Default value -# is {{ os_distribution == 'rocky' }}. This will change in a future release. +# is true. #overcloud_dib_build_host_images: # List of additional build host packages to install. Default is an empty list. diff --git a/releasenotes/notes/kolla-install-type-e00a7bd8db2e6ab4.yaml b/releasenotes/notes/kolla-install-type-e00a7bd8db2e6ab4.yaml new file mode 100644 index 000000000..027863ea3 --- /dev/null +++ b/releasenotes/notes/kolla-install-type-e00a7bd8db2e6ab4.yaml @@ -0,0 +1,5 @@ +--- +upgrade: + - | + Removes the ``kolla_install_type`` variable. This is due to removal of + support for ``binary`` images from the Kolla project.