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.3
kind: mke+msr
metadata:
  name: launchpad-mke
spec:
  hosts:
  - role: manager
    hooks:
      apply:
        before:
          - ls -al > test.txt
        after:
          - cat test.txt
    ssh:
      address: 10.0.0.1
      user: root
      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: Administrator
      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: root
      port: 22
      keyPath: ~/.ssh/id_rsa
  - role: worker
    localhost:
      enabled: true
  mke:
    version: "3.3.7"
    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"
    cloud:
      provider: azure
      configFile: ~/cloud-provider.conf
      configData: |-
        [Global]
        region=RegionOne
  msr:
    version: 2.8.5
    imageRepo: "docker.io/mirantis"
    installFlags:
    - --dtr-external-url dtr.example.com
    - --ucp-insecure-tls
    replicaIDs: sequential
  mcr:
    version: "20.10.0"
    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.3
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.3, 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

privateInterface

Private network address for the configured network interface (default: eth0)

role

Role of the machine in the cluster. Possible values are: - manager - worker - msr

environment

Key-value pairs in YAML mapping syntax. Values are updated to host environment (optional)

mcrConfig

Mirantis Container Runtime configuration in YAML mapping syntax, will be converted to daemon.json (optional)

hooks

Hooks configuration for running commands before or after stages (optional)

imageDir

Path to a directory containing .tar/.tar.gz files produced by docker save. The images from that directory will be uploaded and docker load is used to load them.

Host connection options

Option type

Options

ssh (Secure Shell)

  • address: SSH connection address

  • user: User to log in as (default: root)

  • port: Host’s ssh port (default: 22)

  • keyPath: A local file path to an ssh private key file (default: ~/.ssh/id_rsa)

winRM (Windows Remote Management)

  • address: WinRM connection address

  • user: Windows account username (default: Administrator)

  • password: User account password

  • port: Host’s winRM listening port (default: 5986)

  • useHTTPS: Set true to use HTTPS protocol. When false, plain HTTP is used. (default: false)

  • insecure: Set to true to ignore SSL certificate validation errors (default: false)

  • useNTLM: Set true to use NTLM (default: false)

  • caCertPath: Path to CA Certificate file (optional)

  • certPath: Path to Certificate file (optional)

  • keyPath: Path to Key file (optional)

localhost

  • enabled: Set to true to enable.

Hooks configuration options

Option type

Options

apply

  • before: List of commands to run on the host before the “Preparing host” phase (optional)

  • after: List of commands to run on the host before the “Disconnect” phase when the apply was succesful (optional)

reset

  • before: List of commands to run on the host before the “Uninstall” phase (optional)

  • after: List of commands to run on the host before the “Disconnect” phase when the reset was successful (optional)

mke

Specify options for the MKE cluster.

Options

Description

version

Version of MKE to install or upgrade to (default: 3.3.7)

imageRepo

The image repository to use for MKE installation (default: docker.io/ mirantis)

adminUsername

MKE administrator username (default: admin)

adminPassword

MKE administrator password (default: auto-generate)

installFlags

Custom installation flags for MKE installation.

upgradeFlags

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.

licenseFilePath

Optional. A path to the MKE license file.

configFile

Optional. The initial full cluster configuration file.

configData

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

cloud

Optional. Cloud provider configuration.

  • provider: Provider name (currently AWS, Azure and OpenStack (MKE 3.3.3+) are supported)

  • configFile: Path to cloud provider configuration file on local machine

  • configData: Inlined cloud provider configuration

swarmInstallFlags

Optional. Custom flags for Swarm initialization

swarmUpdateCommands

Optional. Custom commands to run after the Swarm initialization

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

Version of MSR to install or upgrade to (default: 2.8.5)

imageRepo

The image repository to use for MSR installation (default: docker.io/ mirantis)

installFlags

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:

  • --ucp-username (inherited from MKE’s --admin-username flag or spec.mke.adminUsername)

  • --ucp-password (inherited from MKE’s --admin-password flag or spec.mke.adminPassword)

  • --ucp-url (inherited from MKE’s --san flag or intelligently selected based on other configuration variables)

upgradeFlags

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.

replicaIDs

Set to sequential to generate sequential replica id’s for cluster members, e.g., 000000000001, 000000000002, etc. (default: random)

mcr

Specify options for MCR installation.

Options

Description

version

Version of MCR to install or upgrade to. (default 20.10.0)

channel

Installation channel to use. One of test or prod (optional).

repoURL

Repository URL to use for MCR installation. (optional)

installURLLinux

Location from which to download the initial installer script for Linux hosts (local paths can also be used). (default: https://get.mirantis.com/)

installURLWindows

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 repoUrl and installURLLinux/Windows, which usually are only used when installing from a non-standard location (that is, a disconnected datacenter).

cluster

Specify options that do not pertain to any of the individual components.

Options

Description

prune

Set to true to remove nodes that are known by the cluster but not listed in the launchpad.yaml file.

See also

Kubernetes