Offline Upgrade of Operations Management Module¶
This page provides instructions on how to install or upgrade the Operations Management module after downloading it from the Download Center.
Info
The term gmagpie
used in the following commands or scripts refers to the internal development codename for the Operations Management module.
Loading Image from the Installation Package¶
You can load the image using either of the following methods. It is recommended to choose the chart-syncer method when an image repository already exists in the environment, as it is more efficient and convenient.
Synchronizing Images to Image Repository using chart-syncer¶
-
Create load-image.yaml .
Note
All parameters in this YAML file are mandatory. You need a private image repository and modify the relevant configurations accordingly.
If you have an installed chart repo in the current environment, chart-syncer also supports exporting the chart as a tgz file.
load-image.yamlsource: intermediateBundlesPath: gmagpie-offline # Use the relative path to run the `charts-syncer` command, not the relative path target: containerRegistry: 10.16.10.111 # Modify it to your image repository URL. containerRepository: release.daocloud.io/gmagpie # Modify it to your image repository. repo: kind: HARBOR # It can also be any other supported Helm Chart repository category. url: http://10.16.10.111/chartrepo/release.daocloud.io # Modify it to the chart repo URL. auth: username: "admin" # Your image repository username. password: "Harbor12345" # Your image repository password. containers: auth: username: "admin" # Your image repository username. password: "Harbor12345" # Your image repository password.
If a 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: gmagpie-offline # (1) target: containerRegistry: 10.16.10.111 # (2) containerRepository: release.daocloud.io/gmagpie # (3) repo: kind: LOCAL path: ./local-repo # (4) containers: auth: username: "admin" # (5) password: "Harbor12345" # (6)
- Use the relative path to run the
charts-syncer
command, not the relative path between this YAML file and the offline package. - Modify it to your image repository URL.
- Modify it to your image repository.
- Local path of the chart.
- Your image repository username.
- Your image repository password.
- Use the relative path to run the
-
Run the command to synchronize images.
Loading directly with Docker or containerd¶
Unpack and load the image file.
-
Unpack the tar archive.
After a successful unpacking, you will obtain 3 files:
- hints.yaml
- images.tar
- original-chart
-
Load the image from the local source into Docker or containerd.
Note
Each node needs to perform the image loading operation with Docker or containerd. After loading is complete, it is necessary to tag the image to keep the Registry and Repository consistent with the installation.
Upgrade¶
There are two ways to upgrade. You can choose the corresponding upgrade method based on the preconditions:
Note
When upgrading from v0.1.x (or lower) to v0.2.0 (or higher), database connection parameters need to be modified.
Example of modifying database connection parameters:
USER-SUPPLIED VALUES:
global:
database:
host: 127.0.0.1
port: 3306
dbname: gmagpie
password: passowrd
user: gmagpie
Modified to:
USER-SUPPLIED VALUES:
global:
storage:
gmagpie:
- driver: mysql
accessType: readwrite
dsn: {global.database.apiserver.user}:{global.database.apiserver.password}@tcp({global.database.host}:{global.database.port})/{global.database.apiserver.dbname}?charset=utf8mb4&multiStatements=true&parseTime=true
-
Check if the Operations Management 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 Operations Management Helm repository.
-
Update the Operations Management Helm repository.
- If the Helm version is too low, it may result in failure. If this happens, please try executing helm update repo .
-
Choose the version of Operations Management that you would like to install (it is recommended to install the latest version).
-
Back up the
--set
parameters.Before upgrading the Operations Management version, it is recommended to run the following command to back up the
--set
parameters of the old version. -
Update Gmagpie CRD.
-
Run
helm upgrade
.Before upgrading, it is recommended to replace the global.imageRegistry field in the bak.yaml file with the address of the image repository you are currently using.
-
Back up the
--set
parameters.Before upgrading the Operations Management version, it is recommended to run the following command to back up the
--set
parameters of the old version. -
Update the Gmagpie CRD.
-
Run
helm upgrade
.It is recommended to replace the global.imageRegistry field in the bak.yaml file with the address of the image repository you are currently using before performing the upgrade.