Deployment and Maintenance / Upgrade and Restart
This article mainly describes how to upgrade and restart DataFlux Func.
1. Upgrade the System
No special operations are required when upgrading the current version of DataFlux Func. Simply follow the normal installation steps and install with the new version.
The installation script will automatically identify the already installed DataFlux Func and complete a series of operations such as stopping the service, replacing the image, and restarting.
In addition, after the first installation of DataFlux Func, the installation directory is written to the /etc/dataflux-func file. Therefore, when upgrading, the installation script can also automatically find the previous installation directory, and all user data will be preserved.
You can use cat /etc/dataflux-func in the command line to view the currently recorded installation directory
For detailed installation documentation, please refer to Deployment and Maintenance / Installation and Deployment / Standalone Deployment
1.2 Automatically Update the Docker Version
Different versions of DataFlux Func may bundle different Docker versions:
| DataFlux Func Version | Bundled Docker Version |
|---|---|
| 5.1.0 and later | 24.0.9 |
| 3.4.0 ~ 5.0.5 | 23.0.6 |
| 3.3.3 and earlier | 20.10.8 |
Therefore, when upgrading the DataFlux Func version, the automatic installation script will detect the current Docker version and prompt whether to reinstall Docker:
| Text Only | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
The user can enter the specific operation to be performed:
| Input | Description |
|---|---|
abort |
Abort the installation and do nothing |
skip |
Do not update Docker and directly upgrade DataFlux Func |
reinstall |
Reinstall the new version of Docker, then upgrade DataFlux Func |
If the Docker on the host machine is not the Docker automatically installed by the DataFlux Func installation package, please upgrade Docker yourself and do not reinstall it using the one-click installation package
If Docker on the host machine also runs services other than DataFlux Func, please confirm whether reinstalling Docker will affect business operations
After the user selects reinstall, there will be a 10-second countdown for the user to press CTRL + C to interrupt the reinstallation of Docker:
| Text Only | |
|---|---|
1 2 3 | |
2. Restart the System
To restart, please follow the steps below:
- Use the
docker stack rm dataflux-funccommand to stop DataFlux Func (this step may take some time) - Use the
docker pscommand to confirm that all containers have exited - Use the
docker stack deploy dataflux-func -c {installation directory}/docker-stack.yaml --resolve-image nevercommand to restart all services
Since the image files in the installation package are already imported locally, adding the --resolve-image never parameter can prevent Docker from performing unnecessary image checks when starting containers
If you find it troublesome, you can also use the original installation package to reinstall DataFlux Func to complete the 'Restart'