Skip to main content

Flink Same-Server Deployment (Cross-Version Upgrade)

1. Image Pull​

On the Flink node, pull the target version application image according to the architecture (Offline Package Download).

docker pull nocoly/flink:1.19.760

2. Job Record Cleanup​

Before performing a cross-version upgrade, you need to clean up the job state from the old version. Execute the following commands to enter the container and clear the data:

1. Enter the container

docker exec -it $(docker ps | grep flink | awk '{print $1}') bash

2. Backup and clear the data

# Backup and clear the old version job list data
mv /data/flink/zookeeper /data/flink/zookeeper.backup-$(date +%Y%m%d%H%M%S)

3. Modify Configuration​

Edit the /data/hap/script/docker-compose.yaml configuration file and update the image version tag for the flink service to the target version:

# Sample configuration fragment
flink:
image: nocoly/flink:1.19.760

4. Restart Service​

Run the following script from the manager’s root directory to restart the services. If you’re upgrading multiple services at the same time, you can run it once after updating all their configurations.

bash ./service.sh restartall
If you forget the location of the service.sh file, click to view the search command
find / -path /proc -prune -o -name "service.sh" -print

5. Redeploy Tasks​

After the upgrade, manually reopen or publish the relevant tasks in the sync task list. Only then will the synchronization tasks resume normal operation.