Offline Upgrade¶
Components of DCE 5.0 are loosely coupled and can be installed/upgraded independently. This guide is intended for upgrading DaoCloud Microservice Engine (DME) after installing it with the offline mode.
Synch Image¶
After downloading the image to your local node, you need to sync the latest image version to your container registry via chart-syncer or a container runtime. chart-syncer is more recommended for its efficiency and convenience.
Sync with chart-syncer¶
-
Create
load-image.yaml
as the chart-syncer profileAll parameters in the
load-image.yaml
file are mandatory. You need a private container registry and modify configurations as described below. See Official Doc for a detailed explanation of the chart-syncer profile.If chart repo is already install, use the following configuration to synchronize the image directly.
source: intermediateBundlesPath: skoala-offline # Relative path to executing chart-syncer command, **not** the relative path between target: containerRegistry: 10.16.23.145 # Change to your container registry url containerRepository: release.daocloud.io/skoala # Change to your container registry repo: kind: HARBOR # Can be any of the supported Helm Chart registries url: http://10.16.23.145/chartrepo/release.daocloud.io # Change to chart repo url auth: username: "admin" # Your container registry username password: "Harbor12345" # Your container registry password containers: auth: username: "admin" # Your container registry username password: "Harbor12345" # Your image vault password
Chart-syncer also supports exporting a chart as a
tgz
file in a specified path if chart repo is not installed.source: intermediateBundlesPath: skoala-offline # (1) target: containerRegistry: 10.16.23.145 # (2) containerRepository: release.daocloud.io/skoala # (3) repo: kind: LOCAL path: ./local-repo # (4) containers: auth: username: "admin" # (5) password: "Harbor12345" # (6)
- Relative path to executing chart-syncer command, not the relative path between this YAML file and the offline package
- Change to your container registry url
- Change to your container registry
- chart local path
- Your container registry username
- Your image vault password
-
Run this command to sync the image.
Sync with Docker/containerd¶
-
Decompress the
tar
package.After the decompression, you will get 3 files:
- hints.yaml
- images.tar
- original-chart
-
Load the image from local to a Docker or containerd.
Note
- The image needs to be loaded via Docker or containerd to each node.
- After the loading is complete, you should tag the image to keep version consistency.
Start Upgrade¶
After the image is synced, you can start upgrading DME.
-
Check if the helm repository of DME exists.
skoala
is the internal code for DME.If nothing is returned or the following information is displayed, proceed to the next step. Otherwise, skip the next step.
-
Add DME's helm repository.
-
Update DME'S helm repository.
- If the helm version is outdated, it will fail. If it fails, try
helm update repo
command
- If the helm version is outdated, it will fail. If it fails, try
-
Select the version of DME you want to install (the latest version is recommended).
-
Backup
--set
parameters.Before upgrading DME, it is recommended to run the following command to back up the
--set
parameters of the previous version. -
Run
helm upgrade
.Before upgrading, it is recommended to override the
global.imageRegistry
field inbak.yaml
as the address of the container registry currently in use.
-
Backup
--set
parameters.Before upgrading DME, it is recommended to run the following command to back up the
--set
parameter of the old version. -
Run the
helm upgrade
command.Before upgrading, it is recommended that you override
global.imageRegistry
inbak.yaml
as the address of the container registry currently in use.