Update Deephaven
This guide shows you how to update your Deephaven deployment.
Each Deephaven release adds features and fixes. Keep your deployment up to date. The steps depend on how you install and run Deephaven, so go to the section for your installation method.
Note
Read the release notes before you update across a major version.
Deephaven versioning
Each Deephaven version is two numbers separated by a period, such as 42.7. A major release increments the first number and resets the second, for example from 41.7 to 42.0. Other releases increment the second number, for example from 42.6 to 42.7.
Sometimes Deephaven keeps patching an older line. For example, 41.11 was released after 42.0, so a higher second number does not always mean a newer release. The latest tag points to the current release, and the Deephaven releases page lists every release.
Before you update
- Note the version you run now, so you can roll back by returning to it. For example, set the previous image tag.
- Back up your Deephaven data directory (in Docker,
/dataor the mount or volume that holds it).
Update Docker-installed Deephaven
Docker keeps a copy of each image tag it has already pulled and reuses it. Moving tags such as latest and edge can be stale, so pull them again before you recreate the container. A version tag you have not pulled yet downloads automatically with docker run and docker compose up.
Set the image version
When you run Deephaven from Docker, you choose the image version with a tag after the image name. You set the tag the same way with docker run, a docker-compose.yml file, or a Dockerfile. The tag is one of the following:
- A specific version number, such as
42.7. Not every release has an image, so check the image tags on GitHub first. - The
latesttag, which is the most recent Deephaven release. - The
edgetag, which is a regularly rebuilt image of the deephaven-coremainbranch, built at least nightly.
Note
Most deployments use a specific version number or latest. Use edge only for testing, because it includes unreleased changes.
With docker run, the tag follows the image name:
If you deploy with Docker Compose, set the version in the image line of the Deephaven service in docker-compose.yml:
In Docker Compose, you can also read the version from an environment variable:
This line uses the value of the VERSION environment variable, or latest if VERSION is not set.
In a Dockerfile, put the tag after the image name in the FROM line:
Pull and recreate
Warning
Before you remove a container, make sure /data, the Deephaven data directory in the container, is in a bind mount or named volume. Data in a mount persists when you recreate the container.
Without a mount, /data is an anonymous volume tied to that container:
- With
docker run, a new container starts with an empty/data. - The old data stays in an unreferenced volume.
- Docker deletes the old data if you remove the container with
docker rm -vor run it with--rm.
To mount the data directory:
- With
docker run, add-v "$(pwd)/data":/data. - With Docker Compose, add a
volumes:entry.
After you set the new tag:
- Pull the image with
docker compose pull, or withdocker pull ghcr.io/deephaven/server-slim:<tag>. - Recreate the container with
docker compose up -d, or stop and remove the old container (docker stop deephaventhendocker rm deephaven), then rundocker runagain.
If you build your own image from a Dockerfile, change the FROM tag and rebuild with docker build or docker compose build --pull. Then recreate the container.
Update a source build
- In your
deephaven-coreclone, rungit fetch --tags. - Check out the release tag or branch you want, such as
git checkout v42.7. For a branch, rungit pull --ff-onlyto update it from its upstream. - Rebuild and restart the server using the build from source guide.
Update the production application
To update the production application, download and unpack the artifacts for the version you are updating to. Then restart the server.