Skip to main content

Update Witboost

Updating Witboost consists of two main steps:

  1. Update the Witboost configuration file (values.yaml). This can be done by the Witboost Infra CLI automatically.
  2. Update the Witboost Helm chart to the target version using the Helm CLI.

Prerequisites

  • Access to the Kubernetes cluster where Witboost is installed, with the necessary permissions to perform Helm upgrades.
  • Helm CLI installed and configured to interact with the Kubernetes cluster.
  • An existing Witboost installation with a valid values.yaml configuration file.
  • The Witboost Infra CLI installed. If you haven't done this yet, refer to the Witboost Infra CLI installation guide.
  • The Witboost Infra CLI is available in your system's PATH. If you used Homebrew to install it, this is done automatically. Otherwise, run export PATH=$PATH:/path/to/witboost-infra to add it to your PATH.

Step 1 - Backup your database and configuration

Make sure to backup your Witboost databases and configuration files before proceeding with the update. This is crucial to prevent data loss in case of any issues during the update process.

Step 2 - Initialize the Witboost Infra CLI

Provide the credentials to access the Witboost Helm and Docker registries. These credentials are provided by the Witboost team:

witboost-infra init --registry-username "foo" --registry-password "xyz"

Once the initialization is complete, the initialized directory looks similar to this.

~/.witboost-infra
├── config.yaml
├── output
├── rules
├── tool-config.yaml
└── values

Step 3 - Update values.yaml configuration file

In the following example, we specify the version 2.10.7 as current and 2.11.0 as a target of the migration. Adjust to your current and target versions accordingly.

witboost-infra transform --user-values values.yaml --current-version "2.10.7" --set-target "2.11.0"
info: Transform from version 2.10.7 to 2.11.0
info: Writing the transformed file to: /Users/john.doe/.witboost-infra/output/transformed_user_values.yaml

Compare the changes between the original values.yaml and the transformed one. If everything looks good, you can replace the original values.yaml with the transformed one. Make sure to keep a backup of the original file.

Done!

tip

Command details can be referenced from transform detailed under Command-reference section.

Step 4 - Mirror the Witboost images (optional)

Witboost is a cloud-native application composed of multiple microservices, each distributed as a container image. The Witboost deployment configuration references these images from the public Witboost registry by default. If your organization uses a private container registry, you can mirror the Witboost images there instead. This step is optional when using the public Witboost registry.

witboost-infra mirror-images --witboost-version <version> --target <target-registry-url>

Use --dry-run to preview what would be mirrored without performing the actual operation.

Step 5 - Mirror the Witboost Helm chart (optional)

If you are using a private Helm repository, you can mirror the Witboost Helm chart and its dependencies using the witboost-infra mirror-chart command. This step is optional if you are using the public Witboost Helm repository.

witboost-infra mirror-chart --witboost-version <version> --target <target-registry-url>

The --target value can point to either an OCI registry (e.g. oci://harbor.internal/helm) or an HTTP/S Helm repository (e.g. https://chartmuseum.internal); the target type is auto-detected unless explicitly set with --target-type.

If the target requires authentication, provide credentials with --target-username and --target-password.

Use --dry-run to preview what would be mirrored without performing the actual operation.

Step 6 - Upgrade Witboost Helm chart

If the Witboost Helm chart is not already added to your Helm repositories, you can add it using the following command:

helm repo add --username <username> --password <access_token> witboost https://gitlab.com/api/v4/projects/40979925/packages/helm/stable

Then, you can upgrade the Witboost Helm chart to the target version using the following command:

helm repo update
helm upgrade --install --rollback-on-failure <release_name> witboost/witboost -n <namespace> -f <my-values.yaml> --version X.Y.Z --timeout 10m

After this step, monitor if the Witboost pods are running correctly and check the logs for any errors. If you encounter any issues, you can always reach out to the Witboost support team for assistance.