Skip to content

Commit

Permalink
Update the docs for changes in bctl regarding kubeconfig (#11)
Browse files Browse the repository at this point in the history
* Update the docs for changes in bctl regarding kubeconfig

* Pin the operator to specific version
  • Loading branch information
ranyodh authored Nov 22, 2023
1 parent f8c20e3 commit 8cbcd7f
Show file tree
Hide file tree
Showing 15 changed files with 127 additions and 167 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
website/public/
blueprint.yaml
kubeconfig

.idea
33 changes: 10 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,17 +44,11 @@ It is currently possible to view and edit the documentation website locally. See
```shell
bctl apply --config blueprint.yaml
```
4. Connect to the cluster:
```shell
export KUBECONFIG=./kubeconfig
kubectl get pods
```
Note: `bctl` will create a `kubeconfig` file in the current directory.
Use this file to connect to the cluster.
5. Add wordpress addon to the `blueprint.yaml`:
4. Add wordpress addon to the `blueprint.yaml`:
```YAML
- name: wordpress
kind: HelmAddon
kind: helm
enabled: true
namespace: wordpress
chart:
Expand All @@ -67,7 +61,7 @@ It is currently possible to view and edit the documentation website locally. See
```shell
bctl update --config blueprint.yaml
```
6. Delete the cluster:
5. Delete the cluster:
```shell
bctl reset --config blueprint.yaml
```
Expand All @@ -94,7 +88,7 @@ It is currently possible to view and edit the documentation website locally. See
components:
addons:
- name: example-server
kind: HelmAddon
kind: helm
enabled: true
namespace: default
chart:
Expand Down Expand Up @@ -177,22 +171,15 @@ Refer to the example TF scripts: https://github.com/Mirantis/boundless-cli/tree/
```shell
bctl apply --config blueprint.yaml
```
4. Connect to the cluster:
```shell
export KUBECONFIG=./kubeconfig
kubectl get pods
```
Note: `bctl` will create a `kubeconfig` file in the current directory.
Use this file to connect to the cluster.
5. Update the cluster by modifying `blueprint.yaml` and then running:
4. Update the cluster by modifying `blueprint.yaml` and then running:
```shell
bctl update --config blueprint.yaml
```
6. Delete the cluster:
5. Delete the cluster:
```shell
bctl reset --config blueprint.yaml
```
7. Delete virtual machines:
6. Delete virtual machines:
```bash
cd example/aws-tf
terraform destroy --auto-approve
Expand Down Expand Up @@ -227,7 +214,7 @@ spec:
addons:
- name: my-grafana
enabled: true
kind: HelmAddon
kind: helm
namespace: monitoring
chart:
name: grafana
Expand Down Expand Up @@ -264,7 +251,7 @@ spec:
type: NodePort
addons:
- name: example-server
kind: HelmAddon
kind: helm
enabled: true
namespace: default
chart:
Expand Down Expand Up @@ -316,7 +303,7 @@ spec:
type: NodePort
addons:
- name: example-server
kind: HelmAddon
kind: helm
enabled: true
namespace: default
chart:
Expand Down
136 changes: 61 additions & 75 deletions blueprints/lensappiq/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This blueprint bootstraps a kind cluster and installs Lens AppIQ.
### Pre-req
* [Install Boundless CLI `bctl`](https://github.com/Mirantis/boundless/blob/main/README.md#pre-requisite)

### Bootsrap a Kind cluster with Lens AppIQ
### Bootstrap a `Kind` cluster with Lens AppIQ

### Installation

Expand Down Expand Up @@ -58,16 +58,15 @@ kubectl wait --namespace shipa-system \
--timeout=180s
```

## Lens AppIQ on k0s Cluster
## Lens AppIQ on `k0s` Cluster

Bootstrap a k0s cluster and install Lens AppIQ.


#### Pre-requisite

* SSH Access to either one (single node) or two VMs (one controller and one worker)

For AWS there are `terraform` scripts in the `example/` directory that can be used to create machines on AWS.
**For AWS** there are `terraform` scripts in the `example/` directory that can be used to create machines on AWS.

Refer to the example TF scripts: https://github.com/Mirantis/boundless-cli/tree/main/example/aws-tf

Expand All @@ -83,6 +82,8 @@ Refer to the example TF scripts: https://github.com/Mirantis/boundless-cli/tree/
4. `terraform apply`
5. `terraform output --raw bop_cluster > ./blueprint.yaml`

**For installing using Lima VM**, start Lima VM by running `limactl start`. Refer [Lima documentation](https://github.com/lima-vm/lima#getting-started) for details

#### Install blueprint on `k0s`

1. Edit the `lensappiq-k0s-blueprint.yaml` file to set the `spec.kubernetes.infra.hosts` from the output of `terraform output --raw bop_cluster`.
Expand All @@ -109,88 +110,73 @@ Refer to the example TF scripts: https://github.com/Mirantis/boundless-cli/tree/
role: worker
```
> For Single node configuration (such as when running for testing on Lima VM on Mac or a QEMU VM on linux), remove worker ssh entry and change `role: controller` to `role: single`
> For Single node configuration (such as when running for testing on Lima VM on Mac or a QEMU VM on linux), remove worker ssh entry and change `role: controller` to `role: single`

2. Bootstrap k0s on provided VMs and install Lens AppIQ
2. Bootstrap `k0s` on provided VMs and install Lens AppIQ
Bootstrap a controller and worker k0s nodes and install Lens AppIQ:
```shell
bctl apply --config lensappiq-k0s-blueprint.yaml
```
Bootstrap a single node k0s cluster on Lima VM (Mac) and install Lens AppIQ

> Start Lima VM by running `limactl start`. Refer [Lima documentation](https://github.com/lima-vm/lima#getting-started) for details
It should print following output on your terminal:

```shell
lensappiq-k0s-lima-blueprint.yaml
```

It should print following output on your terminal:

```shell
$ bctl apply -c lensappiq-k0s-lima-blueprint.yaml
INFO[0000] Installing Kubernetes distribution: k0s
⠀⣿⣿⡇⠀⠀⢀⣴⣾⣿⠟⠁⢸⣿⣿⣿⣿⣿⣿⣿⡿⠛⠁⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀█████████ █████████ ███
⠀⣿⣿⡇⣠⣶⣿⡿⠋⠀⠀⠀⢸⣿⡇⠀⠀⠀⣠⠀⠀⢀⣠⡆⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀███ ███ ███
⠀⣿⣿⣿⣿⣟⠋⠀⠀⠀⠀⠀⢸⣿⡇⠀⢰⣾⣿⠀⠀⣿⣿⡇⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀███ ███ ███
⠀⣿⣿⡏⠻⣿⣷⣤⡀⠀⠀⠀⠸⠛⠁⠀⠸⠋⠁⠀⠀⣿⣿⡇⠈⠉⠉⠉⠉⠉⠉⠉⠉⢹⣿⣿⠀███ ███ ███
⠀⣿⣿⡇⠀⠀⠙⢿⣿⣦⣀⠀⠀⠀⣠⣶⣶⣶⣶⣶⣶⣿⣿⡇⢰⣶⣶⣶⣶⣶⣶⣶⣶⣾⣿⣿⠀█████████ ███ ██████████
k0sctl v0.16.0 Copyright 2023, k0sctl authors.
Anonymized telemetry of usage will be sent to the authors.
By continuing to use k0sctl you agree to these terms:
https://k0sproject.io/licenses/eula
INFO ==> Running phase: Connect to hosts
INFO [ssh] 127.0.0.1:60022: connected
INFO ==> Running phase: Detect host operating systems
INFO [ssh] 127.0.0.1:60022: is running Ubuntu 23.10
INFO ==> Running phase: Acquire exclusive host lock
INFO ==> Running phase: Prepare hosts
INFO ==> Running phase: Gather host facts
INFO [ssh] 127.0.0.1:60022: using lima-default as hostname
INFO [ssh] 127.0.0.1:60022: discovered eth0 as private interface
INFO [ssh] 127.0.0.1:60022: discovered 192.168.5.15 as private address
INFO ==> Running phase: Validate hosts
INFO ==> Running phase: Gather k0s facts
INFO ==> Running phase: Validate facts
INFO ==> Running phase: Download k0s on hosts
INFO [ssh] 127.0.0.1:60022: downloading k0s v1.28.3+k0s.0
INFO ==> Running phase: Install k0s binaries on hosts
INFO ==> Running phase: Configure k0s
WARN [ssh] 127.0.0.1:60022: generating default configuration
INFO [ssh] 127.0.0.1:60022: validating configuration
INFO [ssh] 127.0.0.1:60022: configuration was changed, installing new configuration
INFO ==> Running phase: Initialize the k0s cluster
INFO [ssh] 127.0.0.1:60022: installing k0s controller
INFO [ssh] 127.0.0.1:60022: waiting for the k0s service to start
INFO [ssh] 127.0.0.1:60022: waiting for kubernetes api to respond
INFO ==> Running phase: Release exclusive host lock
INFO ==> Running phase: Disconnect from hosts
INFO ==> Finished in 1m31s
INFO k0s cluster version v1.28.3+k0s.0 is now installed
INFO[0092] Waiting for nodes to be ready
INFO[0142] Installing Boundless Operator
INFO[0142] Waiting for all pods to be ready
INFO[0172] Applying Boundless Operator resource
INFO[0172] Applying Blueprint
INFO[0172] Finished installing Boundless Operator
```

> Wait for Lens AppIQ to come up
```shell
kubectl wait --namespace shipa-system \
--for=condition=ready pod \
--selector=app.kubernetes.io/managed-by=LensApps \
--timeout=180s
```
$ bctl apply -c lensappiq-k0s-lima-blueprint.yaml
INFO[0000] Installing Kubernetes distribution: k0s
⠀⣿⣿⡇⠀⠀⢀⣴⣾⣿⠟⠁⢸⣿⣿⣿⣿⣿⣿⣿⡿⠛⠁⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀█████████ █████████ ███
⠀⣿⣿⡇⣠⣶⣿⡿⠋⠀⠀⠀⢸⣿⡇⠀⠀⠀⣠⠀⠀⢀⣠⡆⢸⣿⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀███ ███ ███
⠀⣿⣿⣿⣿⣟⠋⠀⠀⠀⠀⠀⢸⣿⡇⠀⢰⣾⣿⠀⠀⣿⣿⡇⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠀███ ███ ███
⠀⣿⣿⡏⠻⣿⣷⣤⡀⠀⠀⠀⠸⠛⠁⠀⠸⠋⠁⠀⠀⣿⣿⡇⠈⠉⠉⠉⠉⠉⠉⠉⠉⢹⣿⣿⠀███ ███ ███
⠀⣿⣿⡇⠀⠀⠙⢿⣿⣦⣀⠀⠀⠀⣠⣶⣶⣶⣶⣶⣶⣿⣿⡇⢰⣶⣶⣶⣶⣶⣶⣶⣶⣾⣿⣿⠀█████████ ███ ██████████
k0sctl v0.16.0 Copyright 2023, k0sctl authors.
Anonymized telemetry of usage will be sent to the authors.
By continuing to use k0sctl you agree to these terms:
https://k0sproject.io/licenses/eula
INFO ==> Running phase: Connect to hosts
INFO [ssh] 127.0.0.1:60022: connected
INFO ==> Running phase: Detect host operating systems
INFO [ssh] 127.0.0.1:60022: is running Ubuntu 23.10
INFO ==> Running phase: Acquire exclusive host lock
INFO ==> Running phase: Prepare hosts
INFO ==> Running phase: Gather host facts
INFO [ssh] 127.0.0.1:60022: using lima-default as hostname
INFO [ssh] 127.0.0.1:60022: discovered eth0 as private interface
INFO [ssh] 127.0.0.1:60022: discovered 192.168.5.15 as private address
INFO ==> Running phase: Validate hosts
INFO ==> Running phase: Gather k0s facts
INFO ==> Running phase: Validate facts
INFO ==> Running phase: Download k0s on hosts
INFO [ssh] 127.0.0.1:60022: downloading k0s v1.28.3+k0s.0
INFO ==> Running phase: Install k0s binaries on hosts
INFO ==> Running phase: Configure k0s
WARN [ssh] 127.0.0.1:60022: generating default configuration
INFO [ssh] 127.0.0.1:60022: validating configuration
INFO [ssh] 127.0.0.1:60022: configuration was changed, installing new configuration
INFO ==> Running phase: Initialize the k0s cluster
INFO [ssh] 127.0.0.1:60022: installing k0s controller
INFO [ssh] 127.0.0.1:60022: waiting for the k0s service to start
INFO [ssh] 127.0.0.1:60022: waiting for kubernetes api to respond
INFO ==> Running phase: Release exclusive host lock
INFO ==> Running phase: Disconnect from hosts
INFO ==> Finished in 1m31s
INFO k0s cluster version v1.28.3+k0s.0 is now installed
INFO[0092] Waiting for nodes to be ready
INFO[0142] Installing Boundless Operator
INFO[0142] Waiting for all pods to be ready
INFO[0172] Applying Boundless Operator resource
INFO[0172] Applying Blueprint
INFO[0172] Finished installing Boundless Operator
```
> Note: `bctl apply` adds kube config context to default location and set it as the _current context_

3. Connect to the cluster:
3. Wait for Lens AppIQ to come up
```shell
export KUBECONFIG=./kubeconfig
kubectl get pods
kubectl wait --namespace shipa-system \
--for=condition=ready pod \
--selector=app.kubernetes.io/managed-by=LensApps \
--timeout=180s
```
Note: `bctl` will create a `kubeconfig` file in the current directory.
Use this file to connect to the cluster.


# Access Lens AppIQ
## Install Lens AppIQ CLI
Expand Down
2 changes: 1 addition & 1 deletion blueprints/lensappiq/lensappiq-k0s-blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ spec:
components:
addons:
- name: lens-appiq
kind: HelmAddon
kind: helm
enabled: true
namespace: shipa-system
chart:
Expand Down
2 changes: 1 addition & 1 deletion blueprints/lensappiq/lensappiq-k0s-lima-blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
components:
addons:
- name: lens-appiq
kind: HelmAddon
kind: helm
enabled: true
namespace: shipa-system
chart:
Expand Down
2 changes: 1 addition & 1 deletion blueprints/lensappiq/lensappiq-kind-blueprint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
components:
addons:
- name: lens-appiq
kind: HelmAddon
kind: helm
enabled: true
namespace: shipa-system
chart:
Expand Down
2 changes: 1 addition & 1 deletion deploy/static/boundless-operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,7 @@ spec:
- --leader-elect
command:
- /manager
image: ghcr.io/mirantis/boundless-operator:latest
image: ghcr.io/mirantis/boundless-operator:0.1.1-alpha
livenessProbe:
httpGet:
path: /healthz
Expand Down
2 changes: 1 addition & 1 deletion website/content/docs/blueprints/addons/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ spec:
addons:
- name: my-grafana
enabled: true
kind: HelmAddon
kind: helm
namespace: monitoring
chart:
name: grafana
Expand Down
14 changes: 4 additions & 10 deletions website/content/docs/examples/bootstrap-k0s.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,16 @@ Refer to the example TF scripts: https://github.com/Mirantis/boundless-cli/tree/
```shell
bctl apply --config blueprint.yaml
```
4. Connect to the cluster:
```shell
export KUBECONFIG=./kubeconfig
kubectl get pods
```
Note: `bctl` will create a `kubeconfig` file in the current directory.
Use this file to connect to the cluster.
5. Update the cluster by modifying `blueprint.yaml` and then running:
> Note: `bctl apply` adds kube config context to default location and set it as the _current context_
4. Update the cluster by modifying `blueprint.yaml` and then running:
```shell
bctl update --config blueprint.yaml
```
6. Delete the cluster:
5. Delete the cluster:
```shell
bctl reset --config blueprint.yaml
```
7. Delete virtual machines:
6. Delete virtual machines:
```bash
cd example/aws-tf
terraform destroy --auto-approve
2 changes: 1 addition & 1 deletion website/content/docs/examples/existing-cluster.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ weight: 3
components:
addons:
- name: example-server
kind: HelmAddon
kind: helm
enabled: true
namespace: default
chart:
Expand Down
2 changes: 1 addition & 1 deletion website/content/docs/examples/k0s.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ spec:
type: NodePort
addons:
- name: example-server
kind: HelmAddon
kind: helm
enabled: true
namespace: default
chart:
Expand Down
2 changes: 1 addition & 1 deletion website/content/docs/examples/kind.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ spec:
type: NodePort
addons:
- name: example-server
kind: HelmAddon
kind: helm
enabled: true
namespace: default
chart:
Expand Down
Loading

0 comments on commit 8cbcd7f

Please sign in to comment.