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.tarNo 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 downObtain 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}/" .envStart 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 -dUpgrade 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.
- (4.x/5.x/6.x → 7.0+) Use an image with bundled JDBC drivers. Run step 6
up -das usual (MinIO before hengshi). See 7.0+ JDBC Drivers.
7.0+ JDBC Drivers
WARNING
4.x/5.x/6.x → 7.0+: use an image with bundled JDBC drivers. Background: Upgrade notices.
Happy path: docker compose up -d after the image switch. Do not remove HENGSHI_JDBC_CONFIG from .env, and do not drop existing custom JDBC volumes on the hengshi service, until custom data sources work.
If Flyway fails (compose stop hengshi, keep MinIO running):
docker compose run --rm --no-deps hengshi driverctl migrate --drivers-dir /opt/hengshi/lib/default-datasource-driver
docker compose run --rm --no-deps hengshi driverctl list
docker compose start hengshiIf factory drivers are already in object storage and only custom drivers are missing, use the day-to-day import below; do not overwrite with migrate.
Day-to-day import / delete: docker compose stop hengshi, place drivers in host hsdata/driverctl/import/, then:
docker compose run --rm --no-deps hengshi driverctl import --drivers-dir /opt/hsdata/driverctl/import
docker compose start hengshilist / show can run while MinIO is up. The runtime cache defaults to /opt/hsdata/jdbc-driver-cache.
Day-to-day commands: JDBC Driver Management.
Rollback
- Rollback Procedure
Update the image used by docker-compose to the old version image
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