Skip to content

Commit

Permalink
Add documentation on using Rancher Desktop
Browse files Browse the repository at this point in the history
Signed-off-by: Nigel Jones <nigel.l.jones+git@gmail.com>
  • Loading branch information
planetf1 committed Jan 12, 2022
1 parent 9432725 commit 3967673
Show file tree
Hide file tree
Showing 4 changed files with 56 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,9 @@ You will need **either**:

We will use Kubernetes as the runtime environment for running Egeria.

_TODO: This following content could be converted to snippets_

Follow these steps from our [Kubernetes Documentation](/egeria-docs/guides/operations/kubernetes):

* [Setting up Kubernetes](/egeria-docs/guides/operations/kubernetes/k8s)
* [Setting up Kubernetes](/egeria-docs/guides/operations/kubernetes/k8s) - follow the instruction for **Rancher Desktop**
* [Setting up Helm](/egeria-docs/guides/operations/kubernetes/helm)

## Setting up Postman
Expand Down
13 changes: 5 additions & 8 deletions site/docs/guides/operations/kubernetes/charts/lab.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,8 @@ You no longer need a git clone of this repository to install the chart.
helm install lab egeria/odpi-egeria-lab
```

In the following examples we're using microk8s.

```bash
$ helm install lab egeria/odpi-egeria-lab [11:47:04]
WARNING: Kubernetes configuration file is group-readable. This is insecure. Location: /var/snap/microk8s/2346/credentials/client.config
$ helm install lab egeria/odpi-egeria-lab
NAME: lab
LAST DEPLOYED: Tue Aug 10 11:47:19 2021
NAMESPACE: default
Expand All @@ -54,7 +51,7 @@ It can take a few seconds for the various components to all spin-up. You can mon
the readiness by running `kubectl get all` -- when ready, you should see output like the following:

```bash
$ kubectl get all [13:53:43]
$ kubectl get all
NAME READY STATUS RESTARTS AGE
pod/lab-odpi-egeria-lab-ui-74cc464575-cf8rm 1/1 Running 0 126m
pod/lab-odpi-egeria-lab-datalake-0 1/1 Running 0 126m
Expand Down Expand Up @@ -105,7 +102,7 @@ statefulset.apps/lab-kafka 1/1 126m
statefulset.apps/lab-odpi-egeria-lab-core 1/1 126m
statefulset.apps/lab-odpi-egeria-lab-datalake 1/1 126m
statefulset.apps/lab-odpi-egeria-lab-factory 1/1 126m
````
```

All of the `pod/...` listed at the top have `Running` as their `STATUS` and `1/1` under `READY`.)

Expand All @@ -117,7 +114,7 @@ Since k8s implementations vary one simple approach for local testing is to use `

If you look in the list of services above (`kubectl get services`) we have one named 'service/lab-jupyter' so let's try that (with microk8s):
```shell
$ kubectl port-forward service/lab-jupyter 8888:8888 [13:53:52]
$ kubectl port-forward service/lab-jupyter 8888:8888
Forwarding from 127.0.0.1:8888 -> 8888
Forwarding from [::1]:8888 -> 8888
```
Expand All @@ -129,7 +126,7 @@ At this point you should be able to access your notebooks by going to this forwa

We repeat the port forwarding above, this time for another service
```shell
$ kubectl port-forward service/lab-presentation 8091:8091 [14:15:37]
$ kubectl port-forward service/lab-presentation 8091:8091
Forwarding from 127.0.0.1:8091 -> 8091
Forwarding from [::1]:8091 -> 8091
```
Expand Down
54 changes: 50 additions & 4 deletions site/docs/guides/operations/kubernetes/k8s.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,49 @@ Other alternatives that might come to mind include

[Kubernetes' own Getting Started guide :material-dock-window:](https://kubernetes.io/docs/setup/){ target=k8s } provides links to setting up Kubernetes in many environments. Below we'll take a quick look at some of the simpler examples, especially for new users.

### [microk8s](https://microk8s.io){ target=mk8s } (Linux, Windows, MacOS)

!!! attention "6GB is recommended as the minimum memory requirement"

As with most k8s implementations, when running some ongoing cpu will be used, so if running on your laptop/low power device it's recommended to refer to the relevant docs and stop k8s when not in use.

When running on a separate server or a cloud service this isn't a concern.

Only install **ONE** of the options below.

### [Rancher Desktop](https://rancherdesktop.io){ target=rd } (Linux, Windows, MacOS)

!!! attention Recommended for Dojo

Rancher Desktop is the **recommended environment** for running our **Dojos** locally, and was used to document and test the scenarios.


[Rancher desktop](https://rancherdesktop.io) is an open-source distribution for Kubernetes which is designed to be easy to set up.

#### MacOS

The [MacOS install :material-dock-window:](https://github.com/rancher-sandbox/rancher-desktop/blob/main/docs/installing.md#installing-rancher-desktop-on-macos){ target=rd } docs cover the steps needed to install Rancher Desktop.

If you have [HomeBrew :material-dock-window:](https://docs.brew.sh/Installation){ target=brew } installed, you can also install the application via using
```
brew install rancher
```
### Windows

Follow the [official instructions :material-dock-window:](https://github.com/rancher-sandbox/rancher-desktop/blob/main/docs/installing.md#windows){ target=rd } (untested)


#### Linux

Follow the [official instructions :material-dock-window:](https://github.com/rancher-sandbox/rancher-desktop/blob/main/docs/installing.md#linux){ target=rd } (untested)

#### IMPORTANT - Rancher Desktop configuration for all platforms

After installation open the Rancher Desktop app and in preferences under **Kubernetes Settings** set the following:
- a minimum of 6GB RAM allocated to Kubernetes. Do not go into the red area
- at least 1 less CPU allocated than you have on your machine. Do not go into the red area
- check you are using the latest 'stable' kubernetes version

![Kubernetes Setttings](rancherprefs.png)

### [microk8s](https://microk8s.io){ target=mk8s } (Linux, Windows, MacOS)

!!! attention "microk8s uses its own commands to avoid conflicts"
When using microk8s, note that the standard k8s commands are renamed to avoid clashes, so use the microk8s ones in the remainder of the Egeria documentation:

Expand Down Expand Up @@ -145,12 +180,23 @@ As an example, the following commands should get you set up, but always check th

Follow the [official instructions :material-dock-window:](https://microk8s.io/#tab-two__content){ target=mk8s } (untested)

Ensure when installing you specify at least 6GB RAM.

#### Linux

Follow the [official instructions :material-dock-window:](https://microk8s.io/#tab-one__content){ target=mk8s } (untested)

Ensure when installing you specify at least 6GB RAM.

### [Docker Desktop](https://www.docker.com/products/docker-desktop){ target=docker } (Windows, MacOS)

!!!attention Licensing Changes for Docker Desktop
Docker has recently updated their licensing conditions for Docker Desktop.

As such, it is therefore no longer our preferred/tested environment for Dojos.

Ensure you are familiar before using. See https://www.docker.com/pricing/faq

After installing, go into Docker Desktop **Settings** and select **Kubernetes**. Make sure **Enable Kubernetes** is checked. Also, under resources ensure at least 4GB is allocated to Docker.

### Cloud
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3967673

Please sign in to comment.