Install and Configure Mendix for Private Cloud Non-Interactive Mode

Last modified: February 2, 2024

1 Introduction

To support automation namespace installation and configuration we provide a non-interactive mode in our configuration tool.

Please see Download the Configuration Tool for information on how to download the configuration tool.

The following parameters may be used in the commands:

  • --namespace – a cluster namespace.
  • --clusterType – a cluster type openshift or generic.
  • --clusterMode – a cluster mode standalone or connected.
  • -i – the namespace id that is shown in the Installation tab of a namespace in the Private Cloud Portal.
  • -s – the namespace secret that is shown in the Installation tab of a namespace in the Private Cloud Portal.
  • --file – a file which contains the configuration for the namespace.

When using connected mode, you need to put namespace id and namespace secret as arguments. These parameters are used by the Mendix Gateway Agent to connect to the Private Cloud Portal. You can see these values in the installation command, as the -i and -s parameters, respectively.

2 Base Installation

To perform the base installation, use the following command:

./mxpc-cli base-install --namespace <namespace> -i <namespace-id> -s <namespace-secret> --clusterMode <cluster-mode> --clusterType <cluster-type>

The namespace-id and namespace-secret are only required when using Mendix for Private Cloud in connected mode.

Global Operator Namespace - Base installation

For Global Operator, the base installation should only be applied to the Global Operator namespace and not to the managed namespace. For more information, see Global Operator.

3 Apply Configuration

To configure the namespace with a configuration file, use the following command:

./mxpc-cli apply-config -i <namespace-id> -s <namespace-secret> --file <config-file>

The namespace-id and namespace-secret are only required when using Mendix for Private Cloud in connected mode.

To generate the config file, follow the instructions described in Creating a Private Cloud Cluster. The mx_config_cli.yaml file is generated when you click Write YAML during the Review and Apply phase of configuring your namespace interactively.

Below is an example of a config file. The example is provided for reference only. To make sure that the config file captures all the values of the input fields used in your own app, you must generate your own mx_config_cli.yaml file.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
namespace: my-namespace
cluster_mode: connected
mask:
  database_plan: true
  storage_plan: true
  ingress: true
  registry: true
  proxy: false
  custom_tls: false
database_plan:
  name: ephemeral-database
  type: ephemeral
storage_plan:
  name: ephemeral-storage
  type: ephemeral
ingress:
  type: openshift-route
  enable_tls: false
  k8s_ingress: null
  service: null
registry:
  type: openshift4

Global Operator - Managed Namespace

To configure a managed namespace inside a Global Operator, the namespace configuration should only be applied on managed namespace and not Global Operator namespace. For more information, check Global Operator documentation.

Apply below config file, for the managed namespace configuration.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
namespace: managedNamespace
cluster_mode: connected
mask:
  database_plan: true
  storage_plan: true
  ingress: true
  registry: true
  proxy: false
  custom_tls: false
database_plan:
  name: ephemeral-database
  type: ephemeral
storage_plan:
  name: ephemeral-storage
  type: ephemeral
ingress:
  type: openshift-route
  enable_tls: false
  k8s_ingress: null
  service: null
registry:
  type: openshift4
global_operator:
  operator_namespace: globalOperatorNamespace

4 Upgrade Mendix Operator and Mendix Gateway Agent

To upgrade the versions of Mendix components in your namespace, use the following command:

./mxpc-cli upgrade-namespace --clusterType <cluster-type> --namespace <namespace>