Skip to content

Commit

Permalink
Part 2: Edits in response to review by Magda Dziadosz.
Browse files Browse the repository at this point in the history
  • Loading branch information
KoryKessel-Mirantis committed Jun 11, 2024
1 parent 4e0849d commit 5c37935
Show file tree
Hide file tree
Showing 5 changed files with 76 additions and 43 deletions.
6 changes: 5 additions & 1 deletion content/docs/setup/getting-started/install-mke4-cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,9 @@ To override the default versions, pass the variables `K0SCTL_VERSION`,`MKECTL_VE
```

### Start Debug mode

To turn the debug mode on, run:

```shell
sudo DEBUG=true /bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/Mirantis/mke-docs/main/content/docs/setup/install.sh)"
```
Expand All @@ -92,14 +94,16 @@ You can use the `MKECTL_VERSION`, `KUBECTL_VERSION` and `K0SCTL_VERSION`
variables to install non-default versions of `mkectl`, `kubectl` and `k0sctl`.

Example:

```shell
sudo K0SCTL_VERSION=0.17.4 /bin/sh -c "$(curl -fsSL https://raw.githubusercontent.com/Mirantis/mke-docs/main/content/docs/setup/install.sh)"
```

Example output:

```shell
k0sctl version
version: v0.17.4
commit: 372a589
```
```
52 changes: 32 additions & 20 deletions content/docs/setup/getting-started/k0s-in-aws/terraform-scenario.md
Original file line number Diff line number Diff line change
@@ -1,46 +1,58 @@
**Scenario**: Create a k0s cluster in AWS using Terraform and install MKE 4 on that cluster.
# Scenario: Create a k0s cluster in AWS using Terraform and install MKE 4 on that cluster

### Prerequisites
## Prerequisites

In addition to the MKE 4 [dependencies](../create-a-cluster.md#dependencies),
you must have the following componenets installed:
you must have the following components installed:

- [Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli)
(required for creating VMs in AWS)

- AWS account

- env variables, set for AWS CLI:

* [Terraform](https://developer.hashicorp.com/terraform/tutorials/aws-get-started/install-cli)
(required for creating VMs in AWS)
* AWS account
* env variables, set for AWS CLI:
- `AWS_ACCESS_KEY_ID`
- `AWS_SECRET_ACCESS_KEY`
- `AWS_SESSION_TOKEN`

### Create virtual machines on AWS
## Create virtual machines on AWS

To create virtual machines on AWS using the
[example Terraform scripts](./terraform/):
To create virtual machines on AWS using the example Terraform scripts:

1. Copy the example Terraform folder to your local machine,
1. Copy the [example Terraform folder](./terraform) to your local machine.

2. Create a `terraform.tfvars` file with content similar to:

```
cluster_name = "k0s-cluster"
controller_count = 1
worker_count = 1
cluster_flavor = "m5.large"
region = "us-east-1"
```

3. Run `terraform init`.

4. Run `terraform apply -auto-approve`.

5. Run `terraform output --raw k0s_cluster > VMs.yaml`.

> To get detailed information on the VMs using the AWS CLI, run:
> ```
> aws ec2 describe-instances --region $(grep "region" terraform.tfvars | awk -F' *= *' '{print $2}' | tr -d '"')
> ```
> Alternatively, you can get a visual overview of the VMs at the AWS EC2 page
> by selecting the desired region from the dropdown menu in the top-right
> corner.
---
***Note***

To get detailed information on the VMs using the AWS CLI, run:

```
aws ec2 describe-instances --region $(grep "region" terraform.tfvars | awk -F' *= *' '{print $2}' | tr -d '"')
```
Alternatively, you can get a visual overview of the VMs at the AWS EC2 page
by selecting the desired region from the dropdown menu in the top-right
corner.

---

### Install MKE4 on `k0s`
## Install MKE4 on `k0s`

1. Generate a sample `mke.yaml` file:

Expand Down Expand Up @@ -75,7 +87,7 @@ To create virtual machines on AWS using the
mkectl apply -f mke.yaml
```

