Microservices Upgrade
Import Mirror
Importing mirrors is required for each microservice node.
- Internet Access Available
- Internet Access Unavailable
crictl pull nocoly/hap-community:5.8.3
- When downloading, there is no output on the command line, just wait for the command to execute.
# Download link for the offline mirror package of microservices. Upload it to the server after downloading.
https://pdpublic.nocoly.com/offline/hap-community-linux-amd64-5.8.3.tar.gz
# Unzip the mirror file
gunzip -d hap-community-linux-amd64-5.8.3.tar.gz
# Import the mirror
ctr -n k8s.io image import hap-community-linux-amd64-5.8.3.tar
Upgrade Microservices
-
Microservices are running in [Kubernetes + Istio] mode, and can be restarted with a rolling update, during which page access is almost not affected.
-
Prerequisite for rolling updates: the memory of each microservice node server needs to be about 40% available.
-
If there is insufficient memory available, it is necessary to use a non-rolling update method to upgrade.
-
Before upgrading microservices, go to Changelog to check whether there is a version marked with additional operations between the versions before and after the upgrade, and if there is, complete the related operations according to the guide documents.
-
Before upgrading, please check whether the upgrade service in the license key is expired or not, when it is expired, please don't upgrade the version whose release date of the main version is later than the expiration date of the upgrade service. If you still upgrade after the expiration of the upgrade service, there will be a prompt that the upgrade is restricted.
- Rolling Update
- Non-Rolling Update
Execute the update command on the control node, in the directory where the configuration file is located.
It defaults to the
/data/hap/script/kubernetes
directory in the microservices1 node.
bash update.sh update community 5.8.3
-
5.8.3 is the version you want to update. Import the mirror to each microservice node in advance.
-
After execution, wait about 3 to 5 minutes for the restart to complete.
After restarting, you can check the status of each pod with the command kubectl get pod
, which is normally 2/2
.
Execute the update command on the control node, in the directory where the configuration file is located.
It defaults to the
/data/hap/script/kubernetes
directory in the microservices1 node.
Stop microservices first.
bash stop.sh
Execute the update script when you can't see microservice pod with the command kubectl get pod
.
bash update.sh update community 5.8.3
-
5.8.3 is the version you want to update. Import the mirror to each microservice node in advance.
-
After execution, wait about 3 to 5 minutes for the restart to complete.
After restarting, you can check the status of each pod with the command kubectl get pod
, which is normally 2/2
.