Upgrade: append additional images to the static images list
Images specified in additional_local_registry_images at install time will not be upgraded after an upgrade is completed. This commit allows common/load-images-information load additional images list from /usr/share/additional-system-images.yml by default. In a distributed cloud system, the Redfish Virtual Media Controller(RVMC) image is can support remote install on Redfish configured hosts. This commit includes the RMVC image in the static images list if the host is a DC controller, enables download/push/update this image with other static images. Tested by installing and upgrading an AIODX central cloud with an AIOSX subcloud DC system. Partial-Bug: 1908100 Change-Id: I1f927f876f4883a587098c61fbcaf408d65fdde4 Signed-off-by: Yuxing Jiang <yuxing.jiang@windriver.com>
This commit is contained in:
parent
0e02492990
commit
587c1ff207
@ -24,11 +24,33 @@
|
||||
- set_fact:
|
||||
kubernetes_images: "{{ kubernetes_images_output.stdout_lines }}"
|
||||
|
||||
- include_vars:
|
||||
- name: Read in system images list
|
||||
include_vars:
|
||||
dir: "vars/k8s-{{ kubernetes_version }}"
|
||||
files_matching: "system-images.yml"
|
||||
|
||||
- name: Get the list of platform images
|
||||
# Optional system images can be addded in {{ additional_system_images_conf_file }}
|
||||
# under {{ additional_system_images_conf_path }}.
|
||||
# Additional static images can be introduced in this file, e.g.
|
||||
# additional_static_images_list:
|
||||
# image1_name: <registry-url>/image1:v1.0
|
||||
# image2_name: <registry-url>/image2:v2.0
|
||||
# Additional static images required or a DC controller only can also be introduced in this file, e.g.
|
||||
# additional_system_controller_static_images_list:
|
||||
# image3_name: <registry-url>/image3:v3.0
|
||||
# image4_name: <registry-url>/image4:v4.0
|
||||
- name: Check if additional image config directory exists
|
||||
stat:
|
||||
path: "{{ additional_system_images_conf_path }}"
|
||||
register: additional_config_dir
|
||||
|
||||
- name: Read in additional system images list(s)
|
||||
include_vars:
|
||||
dir: "{{ additional_system_images_conf_path }}"
|
||||
files_matching: "{{ additional_system_images_conf_file }}"
|
||||
when: additional_config_dir.stat.exists and additional_config_dir.stat.isdir
|
||||
|
||||
- name: Categorize system images
|
||||
set_fact:
|
||||
networking_images:
|
||||
- "{{ calico_cni_img }}"
|
||||
@ -45,4 +67,27 @@
|
||||
- "{{ kubernetes_entrypoint_img }}"
|
||||
storage_images:
|
||||
- "{{ snapshot_controller_img }}"
|
||||
|
||||
- name: Append additional static images if provisioned
|
||||
set_fact:
|
||||
static_images: "{{ static_images }} + [ '{{item.value}}' ]"
|
||||
with_items: "{{ additional_static_images_list | default({})| dict2items }}"
|
||||
when: additional_static_images_list is defined
|
||||
|
||||
- block:
|
||||
- name: Append RVMC image for a DC system controller
|
||||
set_fact:
|
||||
static_images: "{{ static_images }} + {{ rvmc_img }}"
|
||||
|
||||
- name: Append additional static images for a DC system controller if provisioned
|
||||
set_fact:
|
||||
static_images: "{{ static_images }} + [ '{{item.value}}' ]"
|
||||
with_items: "{{ additional_system_controller_static_images_list | default({})| dict2items }}"
|
||||
when: additional_system_controller_static_images_list is defined
|
||||
|
||||
when: (distributed_cloud_role is defined and
|
||||
distributed_cloud_role == 'systemcontroller') or
|
||||
(check_dc_controller is defined and
|
||||
check_dc_controller.rc == 0)
|
||||
|
||||
when: kubernetes_version is defined
|
||||
|
@ -15,3 +15,4 @@ sriov_network_device_img: docker.io/starlingx/k8s-plugins-sriov-network-device:s
|
||||
# cluster/addons/volumesnapshots/volume-snapshot-controller/volume-snapshot-controller-deployment.yaml
|
||||
# in the kubernetes github repo
|
||||
snapshot_controller_img: quay.io/k8scsi/snapshot-controller:v2.0.0-rc2
|
||||
rvmc_img: docker.io/starlingx/rvmc:stx.5.0-v1.0.0
|
||||
|
@ -0,0 +1,8 @@
|
||||
---
|
||||
#
|
||||
# Copyright (c) 2020 Wind River Systems, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
additional_system_images_conf_path: /usr/share/additional-config
|
||||
additional_system_images_conf_file: additional-system-images.yml
|
Loading…
Reference in New Issue
Block a user