Skip to content

Commit

Permalink
Documentation and example updates for release 1.2 (#68)
Browse files Browse the repository at this point in the history
* Update examples

* Doc updates

* Adapt #69
  • Loading branch information
kke authored Apr 6, 2021
1 parent 125f6da commit 55227f5
Show file tree
Hide file tree
Showing 13 changed files with 127 additions and 121 deletions.
17 changes: 3 additions & 14 deletions docs/command-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,11 @@ The supported options are:
(default: `launchpad.yaml`)
* `--force` - Continue installation when prerequisite validation fails
(default: `false`)
* `--disable-redact` - Do not hide sensitive information in the output
(default: `false`)
* `--confirm` - Request confirmation for every command to be run on the remote hosts
(default: `false`)

## Download client configuration

The MKE client bundle contains a private and public key pair that authorizes
Launchpad to interact with the [MKE CLI](https://docs.mirantis.com/docker-enterprise/v3.1/dockeree-products/ucp/user-access.html#cli-access).
Launchpad to interact with the [MKE CLI](https://docs.mirantis.com/containers/v3.1/dockeree-products/mke/user-access.html#cli-access).

`launchpad client-config`

Expand All @@ -50,7 +46,7 @@ The supported options are:
**Note:** The configuration must include the MKE credentials, example:

```yaml
apiVersion: launchpad.mirantis.com/mke/v1.1
apiVersion: launchpad.mirantis.com/mke/v1.3
kind: mke
spec:
mke:
Expand All @@ -68,10 +64,6 @@ The supported options are:

* `--config` - Path to a cluster config file, including the filename (default: `launchpad.yaml`, read from stdin: `-`)
* `--force` - Required when running non-interactively (default: `false`)
* `--disable-redact` - Do not hide sensitive information in the output
(default: `false`)
* `--confirm` - Request confirmation for every command to be run on the remote hosts
(default: `false`)

## Execute a command or run a remote terminal on a host

Expand All @@ -95,10 +87,6 @@ The supported options are:
The supported options are:

* `--config` - Path to a cluster config file, including the filename (default: `launchpad.yaml`, read from stdin: `-`)
* `--disable-redact` - Do not hide sensitive information in the output
(default: `false`)
* `--confirm` - Request confirmation for every command to be run on the remote hosts
(default: `false`)
* `[report name]` - Currently supported reports: `config`, `hosts`, `mke`, `msr`

## Register
Expand All @@ -112,6 +100,7 @@ The supported options are:
* `--name` - Name
* `--email` - Email
* `--company` - Company
* `--accept-license` - Accept the [end user license agreement](https://github.com/Mirantis/launchpad/blob/master/LICENSE)


## Generate shell auto-completions
Expand Down
88 changes: 49 additions & 39 deletions docs/configuration-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,40 +4,39 @@ Mirantis Launchpad cluster configuration is described in YAML format. You can cr

## Configuration File Reference

The complete `launchpad.yaml` file looks something like this, but with values determined by your specific configuration.
An example `launchpad.yaml` file utilizing every possible configuration option.

```yaml
apiVersion: launchpad.mirantis.com/mke/v1.1
apiVersion: launchpad.mirantis.com/mke/v1.3
kind: mke+msr
metadata:
name: launchpad-mke
spec:
hosts:
- address: 10.0.0.1
role: manager
- role: manager
hooks:
apply:
before:
- ls -al > test.txt
after:
- cat test.txt
- rm 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.*
engineConfig:
mcrConfig:
debug: true
log-opts:
max-size: 10m
max-file: "3"
- address: 10.0.0.2
role: worker
- role: worker
winRM:
address: 10.0.0.2
user: Administrator
password: abcd1234
port: 5986
Expand All @@ -47,19 +46,19 @@ spec:
caCertPath: ~/.certs/cacert.pem
certPath: ~/.certs/cert.pem
keyPath: ~/.certs/key.pem
- address: 10.0.0.3
role: msr
imageDir: ./dtr-images
- role: msr
imageDir: ./msr-images
ssh:
address: 10.0.0.3
user: root
port: 22
keyPath: ~/.ssh/id_rsa
- address: 127.0.0.1
role: worker
localhost: true
- role: worker
localhost:
enabled: true
mke:
version: "3.3.3"
imageRepo: "docker.io/docker"
version: "3.3.7"
imageRepo: "docker.io/mirantis"
adminUsername: admin
adminPassword: "$MKE_ADMIN_PASSWORD"
installFlags:
Expand All @@ -76,14 +75,14 @@ spec:
[Global]
region=RegionOne
msr:
version: 2.8.1
imageRepo: "docker.io/docker"
version: 2.8.5
imageRepo: "docker.io/mirantis"
installFlags:
- --dtr-external-url dtr.example.com
- --ucp-insecure-tls
replicaIDs: sequential
engine:
version: "19.03.8"
mcr:
version: "20.10.0"
channel: stable
repoURL: https://repos.mirantis.com
installURLLinux: https://get.mirantis.com/
Expand All @@ -99,7 +98,7 @@ We follow Kubernetes-like versioning and grouping in launchpad configuration so
When reading the configuration file, launchpad will replace any strings starting with a dollar sign with values from the local host's environment variables. Example:

```yaml
apiVersion: launchpad.mirantis.com/mke/v1.1
apiVersion: launchpad.mirantis.com/mke/v1.3
kind: mke
spec:
mke:
Expand All @@ -122,7 +121,7 @@ $$var | Escape expressions. Result will be $var.

## `apiVersion`

The latest API version is `launchpad.mirantis.com/mke/v1.1`, but earlier configuration file versions should still work without changes if you do not intend to use any of the added features of the current version.
The latest API version is `launchpad.mirantis.com/mke/v1.3`, but earlier configuration file versions should still work without changes if you do not intend to use any of the added features of the current version.

## `kind`

Expand All @@ -141,28 +140,28 @@ The specification for the cluster.

The machines that the cluster runs on.

- `address` - Address of the server that `launchpad` can connect to using the selected [connection](#host-connection-options) method
- `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)
- `engineConfig` - Docker Engine configuration in YAML mapping syntax, will be converted to `daemon.json` (optional)
- `mcrConfig` - Mirantis Container Runtime configuration in YAML mapping syntax, will be converted to `daemon.json` (optional)
- `hooks` - [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

- `ssh` - [SSH](#ssh) Secure Shell (SSH) connection configuration options
- `winRM` - [WinRM](#winrm) Windows Remote Management (WinRM) connection configuration options
- `localhost` - Target is the local host where launchpad is running (boolean, default: false)
- `localhost` - [Localhost)(#localhost) Target is the local host where launchpad is running

##### `ssh`

SSH configuration options.

- `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`)
Expand All @@ -171,6 +170,7 @@ SSH configuration options.

WinRM configuration options.

- `address` - WinRM connection address
- `user` - Windows account username (default: `Administrator`)
- `password` - User account password
- `port` - Host's WinRM listening port (default: `5986`)
Expand All @@ -181,6 +181,12 @@ WinRM configuration options.
- `certPath` - Path to Certificate file (optional)
- `keyPath` - Path to Key file (optional)

##### `localhost`

Localhost connection configuration options.

- `enabled` - Must be set to `true` to enable.

#### Hooks configuration options

Host hooks can be used to have launchpad run commands on the host before or after operation stages.
Expand All @@ -200,17 +206,20 @@ Host hooks can be used to have launchpad run commands on the host before or afte

### `mke`

Specify options for the MKE cluster itself.
Specify options for the MKE cluster.

- `version` - Which version of MKE we should install or upgrade to (default `3.3.3`)
- `imageRepo` - Which image repository we should use for MKE installation (default `docker.io/docker`)
- `version` - Which version of MKE we should install or upgrade to (default `3.3.7`)
- `imageRepo` - Which image repository we should 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. You can get a list of supported installation options for a specific MKE version by running the installer container with `docker run -t -i --rm docker/ucp:3.3.0 install --help`. (optional)
- `installFlags` - Custom installation flags for MKE installation.
- `upgradeFlags`- Custom upgrade flags for an MKE upgrade. You can get a list of supported installation options for a specific MKE version by running the installer container with `docker run -t -i --rm docker/ucp:3.3.7 upgrade --help`. (optional)
- `licenseFilePath` - Optional. A path to Docker Enterprise license file.
- `configFile` - Optional. The initial full cluster [configuration file](https://docs.mirantis.com/docker-enterprise/v3.1/dockeree-products/ucp/ucp-configure/ucp-configuration-file.html).
- `configData` - Optional. The initial full cluster [configuration file](https://docs.mirantis.com/docker-enterprise/v3.1/dockeree-products/ucp/ucp-configure/ucp-configuration-file.html) in embedded "heredocs" way. Heredocs allows you to define a mulitiline string while maintaining the original formatting and indenting
- `configFile` - Optional. The initial full cluster [configuration file](https://docs.mirantis.com/containers/v3.1/dockeree-products/mke/mke-configure/mke-configuration-file.html).
- `configData` - Optional. The initial full cluster [configuration file](https://docs.mirantis.com/containers/v3.1/dockeree-products/mke/mke-configure/mke-configuration-file.html) in embedded "heredocs" syntax. Heredocs allows you to define a mulitiline string while maintaining the original formatting and indenting
- `cloud` - Optional. Cloud provider configuration
- `swarmInstallFlags` - Custom flags for Swarm initialization (optional)
- `swarmUpdateCommands` - Custom commands to run after the Swarm initialization (optional)

**Note:** The MKE installer will automatically generate an administrator password unless provided and it will be displayed in clear text in the output and persisted in the logs. The automatically generated password must be configured in the `launchpad.yaml` for any subsequent runs or they will fail.

Expand All @@ -226,32 +235,33 @@ Cloud provider configuration.

Specify options for the MSR cluster.

- `version` - Which version of MSR we should install or upgrade to (default `2.8.3`)
- `version` - Which version of MSR we should install or upgrade to (default `2.8.5`)
- `imageRepo` - Which image repository we should use for MSR installation (default `docker.io/mirantis`)
- `installFlags` - Custom installation flags for MSR installation. You can get 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.8.3 install --help`. (optional)
- `installFlags` - Custom installation flags for MSR installation. You can get 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.8.5 install --help`. (optional)

**Note**: `launchpad` will inherit the MKE flags which are needed by MSR to perform installation, joining and removal of nodes. There's 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`- Custom upgrade flags for an MSR upgrade. You can get a list of supported installation options for a specific MSR version by running the installer container with `docker run -t -i --rm docker/dtr:2.8.5 upgrade --help`. (optional)
- `replicaIDs` - Set to `sequential` to generate sequential replica id's for cluster members, for example `000000000001`, `000000000002`, etc. (default: `random`)

### `engine`
### `mcr`

Specify options for Docker Engine - Enterprise to be installed
Specify options for the Mirantis Container Runtime.

- `version` - The version of engine that you want to install or upgraded to. (default `19.03.12`)
- `version` - The version of MCR you want to install or upgraded to. (default `20.10.0`)
- `channel` - Installation channel to use. One of `test` or `prod` (optional)
- `repoURL` - Repository URL to use for engine installation. (optional)
- `repoURL` - Repository URL to use for MCR installation. (optional)
- `installURLLinux` - Where to download the initial installer script for linux hosts. Local paths can also be used. (default: `https://get.mirantis.com/`)
- `installURLWindows` - Where to download the initial installer script for windows hosts. Also local paths can be used. (default: `https://get.mirantis.com/install.ps1`)

**Note:** In most scenarios, you should not need to specify `repoUrl` and `installURLLinux/Windows`, which are only usually used when installing from a non-standard location like a disconnected datacenter.
**Note:** In most scenarios, you should not need to specify `repoUrl` and `installURLLinux/Windows`, which are only usually used when installing from a non-standard location like a disconnected datacenter.

### `cluster`

Specify options not specific to any of the individual components.
Specify options not specific to any of the individual components.

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

Expand Down
20 changes: 10 additions & 10 deletions docs/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ The cluster is configured using [a yaml file](configuration-file.md). In this ex
Open up your favorite editor, and type something similar to the example below. Once done, save the file as `launchpad.yaml`. Adjust the example below to meet your infrastructure requirements. This model should work to deploy hosts on most public clouds.

```yaml
apiVersion: launchpad.mirantis.com/mke/v1.1
apiVersion: launchpad.mirantis.com/mke/v1.3
kind: mke
metadata:
name: mke-kube
Expand All @@ -91,20 +91,20 @@ spec:
installFlags:
- --default-node-orchestrator=kubernetes
hosts:
- address: 172.16.33.100
role: manager
- role: manager
ssh:
address: 172.16.33.100
keyPath: ~/.ssh/my_key
- address: 172.16.33.101
role: worker
- role: worker
ssh:
address: 172.16.33.101
keyPath: ~/.ssh/my_key
```
If you're deploying on VirtualBox or other desktop virtualization solution and are using ‘bridged’ networking, you’ll need to make a few minor adjustments to your launchpad.yaml (see below) — deliberately setting a –pod-cidr to ensure that pod IP addresses don’t overlap with node IP addresses (the latter are in the 192.168.x.x private IP network range on such a setup), and supplying appropriate labels for the target nodes’ private IP network cards using the privateInterface parameter (this typically defaults to ‘enp0s3’ on Ubuntu 18.04 — other Linux distributions use similar nomenclature). You may also need to set the username to use for logging into the host.
```yaml
apiVersion: launchpad.mirantis.com/mke/v1.1
apiVersion: launchpad.mirantis.com/mke/v1.3
kind: mke
metadata:
name: my-mke
Expand All @@ -116,15 +116,15 @@ spec:
- --default-node-orchestrator=kubernetes
- --pod-cidr 10.0.0.0/16
hosts:
- address: 192.168.110.100
role: manager
- role: manager
ssh:
address: 192.168.110.100
keyPath: ~/.ssh/id_rsa
user: theuser
privateInterface: enp0s3
- address: 192.168.110.101
role: worker
- role: worker
ssh:
address: 192.168.110.101
keyPath: ~/.ssh/id_rsa
user: theuser
privateInterface: enp0s3
Expand Down
6 changes: 3 additions & 3 deletions docs/host-configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,13 @@ This can be done by defining Docker engine configuration in launchpad.yaml, for

spec:
hosts:
- address: 192.168.110.100
role: manager
- role: manager
ssh:
address: 192.168.110.100
keyPath: ~/.ssh/id_rsa
user: theuser
privateInterface: enp0s3
engineConfig:
mcrConfig:
log-driver: json-file
log-opts:
max-size: "10m"
Expand Down
Loading

0 comments on commit 55227f5

Please sign in to comment.