Upgrade to Chaos Mesh 2.0
Because CRD has changed in Chaos Mesh 2.0, the YAML files for experiments from an earlier version of Chaos Mesh cannot be run on Chaos Mesh 2.0. If you want to continue using these YAML files, you need to export and update the YAML files and re-import them after upgrading Chaos Mesh.
To simplify the upgrade process, Chaos Mesh 2.0 provides the following upgrade tools:
- : used to automatically export and upgrade the YAML files, upgrade CRD, import upgraded YAML files.
schedule-migration
: used to update the earlier YAML files to the latest YAML files.
To get the upgrade tools, it is recommended to clone the Chaos Mesh project to your local repository and then execute the command make schedule-migration.tar.gz
. Or you can download the project from . After the package is downloaded, execute the following command and you can get the above two upgrade tools:
The schedule-migration
tool in this package applies only to the Linux x86_64 platform. If you are using other operating systems or architectures, you need to compile the code by yourselves.
Step 1: Export and upgrade an experiment
If is in the current directory, place the schedule-migration
tool in this directory. Then execute the following command to export and upgrade the experiment:
Then many YAML files are generated in the current directory. These are the exported files of the experiments. The exported experiment files are automatically upgraded.
In addition, you can use the schedule-migration
tool to upgrade the specified old version of YAML files:
In the YAML file path you have specified, you can get upgraded YAML files. After deleting the old resources, reapply the new YAML files to complete the update process.
You can see that CRD is deleted and re-added.
Step 3: Upgrade Chaos Mesh
Because Chaos Mesh 2.0 contains many changes made from 1.x, it is recommended to uninstall 1.x first and then install 2.0. For specific installation steps, refer to .
Chaos Mesh 2.0 has made some changes on the experiment definition. Before you continue using it, you need to upgrade the experiment files of an earlier version.
In the same directory of exported experiment files, execute the following command to import the experiment: