Skip to content

Commit

Permalink
chore(docs): add instructions for microk8s (#269)
Browse files Browse the repository at this point in the history
Signed-off-by: Niladri Halder <niladri.halder@mayadata.io>
  • Loading branch information
niladrih authored Mar 29, 2021
1 parent 26d8b63 commit 819525e
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 15 deletions.
2 changes: 1 addition & 1 deletion deploy/helm/charts/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: CStor-Operator helm chart for Kubernetes
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
version: 2.7.0
version: 2.7.1
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application.
appVersion: 2.7.0
Expand Down
25 changes: 21 additions & 4 deletions deploy/helm/charts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,15 @@ Please visit the [link](https://openebs.github.io/cstor-operators) for install i

```console
# Helm
$ helm install [RELEASE_NAME] openebs-cstor/cstor
$ helm install [RELEASE_NAME] openebs-cstor/cstor --namespace [NAMESPACE]
```
<details>
<summary>Click here if you're using MicroK8s.</summary>

```console
microk8s helm3 install [RELEASE_NAME] openebs-cstor/cstor --namespace [NAMESPACE] --set-string csiNode.kubeletDir="/var/snap/microk8s/common/var/lib/kubelet/"
```
</details>

_See [configuration](#configuration) below._

Expand All @@ -55,7 +62,7 @@ _See [helm dependency](https://helm.sh/docs/helm/helm_dependency/) for command d

```console
# Helm
$ helm uninstall [RELEASE_NAME]
$ helm uninstall [RELEASE_NAME] --namespace [NAMESPACE]
```

This removes all the Kubernetes components associated with the chart and deletes the release.
Expand All @@ -66,7 +73,7 @@ _See [helm uninstall](https://helm.sh/docs/helm/helm_uninstall/) for command doc

```console
# Helm
$ helm upgrade [RELEASE_NAME] [CHART] --install
$ helm upgrade [RELEASE_NAME] [CHART] --install --namespace [NAMESPACE]
```

## Configuration
Expand All @@ -77,12 +84,22 @@ You can modify different parameters by specifying the desired value in the `helm

In the following sample command we modify `csiNode.nodeSelector` from the cstor chart and `ndm.nodeSelector` from the openebs-ndm chart to only schedule pods on nodes labelled with `openebs.io/data-plane=true`. We also enable the 'Use OS-disk' feature gate using the `featureGates.UseOSDisk.enabled` parameter from the openebs-ndm chart.

```bash

```console
helm install openebs-cstor openebs-cstor/cstor --namespace openebs --create-namespace \
--set-string csiNode.nodeSelector."openebs\.io/data-plane"=true \
--set-string openebs-ndm.ndm.nodeSelector."openebs\.io/data-plane"=true \
--set openebs-ndm.featureGates.UseOSDisk.enabled=true
```
<details>
<summary>Click here if you're using MicroK8s.</summary>

If you are using MicroK8s, it is necessary to add the following flag:

```console
--set-string csiNode.kubeletDir="/var/snap/microk8s/common/var/lib/kubelet/"
```
</details>

| Key | Type | Default | Description |
|-----|------|---------|-------------|
Expand Down
43 changes: 33 additions & 10 deletions docs/quick.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ meets the following prerequisites:


Check for existing NDM components in your openebs namespace. Execute the following command:
```sh
```bash
$ kubectl -n openebs get pods -l openebs.io/component-name=ndm

NAME READY STATUS RESTARTS AGE
Expand All @@ -31,29 +31,52 @@ openebs-ndm-vgdnv 1/1 Runnin
```

If you have got an output as displayed above, then it is recommended that you proceed with installation using the [CStor operators helm chart](https://openebs.github.io/cstor-operators). You will have to exclude `openebs-ndm` charts from the installation. Sample command:
```sh
```bash
helm install openebs-cstor openebs-cstor/cstor -n openebs --set openebsNDM.enabled=false
```
<details>
<summary>Click here if you're using MicroK8s.</summary>

```bash
microk8s helm3 install openebs-cstor openebs-cstor/cstor -n openebs --set-string csiNode.kubeletDir="/var/snap/microk8s/common/var/lib/kubelet/" --set openebsNDM.enabled=false
```
</details>

If you did not get any meaningful output (as above), then you do not have NDM components installed. Proceed with any one of the installation options below.

### Using Helm Charts:

Install CStor operators and CSI driver components using the [CStor Operators helm charts](https://openebs.github.io/cstor-operators). Sample command:

```sh
```bash
helm install openebs-cstor openebs-cstor/cstor -n openebs --create-namespace
```
<details>
<summary>Click here if you're using MicroK8s.</summary>

```bash
microk8s helm3 install openebs-cstor openebs-cstor/cstor -n openebs --create-namespace --set-string csiNode.kubeletDir="/var/snap/microk8s/common/var/lib/kubelet/"
```
</details>


Visit openebs.github.io/cstor-operators for detailed instructions.
[Click here](https://github.com/openebs/cstor-operators/blob/master/deploy/helm/charts/README.md) for detailed instructions.

### Using Operator:

Install the latest release using CStor Operator yaml.

```
```bash
kubectl apply -f https://openebs.github.io/charts/cstor-operator.yaml
```
<details>
<summary>Click here if you're using MicroK8s.</summary>

```bash
microk8s kubectl apply -f https://openebs.github.io/charts/microk8s-cstor-operator.yaml
```
</details>


### Local Development:

Expand Down Expand Up @@ -136,7 +159,7 @@ follwing steps:
In this guide, worker1 is picked. Modify the CSPC yaml to use this worker.
(Note: Use the value from labels kubernetes.io/hostname=worker1 as this label value and node name could be different in some platforms)

```yml
```yaml
kubernetes.io/hostname: "worker1"
```
Expand All @@ -148,12 +171,12 @@ follwing steps:

```bash
NAME NODENAME SIZE CLAIMSTATE STATUS AGE
blockdevice-01afcdbe3a9c9e3b281c7133b2af1b68 worker3 21474836480 Unclaimed Active 2m10s
blockdevice-10ad9f484c299597ed1e126d7b857967 worker1 21474836480 Unclaimed Active 2m17s
blockdevice-3ec130dc1aa932eb4c5af1db4d73ea1b worker2 21474836480 Unclaimed Active 2m12s
blockdevice-01afcdbe3a9c9e3b281c7133b2af1b68 worker3 21474836480 Unclaimed Active 2m10s
blockdevice-10ad9f484c299597ed1e126d7b857967 worker1 21474836480 Unclaimed Active 2m17s
blockdevice-3ec130dc1aa932eb4c5af1db4d73ea1b worker2 21474836480 Unclaimed Active 2m12s
```

```yml
```yaml
- blockDeviceName: "blockdevice-10ad9f484c299597ed1e126d7b857967"
```
Expand Down

0 comments on commit 819525e

Please sign in to comment.