Updating Midaz

Keeping Midaz up to date means you're always working with the latest features, security patches, and improvements. Regular updates also keep everything running smoothly with other components and help prevent issues caused by outdated dependencies.

Below are the steps to update Midaz in your local environment and using Helm.


Updating Midaz Locally


If you're running Midaz locally for development or testing, follow these steps to update your environment:

1. Stop the Running Containers

Shut down all running services before making updates. This ensures a clean restart with the latest updates.

make down

2. (Optional) Clean Up Unused Docker Resources

Cleaning up unused resources helps keep your environment efficient:

  • Free up disk space: Prevent old images, containers, and volumes from eating up storage.
  • Avoid conflicts with outdated dependencies: Ensure you're working with the latest configurations.
  • Improve performance: Reduce unnecessary Docker cache layers and optimize resource management.
  • Prevent debugging headaches: Eliminate inconsistencies caused by outdated data lingering in the system.
  • Keep your workspace tidy: Maintain an organized development setup, especially when switching between projects.

To remove unused images and containers:

docker system prune --all

To remove unused Docker volumes:

docker volume prune

3. Update Your Local Codebase

Fetch the latest changes from the repository to ensure you're working with the most recent version:

git pull origin main

4. Rebuild and Restart Midaz

Rebuild necessary Docker images and relaunch the application locally with the latest updates:

make up

Updating Midaz with Helm


For deployments using Helm, use the following commands based on your needs. Helm simplifies Kubernetes-based deployments, making it easy to install, upgrade, or remove Midaz.


Fresh Installation

Perform a fresh installation when setting up Midaz for the first time or when a clean deployment is required.

Install Midaz Helm with a Custom Values File

Use this method if you have specific configuration requirements defined in values.yaml:

helm install midaz oci://registry-1.docker.io/lerianstudio/midaz-helm \
  --values values.yaml --version <version> -n midaz --create-namespace

Install Midaz Helm with Default Values

Use this method to install Midaz using the default Helm chart values:

helm install midaz oci://registry-1.docker.io/lerianstudio/midaz-helm \
  --version <version> -n midaz --create-namespace

Upgrading an Existing Deployment

If Midaz is already deployed, use these commands to upgrade to a new version while preserving configurations.

Upgrade Midaz Helm with a Custom Values File

Ensure that custom configurations remain intact while applying the update:

helm upgrade midaz oci://registry-1.docker.io/lerianstudio/midaz-helm \
  --values values.yaml --version <new-version> -n midaz --create-namespace

Upgrade Midaz Helm with Default Values

Use this command if you do not need to apply custom configurations:

helm upgrade midaz oci://registry-1.docker.io/lerianstudio/midaz-helm \
  --version <new-version> -n midaz --create-namespace

Managing the Helm Release

Use these commands to check and manage your Midaz Helm deployment.

List Installed Releases

List all Helm releases in the midaz namespace, along with their status and version:

helm ls -n midaz

Delete the Midaz Helm Release

If you need to completely remove Midaz from your cluster, run:

helm delete midaz -n midaz

By keeping Midaz updated, you ensure a stable, secure, and high-performing environment while benefiting from the latest enhancements and best practices.

helm delete midaz -n midaz