Launchpad Configuration File¶
Mirantis Launchpad cluster configuration is presented in YAML format.
launchpad.yaml
is the file’s default name, though you can edit this name as
necessary using any common text editor.
Sample Launchpad Configuration File¶
The following launchpad.yaml
example uses every possible configuration
option.
apiVersion: launchpad.mirantis.com/mke/v1.4
kind: mke+msr
metadata:
name: mycluster
spec:
hosts:
- role: manager
hooks:
apply:
before:
- ls -al > test.txt
after:
- cat test.txt
ssh:
address: 10.0.0.1
user: myuser
port: 22
keyPath: ~/.ssh/id_rsa
privateInterface: eth0
environment:
http_proxy: http://example.com
NO_PROXY: 10.0.0.*
mcrConfig:
debug: true
log-opts:
max-size: 10m
max-file: "3"
- role: worker
winRM:
address: 10.0.0.2
user: myuser
password: abcd1234
port: 5986
useHTTPS: true
insecure: false
useNTLM: false
caCertPath: ~/.certs/cacert.pem
certPath: ~/.certs/cert.pem
keyPath: ~/.certs/key.pem
- role: msr
imageDir: ./msr-images
ssh:
address: 10.0.0.3
user: myuser
port: 22
keyPath: ~/.ssh/id_rsa
- role: worker
localhost:
enabled: true
mke:
version: "3.4.15"
imageRepo: "docker.io/mirantis"
adminUsername: admin
adminPassword: "$MKE_ADMIN_PASSWORD"
installFlags:
- "--default-node-orchestrator=kubernetes"
licenseFilePath: ./docker-enterprise.lic
configFile: ./mke-config.toml
configData: |-
[scheduling_configuration]
default_node_orchestrator = "kubernetes"
msr:
version: "2.9.11"
imageRepo: "docker.io/mirantis"
installFlags:
- --dtr-external-url dtr.example.com
- --ucp-insecure-tls
replicaIDs: sequential
mcr:
version: "20.10.17"
channel: stable
repoURL: https://repos.mirantis.com
installURLLinux: https://get.mirantis.com/
installURLWindows: https://get.mirantis.com/install.ps1
cluster:
prune: true
Note
Launchpad follows Kubernetes-style versioning and grouping in its configuration.
Environment variable substitution¶
In reading the configuration file, Launchpad will replace any strings that begin with a dollar sign with values from the local host’s environment variables. For example:
apiVersion: launchpad.mirantis.com/mke/v1.4
kind: mke
spec:
mke:
installFlags:
- --admin-password="$MKE_ADMIN_PASSWORD"
Simple bash-like expressions are supported.
Expression |
Meaning |
---|---|
${var} |
Value of var (same as $var) |
${var-$DEFAULT} |
If var not set, evaluate expression as $DEFAULT |
${var:-$DEFAULT} |
If var not set or is empty, evaluate expression as $DEFAULT |
${var=$DEFAULT} |
If var not set, evaluate expression as $DEFAULT |
${var:=$DEFAULT} |
If var not set or is empty, evaluate expression as $DEFAULT |
${var+$OTHER} |
If var set, evaluate expression as $OTHER, otherwise as empty string |
${var:+$OTHER} |
If var set, evaluate expression as $OTHER, otherwise as empty string |
$$var |
Escape expressions. Result will be $var. |
Key detail¶
Comprehensive information follows for each of the top-level Launchpad
configuration file (launchpad.yaml
) keys: apiVersion, kind, metadata,
spec, cluster
apiVersion¶
The latest API version is launchpad.mirantis.com/mke/v1.4
, though earlier
configuration file versions are also likely to work without changes (without
any features added by more recent versions).
kind¶
mke
and mke+msr
are currently supported.
metadata¶
- name
Name of the cluster to be created. Currently affects only Launchpad internal storage paths (for example, for client bundles and log files).
spec¶
The specification for the cluster (hosts_
, mke_
, msr_
,
engine_
).
hosts¶
The machines that clusters run on are hosts.
Host name |
Role of the host |
---|---|
|
Private network address for the configured network interface (default:
|
|
Role of the machine in the cluster. Possible values are:
|
|
Key-value pairs in YAML mapping syntax. Values are updated to host environment (optional) |
|
Mirantis Container Runtime configuration in YAML mapping syntax, will be converted to daemon.json (optional) |
|
Hooks configuration for running commands before or after stages (optional) |
|
Path to a directory containing .tar/.tar.gz files produced by |
|
Flag indicating whether Docker should be run with |
Host connection options¶
Option type |
Options |
---|---|
|
|
|
|
|
|
Hooks configuration options¶
Option type |
Options |
---|---|
|
|
|
|
mke¶
Specify options for the MKE cluster.
Options |
Description |
---|---|
|
Version of MKE to install or upgrade to (default: 3.3.7) |
|
The image repository to use for MKE installation (default: |
|
MKE administrator username (default: |
|
MKE administrator password (default: auto-generate) |
|
Custom installation flags for MKE installation. |
|
Optional. Custom upgrade flags for MKE upgrade. Obtain a list of supported installation options for a specific MKE version by running the installer container with docker run -t -i --rm mirantis/ucp:3.4.15 upgrade --help. |
|
Optional. A path to the MKE license file. |
|
Optional. The initial full cluster configuration file. |
|
Optional. The initial full cluster configuration file in embedded “heredocs” syntax. Heredocs allows you to define a mulitiline string while maintaining the original formatting and indenting |
|
Optional. Cloud provider configuration.
|
|
Optional. Custom flags for Swarm initialization |
|
Optional. Custom commands to run after the Swarm initialization |
caCertPath certPath keyPath each followed by
<path to file> or
caCertData certData keyData each followed by
<PEM encoded string> |
Required components for configuring the MKE UI to use custom SSL certificates on its Ingress. You must specify all components:
Launchpad accepts either inline PEM-encoded data or a file path, depending on the provided argument. Note If MKE already uses custom certificates, Launchpad can rotate the certificates during upgrade. |
Important
Unless a password is provided, the MKE installer automatically generates an
administrator password. This password will display in clear text in the
output and persist in the logs. Subsequent runs will fail if this
automatically generated password is not configured in the launchpad.yaml
file.
msr¶
Specify options for the MSR cluster.
Options |
Description |
---|---|
|
Version of MSR to install or upgrade to (default: 2.8.5) |
|
The image repository to use for MSR installation (default: |
|
Optional. Custom installation flags for MSR installation. Obtain a list of supported installation options for a specific MSR version by running the installer container with docker run -t -i --rm mirantis/dtr:2.9.11 install --help. Note Launchpad inherits the MKE flags that MSR needs to perform an installation, and to join or remove nodes. Thus, there is no need to include the following install flags in the installFlags section of msr:
|
|
Optional. Custom upgrade flags for MSR upgrade. Obtain a list of supported installation options for a specific MSR version by running the installer container with docker run -t -i --rm mirantis/dtr:2.9.11 upgrade --help. |
|
Set to |
mcr¶
Specify options for MCR installation.
Note
Customers take a risk in opting to use and manage their own install scripts for MCR instead of the install script that Mirantis hosts at get.mirantis.com. Mirantis manages this script as necessary to support MCR installations on demand, and can change it as needed to resolve issues and to support new features. As such, customers who opt to use their own script will need to monitor the Mirantis script to ensure compatibility.
Options |
Description |
---|---|
|
Version of MCR to install or upgrade to. (default 20.10.0) |
|
Installation channel to use. One of |
|
Repository URL to use for MCR installation. (optional) |
|
Location from which to download the initial installer script for Linux hosts (local paths can also be used). (default: https://get.mirantis.com/) |
|
Location from which to download the initial installer script for Windows hosts (local paths can be used). (default: https://get.mirantis.com/install.ps1) Note In most scenarios, it is not necessary to specify |
|
Removes certain system paths that are created by MCR during
uninstallation (for example, |
cluster¶
Specify options that do not pertain to any of the individual components.
Options |
Description |
---|---|
|
Set to |
See also