Distributed - Upgrade to V4.0 ~ V5.3

Notes:

  • Please do not upgrade across multiple major versions. When upgrading major versions, please make snapshot backups so that services can be quickly restored in case of abnormalities.

  • All the following Linux commands must be executed in the same working path, which is assumed to be /opt/cloud_cx in this example.

  • Should perform all Linux commands by the root user, please su root First.

Before upgrading, please back up your system service first. CloudCX System Data Backup Guide

In the distributed deployment model, the application server and database server are deployed on the different machines. And we need to update both the middleware service and the application service.

1. Stop CloudCX Application Services & Midware Services

Perform the following commands as root to stop & rm the current CX Docker instance:

cd /opt/cloud_cx && /bin/sh cloud_cx_ctl.sh stop cd /opt/cloud_cx && /bin/sh cloud_cx_ctl.sh rm

2. Upgrade Midware service

List and Delete the docker images

Perform the following command to list the Midware Docker images:

docker images

Use the first 4 digits of the IMAGE ID to delete all of the listed Docker images:

docker image rm 52d2

Delete the old Scripts

rm cloud_cx_ctl.sh rm install_docker_cx.sh

Download new installation scripts

curl https://raw.githubusercontent.com/cloud-cx/cloudfon-cx-install/main/v4.0.0/cloud_cx_ctl.sh -o cloud_cx_ctl.sh
curl https://raw.githubusercontent.com/cloud-cx/cloudfon-cx-install/main/v4.0.0/install_docker_cx.sh -o install_docker_cx.sh

Install Midware Services

/bin/sh install_docker_cx.sh
sh cloud_cx_ctl.sh run -t mid

3. Upgrade Application service

List of the CX Docker Images

Perform the following command to list the CX Docker images:

docker images

You will get the result shown in the below screenshot.

图片-20240205-115808.png

Delete the CX Docker Images

Use the first 4 digits of the IMAGE ID to delete all of the listed Docker image:

docker image rm 52d2

Delete the CX Scripts

rm cloud_cx_ctl.sh rm install_docker_cx.sh

Download new installation scripts

curl https://raw.githubusercontent.com/cloud-cx/cloudfon-cx-install/main/v4.0.0/cloud_cx_ctl.sh -o cloud_cx_ctl.sh
curl https://raw.githubusercontent.com/cloud-cx/cloudfon-cx-install/main/v4.0.0/install_docker_cx.sh -o install_docker_cx.sh

Install CX Services

/bin/sh install_docker_cx.sh
/bin/sh cloud_cx_ctl.sh run -i puteyun/cloud_cx:${tag} -t api

Note: ${tag} is the release version of cloud CX, for example: 5.1, Please MUST replace the ${tag} in the above command with the latest tag.