Upgrading Private Cloud

Last update: Edit

1 Introduction

This document describes how an existing installation of Mendix for Private Cloud can be upgraded.

This procedure allows you to upgrade to any supported (v1.9.0 and later) version of the Mendix for Private Cloud Operator.

If you are using your own private registry, follow the Migrating to Your Own Registry guide first to migrate new component versions of Mendix for Private Cloud into your private registry.

2 Prerequisites

2.1 Download the Configuration Tool

Follow the instructions to Download the Configuration Tool. When downloading the Configuration Tool, choose the version you would like to upgrade to (1.9.0 or a later version) - not the version that is currently installed.

If you’re using an OpenShift cluster, follow the Signing in to OpenShift instructions.

2.2 CLI Availability

You must have the OpenShift CLI installed for upgrading Mendix for Private Cloud on OpenShift, or the Kubectl CLI installed if you are upgrading Mendix for Private Cloud on another Kubernetes platform. In both cases, ensure that they are connected to the correct cluster.

3 Upgrade Namespace

  1. Follow the instructions to Run the Configuration Tool. You will see the initial screen:

  2. Click Upgrade Namespace. You will see the screen below:

3.1 Automatic Upgrade Mode

This mode will automatically upgrade components in the namespace.

  1. Select your current required Cluster Typeopenshift or generic.

  2. Click Run Upgrade to upgrade Mendix for Private Cloud components in the namespace.

3.2 Manual Upgrade Mode

This mode allows you to review and audit any changes the Configuration Tool would need to perform to upgrade Mendix for Private Cloud in your namespace.

To get the current configuration, this tool will need permissions to read resources in the namespace.

A manual upgrade consists of the following steps:

3.2.1 Generate Upgrade Patches

This step will prepare upgrade patches on your local machine in the subfolder .mxpc-cli of your user home directory (for example C:\Users\<User id>\.mxpc-cli in Windows or /home/<User id>/.mxpc-cli for Mac and U*ix).

  1. Select your Cluster Typeopenshift or generic.

  2. Click Save Upgrade script to generate upgrade patches for the namespace.

3.2.2 Stop Deployments

Stop the deployed mendix-operator (replace {namespace} with the namespace where the Mendix Operator is deployed):

kubectl -n {namespace} scale deployment mendix-operator --replicas=0

If you have installed the cluster in Connected mode, stop the deployed mendix-agent (replace {namespace} with the namespace where the Mendix Agent is deployed):

kubectl -n {namespace} scale deployment mendix-agent --replicas=0

3.2.3 Apply the Upgrade Patches

Run the following command to upgrade Custom Resource Definitions for the Mendix Operator:

kubectl apply -f crds.manifest.yaml

Custom Resource Definitions allow Mendix applications to be managed with Kubernetes APIs and tools such as kubectl and oc.

Run the following command to upgrade the dependency versions for the Mendix Operator:

kubectl -n {namespace} apply -f upgrade_manifest.yaml

Open the upgrade_patches.txt file and run the commands printed in that file. The upgrade_patches.txt file contains a list of kubectl commands (or oc commands for OpenShift) that you will need to execute in a command line terminal to complete the upgrade process.

3.2.4 Start Deployments

Start the mendix-operator deployment (replace {namespace} with the namespace where the Mendix Operator is deployed):

kubectl -n {namespace} scale deployment mendix-operator --replicas=1

If you have installed the cluster in Connected mode, start the mendix-agent deployment (replace {namespace} with the namespace where the Mendix Agent is deployed):

kubectl -n {namespace} scale deployment mendix-agent --replicas=1