Offline Upgrade Container Registry Module¶
This page explains how to install or upgrade the container registry module after downloading it from the Download Center.
Info
The word kangaroo
appearing in the following commands or scripts is the internal development code name of the container registry module.
Load Images from the Installation Package¶
You can load the images in one of the following two ways. When a container registry exists in the environment, it is recommended to choose the chart-syncer to synchronize the images to the container registry, as this method is more efficient and convenient.
Synchronize Images to the Container Registry using chart-syncer¶
-
Create load-image.yaml
Note
All parameters in this YAML file are mandatory. You need a private container registry and modify the relevant configurations.
If the current environment has an installed chart repo, chart-syncer also supports exporting the chart as a tgz file.
load-image.yamlsource: intermediateBundlesPath: kangaroo-offline # (1) target: containerRegistry: 10.16.10.111 # (2) containerRepository: release.daocloud.io/kangaroo # (3) repo: kind: HARBOR # (4) url: http://10.16.10.111/chartrepo/release.daocloud.io # (5) auth: username: "admin" # (6) password: "Harbor12345" # (7) containers: auth: username: "admin" # (8) password: "Harbor12345" # (9)
- Go to the relative path where the charts-syncer command is running, instead of the relative path between this YAML file and the offline package.
- Modify it to your container registry URL.
- Modify it to your container registry.
- It can also be any other supported Helm Chart repository category.
- Modify it to the chart repo URL.
- Your container registry username.
- Your container registry password.
- Your container registry username.
- Your container registry password.
If the chart repo is not installed in the current environment, chart-syncer also supports exporting the chart as a tgz file and storing it in the specified path.
load-image.yamlsource: intermediateBundlesPath: kangaroo-offline # (1) target: containerRegistry: 10.16.10.111 # (2) containerRepository: release.daocloud.io/kangaroo # (3) repo: kind: LOCAL path: ./local-repo # (4) containers: auth: username: "admin" # (5) password: "Harbor12345" # (6)
- Provide the relative path to run the charts-syncer command, instead of the relative path between this YAML file and the offline package.
- Change it to your container registry URL.
- Change it to your container registry.
- Local path of the chart.
- Your container registry username.
- Your container registry password.
-
Run the command to synchronize images.
Directly load with Docker or containerd¶
Extract and load the image files.
-
Extract the tar compressed package.
After successful extraction, you will get 3 files:
- hints.yaml
- images.tar
- original-chart
-
Load the images from local to Docker or containerd.
Note
Each node needs to perform the image loading operation with Docker or containerd. After loading, the image needs to be tagged to keep the Registry, Repository consistent with the installation.
Upgrade¶
There are two ways to upgrade. You can choose the corresponding upgrade method based on the prerequisite steps:
-
Check if the global helm repository exists.
If the result is empty or shows the following prompt, proceed to the next step; otherwise, skip the next step.
-
Add the global helm repository.
-
Update the global helm repository.
- If the helm version is too low, it may fail. If it fails, try to run
helm update repo
.
- If the helm version is too low, it may fail. If it fails, try to run
-
Select the container registry version you want to install (it is recommended to install the latest version).
-
Backup the
--set
parameters.Before upgrading the container registry version, it is recommended to run the following command to backup the
--set
parameters of the old version. -
Check the version update records. If there are updates to CRDs, update the kangaroo CRDs.
-
Run
helm upgrade
.Before upgrading, it is recommended to replace the
global.imageRegistry
field in bak.yaml with the current container registry address.
-
Back up the
--set
parameters.Before upgrading the container registry version, it is recommended to run the following command to backup the
--set
parameters of the old version. -
Check the version update records. If there are updates to CRDs, update the kangaroo CRDs.
-
Run
helm upgrade
.Before upgrading, it is recommended to replace the
global.imageRegistry
field in bak.yaml with the current container registry address.