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).
- AMD64
- ARM64
docker pull registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-flink:1.19.720
docker pull registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-flink-arm64:1.19.720
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 mingdaoyun-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/mingdao/script/docker-compose.yaml configuration file and update the image version tag for the flink service to the target version:
- AMD64
- ARM64
# Sample configuration fragment
flink:
image: registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-flink:1.19.720
# Sample configuration fragment
flink:
image: registry.cn-hangzhou.aliyuncs.com/mdpublic/mingdaoyun-flink-arm64:1.19.720
4. Restart Service
Run the following script in the manager's root directory to restart the services:
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.