Skip to content

Version Upgrade for Container Deployment ​

When upgrading the HENGSHI version, please follow the steps below to perform the upgrade on the container.

  1. Obtain and import the offline image.

    sh
    wget 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
  2. No automatic backup is available; manually back up data before upgrading! Container Environment Backup

  3. 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
  4. Obtain the docker-compose deployment file for the upgrade version. Configuration files can be referenced in Preparation Before Deployment.

  5. 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
  6. 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
  7. Upgrade version >=4.0 considerations:

    1. 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.
    2. Upgrade Operation
    3. Maintain the current version:
      1. 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.
  8. Notes:

    1. 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.
    2. (4.x/5.x/6.x → 7.0+) Use an image with bundled JDBC drivers. Run step 6 up -d as 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):

shell
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 hengshi

If 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:

shell
docker compose run --rm --no-deps hengshi driverctl import --drivers-dir /opt/hsdata/driverctl/import
docker compose start hengshi

list / 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 ​

  1. 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
  1. Rollback Data
    Use Container Restore to restore the metadb operation process

User Manual for Hengshi Analysis Platform