This guide shows you how to upgrade the ack-dify component from a version earlier than v1.0.0. You will back up data, use commands to migrate your existing plugins, and verify that they function correctly.
Applicable versions
-
Current version: < v1.0.0
-
Target version: >= v1.0.0
1. Back up data
Use the backup center to back up ack-dify data from the dify-system namespace. For detailed instructions, see Create a backup.
2. Upgrade ack-dify
Log on to the ACK console. In the left-side navigation pane, click Clusters. Click the name of the target cluster. On the cluster details page, navigate to Applications > Helm. Find ack-dify and click Update. Select the latest version and click OK to upgrade the component.
3. Migrate plugins
3.1 Access the ack-dify API container
kubectl exec -it <ack-dify-api-xxxxx-xxxxx> -n dify-system -- bash
3.2 Extract plugins
poetry run flask extract-plugins --workers=20
If you are prompted for input, press Enter to skip.
3.3 Install plugins
poetry run flask install-plugins --workers=2
Ensure your network can connect to https://marketplace.dify.ai.
4. Migrate data
To ensure future compatibility, run the following data migration command. Only run this command after you confirm that you will not roll back to the previous version.
poetry run flask migrate-data-for-plugin
5. Verify the upgrade
-
Access the Dify platform.
-
Verify that the plugins are correctly installed on the Dify platform.
-
Test a random plugin. If it functions as expected, the upgrade and migration were successful.
Rollback
If you need to roll back to a previous version, follow these steps:
-
Log on to the ACK console. In the left-side navigation pane, click Clusters. Click the name of the target cluster. On the cluster details page, navigate to Applications > Helm. Find ack-dify and click Delete. Click OK to uninstall the component. Then, manually delete all its associated persistent volume claims (PVCs).
-
Restore from the backup center:
-
From the backup vault, select the backup created in the data backup step.
-
Select
dify-systemas the destination namespace for the restore operation. After the restore is complete, you can accessack-difyagain.
-
-
Do not roll back immediately after the upgrade. First, verify that the data is migrated and all plugins function correctly.
-
If you encounter problems during the upgrade, refer to the official Dify documentation: Migrating Community Edition to v1.0.0.
FAQ
-
How long does a backup or restore take? The time required depends on the data volume and network conditions.
-
What should I do if the plugin migration fails? Verify that your network can access
https://marketplace.dify.ai. -
What should I do if the data migration fails? Try running the migration command again.
Disclaimer
Dify on ACK is a Helm-based deployment solution that adapts the open-source Dify project for rapid deployment in Alibaba Cloud ACK environments. ACK does not guarantee the operation of the Dify application or its compatibility with ecosystem components, such as plug-ins or databases. ACK provides no compensation for business losses caused by defects in Dify or its ecosystem components. We recommend monitoring open-source community updates and proactively addressing issues in open-source software to ensure the stability and security of Dify.