Skip to content

Version Upgrade for Container Deployment

When upgrading the HENGSHI version, 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. In the container environment, data backup is not performed by default during the upgrade process. You can perform data backup as needed Container Environment Backup and Restore.

  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 and 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. Refer to the configuration file 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 and 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 and do not directly copy and paste the commands.
    cd docker-compose-x.x
    docker-compose up -d
  7. Upgrade Version >=4.0 Notes

    1. Starting from service image version >= 4.0, Metadb's default version is 13.5. You can decide whether to perform an upgrade as needed.
    2. Upgrade Operations
    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 the image information of a version <4.0.
  8. Notes:

    1. In version 5.1.x, Flink has been removed and does not need to be run. After the upgrade, you may consider stopping and cleaning up the Flink container.

Version Upgrade for Helm Deployment

The upgrade process is similar to container deployment. It is also necessary to pay attention to Metadb Version Upgrade and Data Backup. The default version >=4.0 is 13.5, and you can decide whether to perform the upgrade based on your needs.

For non-major version upgrades, it is usually sufficient to back up the data and then specify the version number using --version for the upgrade.

Example Config Reference

shell
helm upgrade -f example-config.yaml HENGSHI-SENSE hengshi-charts/hengshi-sense --version [chart_version] -n [namespace] #

User Manual for Hengshi Analysis Platform