Version Upgrade for Container Deployment
When upgrading the HENGSHI version, please follow the steps below to perform the upgrade on the container.
Obtain and import the offline image.
shwget https://download.hengshi.com/releases/hengshi-sense-xxx.tar.gz docker load -i hengshi-sense-xxx.tar.gz # If the container runtime uses containerd, you need to use docker to convert the format to tar before importing ctr -n k8s.io images import hengshi-sense-xxx.tar
No automatic backup is available; manually back up data before upgrading! Container Environment Backup
Stop the service.
shell# Navigate to the current deployment directory to stop the service # For example, if deployed in the /data directory, the full path is usually /data/docker-compose-x.x # Please use the actual path; do not directly copy and paste the commands. cd docker-compose-x.x docker-compose down
Obtain the docker-compose deployment file for the upgrade version. Configuration files can be referenced in Preparation Before Deployment.
Update the HENGSHI image tag.
shell# For example, if deployed in the /data directory, the full path is usually /data/docker-compose-x.x # Please use the actual path; do not directly copy and paste the commands. cd docker-compose-x.x NEW_TAG=hengshi-sense-xxx # Set the variable to the new tag sed -i -e "s/^HS_IMAGE_TAG=.*$/HS_IMAGE_TAG=${NEW_TAG}/" .env
Start the service to complete the upgrade.
shell# For example, if deployed in the /data directory, the full path is usually /data/docker-compose-x.x # Please use the actual path; do not directly copy and paste the commands. cd docker-compose-x.x docker-compose up -d
Upgrade version >=4.0 considerations:
- For service images >= version 4.0, Metadb's default version is 13.5. You can decide whether to perform an upgrade operation based on your needs.
- Upgrade Operation
- Maintain the current version:
- Edit the docker-compose.yaml file and modify the parameter under metadb>image configuration ${HS_IMAGE_TAG:-need_hs_image_version} to <4.0 version image information.
Notes:
- In version 5.1.x, Flink has been removed and does not need to be run. After upgrading, you may consider stopping and cleaning up the Flink container.
Rollback
- Rollback Procedure
Update the image used by docker-compose to the old version image
shell
docker-compose down
sed -i -e "s/^HS_IMAGE_TAG=.*$/HS_IMAGE_TAG=${OLD_TAG}/" .env
- Rollback Data
Use Container Restore to restore the metadb operation process