Installing Components through the Helm Chart UI
Introduction
By default, Mendix on Kubernetes uses the mxpc-cli tool for configuring namespaces and performing base installations. However, you can also integrate Helm charts into your pipelines in order to directly install components and run the configurations through the Helm chart UI.
The solution consists of two main components: the Helm charts themselves, and a tool called mx-ops-cli. The mx-ops-cli acts as a user interface, allowing you to input configurations and then generate Helm charts values from the helm charts.
Benefits of Using the Helm Charts
Using the solution offers the following advantages when compared to the traditional method of using the mxpc-cli tool:
- Helm-based installation does not require elevated permissions, and can be run on individual workstations. Because of that, you can implement them if you use GitOps and similar DevOps practices.
- By using Helm charts, you can integrate configuration deployment into their existing pipelines. This reduces the need for manual intervention. For users who are familiar with Helm charts, it is a more intuitive and preferred method compared to manual CLI operations.
- The deployment process is streamlined, consistent, and repeatable.
- Managing the configurations is easy.
- In future releases, upgrade process will be simplified.
Current Limitations
The solution currently has the following limitations compared to using the mxpc-cli tool:
- The Helm chart UI cannot be used to configure the Global Operator.
- We do not have any UI-driven upgrade approach.
- With the current release, namespaces initially created with mxpc-cli cannot be migrated and managed with Helm charts. The option to use Helm charts is only available for newly created namespaces.
- The Helm chart does not cover advanced operator configurations.
- Currently, we do not provide a public repository to download the Helm chart. The Helm charts are currently only be downloaded through our in house mx-ops-cli web UI.
Installing and Configuring the Mendix on Kubernetes with Helm Charts
To install the solution, perform the following steps:
-
Create a namespace in your cluster.
-
Toggle the option Use new Helm chart installation to On.
-
Select your operating system, and then click Download Executable.
-
Click the Copy icon in the Run the command in your terminal section, and then run it on the machine where you want to install Mendix on Kubernetes.
The Web UI application opens locally in your browser, using
localhost:3000as the default address. You can now select one of the following options:- Start from scratch - Creates a new configuration file.
- Import from file - Allows you to import configurations from an existing yaml file.
- Download artifacts - Downloads the latest Helm charts or Custom Resource Definitions, so you can open and view them. You can use this option to check the expected format, so you can use them as a template for your own charts.
-
For an initial configuration, select Start from Scratch. The configuration wizard opens.
The configuration wizard offers light and dark modes for the UI. To switch between them, click the Light Mode or Dark Mode button in the top right corner.
-
In the General Settings tab, select the environment for the installation. The other settings are pre-populated for the namespace that you created.
-
Optional: In the Service Accounts tab, specify a custom Kubernetes service account for the Mendix environment to use instead of the default account.
-
In the Database Plans tab, select your desired database type, and then specify one or more database plans. For more information about the available options, see Supported Database Types.
If you want to use a custom Kubernetes service account for any of your plans, select it in the K8s Service Account field.
-
In the Storage Plans tab, select your desired database type, and then specify one or more blob storage plans. For more information about the available options, see Blob File Storage Plans.
-
In the Ingress tab, specify your network ingress settings. For more information about the available options, see Network Ingress Settings in Mendix on Kubernetes.
-
In the Registry tab, specify your network ingress settings. For more information about the available options, see Registry Configuration.
-
Optional: In the Proxy tab, specify a proxy server.
-
Optional: If your servers use a self-signed certificate, in the Custom TLS tab, configure custom TLS so that the self-signed certificate is accepted.
-
Click Generate & Download to generate the yaml file with the configurations that you provided.
-
Run the following commands:
- Install the required Custom Resource Definitions by running
kubectl apply -f mx-privatecloud-operator-crd/crds/. - Install Mendix on Kubernetes by running
helm install --createnamespace -n <your namespace> -f <yaml file name> <release name> mx-privatecloud-operator-installer.
- Install the required Custom Resource Definitions by running
The installer performs the basic installation and applies the configurations at the same time.
Updating the Configuration
If you want to update your configuration (for example, to change the database), perform the following steps:
- In the Web UI application, click Import from file.
- Update the imported yaml file by following the same wizard as above.
- Update the configuration with the new yaml file by running the following command:
helm upgrade -n <your namespace> -f <yaml file name> <release name> mx-privatecloud-operator-installer.
Upgrading to a New Version of the Mendix Operator
When upgrading the Mendix Operator, perform the following steps:
- In the Web UI application, click Download charts to download the Helm charts for your current configuration.
- Extract the yaml file from the download.
- Update the Custom Resource Definitions by running
kubectl apply -f mx-privatecloud-operator-crd/crds/. - Update the configuration by running the following command:
helm upgrade -n <your namespace> -f <yaml file name> <release name> mx-privatecloud-operator-installer.
Uninstalling the Cluster
To uninstall the cluster, perform the following steps:
- Delete the environment in the Mendix on Kubernetes portal.
- Ensure all Mendix apps are fully deleted, especially the Storage Instances.
- Use the
helm uninstallcommand to complete the process. For more information, see [helm uninstall] (https://helm.sh/docs/helm/helm_uninstall) in the Helm documentation.