Upgrade the version of the ZenML server

Learn how to upgrade your server to a new version of ZenML for the different deployment options.

The way to upgrade your ZenML server depends a lot on how you deployed it.

To upgrade your ZenML server that was deployed with the zenml deploy command to a newer version, you can follow the steps below.

In the config file, set zenmlserver_image_tag to the version that you want your ZenML server to be running.

Run the deploy command again with this config file:Copyzenml deploy --config=/PATH/TO/FILE

Any database schema updates are automatically handled by ZenML and unless mentioned otherwise, all of your data is migrated to the new version, intact.

To upgrade to a new version with docker, you have to delete the existing container and then run the new version of the zenml-server image.

Check that your data is persisted (either on persistent storage or on an external MySQL instance) before doing this.

Optionally also perform a backup before the upgrade.

Delete the existing ZenML container, for example like this:Copy# find your container ID
docker psCopy# stop the container
docker stop <CONTAINER_ID>

# remove the container
docker rm <CONTAINER_ID>

Deploy the version of the zenml-server image that you want to use. Find all versions here.Copydocker run -it -d -p 8080:8080 --name <CONTAINER_NAME> zenmldocker/zenml-server:<VERSION>

To upgrade your ZenML server Helm release to a new version, follow the steps below:

Pull the latest version of the Helm chart from the ZenML GitHub repository, or a version of your choice, e.g.:

# If you haven't cloned the ZenML repository yet

git clone https://github.com/zenml-io/zenml.git

# Optional: checkout an explicit release tag

# git checkout 0.21.1

git pull

# Switch to the directory that hosts the helm chart

cd src/zenml/zen_server/deploy/helm/