### Cleanup
## Cleanup

To delete virtual machines, navigate to the Terraform folder and run:

Expand Down
29 changes: 18 additions & 11 deletions content/docs/setup/getting-started/prerequisites.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,41 @@
## Prerequisites
# Prerequisites

>The prerequisites detailed herein apply only to the Alpha 1.0
>pre-release version of MKE 4.
---
***Note***

### System requirements for cluster nodes
The prerequisites detailed herein apply only to the Alpha 1.0 pre-release version of MKE 4.

---

## System requirements for cluster nodes

MKE 4 uses [k0s](https://k0sproject.io/) as the underlying Kubernetes
distribution. To learn the k0s hardware requirements, refer to the [k0s
documentation](https://docs.k0sproject.io/v1.29.4+k0s.0/system-requirements/).

### Known limitations
## Known limitations

Before installing MKE 4 Alpha 1.0, you should be aware of the current known
limitations of the software.

#### Operating systems
### Operating systems

Currently, MKE 4 is only certified for use on the following distributions:

* Ubuntu 22.04 Linux
* Ubuntu 20.04 Linux
- Ubuntu 22.04 Linux
- Ubuntu 20.04 Linux

Windows nodes are **not supported**.

#### Architecture
### Architecture

MKE 4 only supports `amd64` architecture.

#### CNI
### CNI

`calico` is the only CNI plugin that MKE 4 supports.

#### mkectl
### mkectl

`mkectl`, the [MKE CLI tool](install-mke4-cli.md), must be installed prior to
MKE 4 installation.
2 changes: 1 addition & 1 deletion content/docs/setup/getting-started/uninstallation.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Uninstallation
# Uninstallation

Run the `reset` command to destroy the cluster that was previously created with
the `apply` command.
Expand Down
30 changes: 20 additions & 10 deletions content/docs/setup/upgrade-from-mke-3/perform-upgrade.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
## Perform the Upgrade
# Perform the Upgrade

An upgrade from MKE 3 to MKE 4 consists of the following steps, all of which
are performed through the use of the `mkectl` tool:
- Run pre-upgrade checks, to verify the upgradability of the cluster.
- Carry out pre-upgrade migrations, to prepare the cluster for a migration from

- Run pre-upgrade checks to verify the upgradability of the cluster.
- Carry out pre-upgrade migrations to prepare the cluster for a migration from
a hyperkube-based MKE 3 cluster to a k0s-based MKE 4 cluster.
- Migrate manager nodes to k0s.
- Migrate worker nodes to k0s.
Expand All @@ -16,10 +17,15 @@ To upgrade an MKE 3 cluster, run the following command:
mkectl upgrade --hosts-path <path-to-hosts-yaml> --admin-username <admin-username> --admin-password <admin-password>
```

> The MKE 4 config file prints to your console when the migration is
> complete. To output the config file to a file for future use, run
`mkectl apply`. Alternatively, you can set the `--config-out` flag to the
path where you want to save the MKE 4 config file.
---
***Note***

The MKE 4 config file prints to your console when the migration is complete. To
output the config file to a file for future use, run `mkectl apply`.
Alternatively, you can set the `--config-out` flag to the path where you want
to save the MKE 4 config file.

---

The upgrade process requires time to complete. Once the process is complete,
run the following command to verify that the MKE 4 cluster is operating:
Expand All @@ -37,9 +43,13 @@ ip-172-31-191-216.us-west-2.compute.internal Ready <none> 29m v1.29.3+k
ip-172-31-199-207.us-west-2.compute.internal Ready master 30m v1.29.3+k0s
```

>The MKE 3 cluster will no longer be accessible by way of the previously
>created client bundle. The docker swarm cluster will no longer be
>accessible as well.
---
***Note***

The MKE 3 cluster will no longer be accessible through the previously created
client bundle. The docker swarm cluster will no longer be accessible as well.

---

In the event of an upgrade failure, the upgrade process rolls back,
restoring the MKE 3 cluster to its original state.

0 comments on commit 5c37935

Please sign in to comment.