|
1 | | -## Overview |
2 | 1 |
|
3 | | -`openebsctl` is a `kubectl` plugin to manage OpenEBS storage. |
4 | 2 |
|
| 3 | +## OpenEBS-CTL - Kubectl plugin to manage OpenEBS storage components ! |
5 | 4 |
|
6 | | -## Project Status |
| 5 | +OpenEBS-CTL provides a cli tool to show OpenEBS storage components elegantly, adding to easier |
| 6 | +readability and debuggability.<br/>The plugin `lists` and `describes` all the underlying components that are significant |
| 7 | +for the engines. |
| 8 | + |
| 9 | +<img width="300" align="right" alt="OpenEBS Logo" src="https://raw.githubusercontent.com/cncf/artwork/master/projects/openebs/stacked/color/openebs-stacked-color.png" xmlns="http://www.w3.org/1999/html"> |
7 | 10 |
|
8 | | -Alpha. Under active development and seeking [contributions from the community](#contributing). |
| 11 | +--- |
9 | 12 |
|
10 | | -The CLI currently supports managing cStor Pools and Volumes. |
| 13 | +## Project Status |
11 | 14 |
|
| 15 | +<b>Alpha</b>. Under active development and seeking [contributions from the community](#contributing). |
| 16 | +The CLI currently supports managing `cStor` Pools and Volumes.<br/>**Thank you!** |
| 17 | + |
| 18 | +--- |
| 19 | + |
| 20 | +[](https://goreportcard.com/report/github.com/openebs/openebsctl) |
| 21 | +[](https://github.com/openebs/openebsctl/graphs/contributors) |
| 22 | +[](https://github.com/openebs/openebsctl/releases) |
| 23 | +[](https://github.com/mum4k/termdash/blob/master/LICENSE) |
| 24 | +[](https://github.com//openebs/openebsctl/releases) |
| 25 | + |
| 26 | +--- |
| 27 | +## Table of Contents |
| 28 | +* [Installation](#installation) |
| 29 | +* [Build](#build) |
| 30 | +* [Flags](#flags) |
| 31 | +* [Usage](#usage) |
| 32 | + * [Get cStor volumes](#get-cstor-volumes) |
| 33 | + * [Get cStor pools](#get-cstor-pools) |
| 34 | + * [Describe cStor volumes](#describe-cstor-volumes) |
| 35 | + * [Describe cStor pool](#describe-cstor-pool) |
| 36 | + * [Describe pvcs](#describe-pvcs) |
| 37 | +* [Contributing](#contributing) |
| 38 | + |
| 39 | +--- |
| 40 | +## Installation |
| 41 | +OpenEBS-CTL is available on Linux, macOS and Windows platforms. |
| 42 | + |
| 43 | +* Binaries for Linux, Mac and Windows are available as tarballs and zip in the [release](https://github.com/openebs/openebsctl/releases) page. |
| 44 | +* For Linux, download the respective tarball from [release](https://github.com/openebs/openebsctl/releases) page and :- |
| 45 | + ```shell |
| 46 | + tar -xvf kubectl-openebs_v0.1.0_Linux_x86_64.tar.gz |
| 47 | + cd kubectl-openebs_v0.1.0_Linux_x86_64 |
| 48 | + sudo mv kubectl-openebs /usr/local/bin/ |
| 49 | + ``` |
| 50 | + Or, download the `debian` package from the [release](https://github.com/openebs/openebsctl/releases) page and double click it launch the installer. |
| 51 | +* For Mac, download the respective tarball from [release](https://github.com/openebs/openebsctl/releases) page and :- |
| 52 | + ```shell |
| 53 | + tar -xzvf kubectl-openebs_v0.1.0_Darwin_x86_64.tar.gz |
| 54 | + cd kubectl-openebs_v0.1.0_Darwin_x86_64 |
| 55 | + sudo mv kubectl-openebs /usr/local/bin/ |
| 56 | + ``` |
| 57 | +* For Windows, download the respective zip from [release](https://github.com/openebs/openebsctl/releases) page and :- |
| 58 | + - Extract the zip, copy the `path` of the folder the contents are in. |
| 59 | + - Add the `path` to the `PATH` environment variable. |
12 | 60 | ## Build |
13 | 61 |
|
14 | 62 | - Clone this repo to your system. `git clone https://github.com/openebs/openebsctl` |
15 | 63 | - `cd openebsctl` |
16 | 64 | - Run `make openebsctl` |
17 | 65 | - Run `kubectl openebs [get|describe] [resource]` to use the plugin |
18 | 66 |
|
19 | | -## Usage |
20 | | - |
21 | | - |
22 | | -```bash |
23 | | -# Get volumes |
24 | | -$ kubectl openebs get volumes |
25 | | -Namespace Name Status Version Capacity StorageClass Attached Access Mode Attached Node |
26 | | ---------- ---- ------ ------- -------- ------------ -------- ----------- ------------- |
27 | | -openebs pvc-cb978ab8-9045-4d40-abc5-98dfd4fd82fb Healthy master-dev 5Gi cstor.csi.openebs.io Attached ReadWriteOnce vanisingh |
28 | | -openebs pvc-e20c1212-1ef6-42c4-9638-0145fa3fb4f9 Healthy master-dev 5Gi N/A N/A N/A |
29 | | - |
30 | | - |
31 | | -# Describe a single volume |
32 | | -$ kubectl openebs describe volume pvc-cbe030cb-63ca-4dfd-ba57-7719a8c93fb2 |
33 | | -Volume Details : |
34 | | ----------------- |
35 | | -Name : pvc-cbe030cb-63ca-4dfd-ba57-7719a8c93fb2 |
36 | | -Access Mode : ReadWriteOnce |
37 | | -CSI Driver : cstor.csi.openebs.io |
38 | | -Storage Class : openebs-csi-cstor-sparse |
39 | | -Volume Phase : Bound |
40 | | -Version : master-dev |
41 | | -CSPC : cspc-stripe |
42 | | -Size : 5Gi |
43 | | -Status : Healthy |
44 | | -ReplicaCount : 1 |
45 | | - |
46 | | -Portal Details : |
47 | | ----------------- |
48 | | -IQN : iqn.2016-09.com.openebs.cstor:pvc-cbe030cb-63ca-4dfd-ba57-7719a8c93fb2 |
49 | | -Volume : pvc-cbe030cb-63ca-4dfd-ba57-7719a8c93fb2 |
50 | | -TargetNodeName : vanisingh |
51 | | -Portal : 10.103.173.0:3260 |
52 | | -TargetIP : 10.103.173.0 |
53 | | - |
54 | | -Replica Details : |
55 | | ----------------- |
56 | | -Name Pool Instance Status |
57 | | ----- ------------- ------ |
58 | | -pvc-cbe030cb-63ca-4dfd-ba57-7719a8c93fb2-cspc-stripe-56pv cspc-stripe-56pv Healthy |
59 | | - |
60 | | -# Get CStor pools |
61 | | -$ kubectl openebs get pools |
62 | | -Name Namespace HostName Free Capacity ReadOnly ProvisionedReplicas HealthyReplicas Status Age |
63 | | ----- --------- -------- ---- -------- -------- ------------------- --------------- ------ --- |
64 | | -fastssd-cstor test director-dev-cluster-1-node-1 48200M 48202370k false 1 1 ONLINE 2d5h |
65 | | -``` |
66 | | - |
| 67 | +## Flags |
| 68 | +* `--openebs-namespace` :- to override the determination of `namespace` where storage engine is installed with the provided value. |
| 69 | +* `--namespace, -n` :- to pass the namespace, if the resource is namespaced, like `pvc` etc. |
| 70 | +* `--cas-type` :- to pass the cas-type, like cstor, jiva. |
67 | 71 |
|
| 72 | +## Usage |
| 73 | +* #### Get `cStor` volumes |
| 74 | + ```bash |
| 75 | + $ kubectl openebs get volumes --cas-type=cstor |
| 76 | + NAMESPACE NAME STATUS VERSION CAPACITY STORAGE CLASS ATTACHED ACCESS MODE ATTACHED NODE |
| 77 | + cstor pvc-193844d7-3bef-45a3-8b7d-ed3991391b45 Healthy 2.9.0 5.0 GiB cstor-csi-sc Bound ReadWriteOnce N/A |
| 78 | + cstor pvc-b84f60ae-3f26-4110-a85d-bce7ec00dacc Healthy 2.0.0 20 GiB common-storageclass Bound ReadWriteOnce node1-virtual-machine |
| 79 | + ``` |
| 80 | + Note: For volumes not attached to any application, the `ATTACH NODE` would be shown as `N/A`. |
| 81 | + |
| 82 | +* #### Get `cStor` pools |
| 83 | + ```bash |
| 84 | + $ kubectl openebs get pools |
| 85 | + NAME HOSTNAME FREE CAPACITY READ ONLY PROVISIONED REPLICAS HEALTHY REPLICAS STATUS AGE |
| 86 | + cstor-storage-k5c2 node1-virtual-machine 45 GiB 45 GiB false 1 0 ONLINE 10d2h |
| 87 | + default-cstor-disk-dcrm node1-virtual-machine 73 GiB 90 GiB false 7 7 ONLINE 27d2h |
| 88 | + default-cstor-disk-fp6v node2-virtual-machine 73 GiB 90 GiB false 7 7 ONLINE 27d2h |
| 89 | + default-cstor-disk-rhwj node1-virtual-machine 73 GiB 90 GiB false 7 4 OFFLINE 27d2h |
| 90 | + ``` |
| 91 | +* #### Describe `cStor` volumes |
| 92 | + ```bash |
| 93 | + $ kubectl openebs describe volume pvc-193844d7-3bef-45a3-8b7d-ed3991391b45 |
| 94 | + |
| 95 | + pvc-193844d7-3bef-45a3-8b7d-ed3991391b45 Details : |
| 96 | + ----------------- |
| 97 | + NAME : pvc-193844d7-3bef-45a3-8b7d-ed3991391b45 |
| 98 | + ACCESS MODE : ReadWriteOnce |
| 99 | + CSI DRIVER : cstor.csi.openebs.io |
| 100 | + STORAGE CLASS : cstor-csi |
| 101 | + VOLUME PHASE : Released |
| 102 | + VERSION : 2.9.0 |
| 103 | + CSPC : cstor-storage |
| 104 | + SIZE : 5.0 GiB |
| 105 | + STATUS : Init |
| 106 | + REPLICA COUNT : 1 |
| 107 | + |
| 108 | + |
| 109 | + Portal Details : |
| 110 | + ------------------ |
| 111 | + IQN : iqn.2016-09.com.openebs.cstor:pvc-193844d7-3bef-45a3-8b7d-ed3991391b45 |
| 112 | + VOLUME NAME : pvc-193844d7-3bef-45a3-8b7d-ed3991391b45 |
| 113 | + TARGET NODE NAME : node1-virtual-machine |
| 114 | + PORTAL : 10.106.27.10:3260 |
| 115 | + TARGET IP : 10.106.27.10 |
| 116 | + |
| 117 | + |
| 118 | + Replica Details : |
| 119 | + ----------------- |
| 120 | + NAME TOTAL USED STATUS AGE |
| 121 | + pvc-193844d7-3bef-45a3-8b7d-ed3991391b45-cstor-storage-k5c2 72 KiB 4.8 MiB Healthy 10d3h |
| 122 | + |
| 123 | + Cstor Completed Backup Details : |
| 124 | + ------------------------------- |
| 125 | + NAME BACKUP NAME VOLUME NAME LAST SNAP NAME |
| 126 | + backup4-pvc-b026cde1-28d9-40ff-ba95-2f3a6c1d5668 backup4 pvc-193844d7-3bef-45a3-8b7d-ed3991391b45 backup4 |
| 127 | + |
| 128 | + Cstor Restores Details : |
| 129 | + ----------------------- |
| 130 | + NAME RESTORE NAME VOLUME NAME RESTORE SOURCE STORAGE CLASS STATUS |
| 131 | + backup4-3cc0839b-8428-4361-8b12-eb8509208871 backup4 pvc-193844d7-3bef-45a3-8b7d-ed3991391b45 192.168.1.165:9000 cstor-csi 0 |
| 132 | + ``` |
| 133 | +* #### Describe `cStor` pool |
| 134 | + ```bash |
| 135 | + $ kubectl openebs describe pool default-cstor-disk-fp6v --openebs-namespace=openebs |
| 136 | + |
| 137 | + default-cstor-disk-fp6v Details : |
| 138 | + ---------------- |
| 139 | + NAME : default-cstor-disk-fp6v |
| 140 | + HOSTNAME : node1-virtual-machine |
| 141 | + SIZE : 90 GiB |
| 142 | + FREE CAPACITY : 73 GiB |
| 143 | + READ ONLY STATUS : false |
| 144 | + STATUS : ONLINE |
| 145 | + RAID TYPE : stripe |
| 146 | + |
| 147 | + Blockdevice details : |
| 148 | + --------------------- |
| 149 | + NAME CAPACITY STATE |
| 150 | + blockdevice-8a5b69d8a2b23276f8daeac3c8179f9d 100 GiB Active |
| 151 | + |
| 152 | + Replica Details : |
| 153 | + ----------------- |
| 154 | + NAME PVC NAME SIZE STATE |
| 155 | + pvc-b84f60ae-3f26-4110-a85d-bce7ec00dacc-default-cstor-disk-fp6v mongo 992 MiB Healthy |
| 156 | + ``` |
| 157 | +* #### Describe pvcs |
| 158 | + ```bash |
| 159 | + $ kubectl openebs describe pvc mongo |
| 160 | + |
| 161 | + mongo Details : |
| 162 | + ------------------ |
| 163 | + NAME : mongo |
| 164 | + NAMESPACE : default |
| 165 | + CAS TYPE : cstor |
| 166 | + BOUND VOLUME : pvc-b84f60ae-3f26-4110-a85d-bce7ec00dacc |
| 167 | + ATTACHED TO NODE : node1-virtual-machine |
| 168 | + POOL : default-cstor-disk |
| 169 | + STORAGE CLASS : common-storageclass |
| 170 | + SIZE : 20 GiB |
| 171 | + USED : 1.1 GiB |
| 172 | + PV STATUS : Healthy |
| 173 | + |
| 174 | + Target Details : |
| 175 | + ---------------- |
| 176 | + NAMESPACE NAME READY STATUS AGE IP NODE |
| 177 | + openebs pvc-b84f60ae-3f26-4110-a85d-bce7ec00dacc-target-7487cbc8bc5ttzl 3/3 Running 26d22h 172.17.0.7 node1-virtual-machine |
| 178 | + |
| 179 | + Replica Details : |
| 180 | + ----------------- |
| 181 | + NAME TOTAL USED STATUS AGE |
| 182 | + pvc-b84f60ae-3f26-4110-a85d-bce7ec00dacc-default-cstor-disk-dcrm 992 MiB 1.1 GiB Healthy 26d23h |
| 183 | + pvc-b84f60ae-3f26-4110-a85d-bce7ec00dacc-default-cstor-disk-fp6v 992 MiB 1.1 GiB Healthy 26d23h |
| 184 | + pvc-b84f60ae-3f26-4110-a85d-bce7ec00dacc-default-cstor-disk-rhwj 682 MiB 832 MiB Offline 26d23h |
| 185 | + |
| 186 | + Additional Details from CVC : |
| 187 | + ----------------------------- |
| 188 | + NAME : pvc-b84f60ae-3f26-4110-a85d-bce7ec00dacc |
| 189 | + REPLICA COUNT : 3 |
| 190 | + POOL INFO : [default-cstor-disk-dcrm default-cstor-disk-fp6v default-cstor-disk-rhwj] |
| 191 | + VERSION : 2.1.0 |
| 192 | + UPGRADING : true |
| 193 | + ``` |
68 | 194 | ## Contributing |
69 | 195 |
|
70 | 196 | OpenEBS welcomes your feedback and contributions in any form possible. |
71 | 197 |
|
72 | 198 | - [Join OpenEBS community on Kubernetes Slack](https://kubernetes.slack.com) |
73 | | - - Already signed up? Head to our discussions at [#openebs](https://kubernetes.slack.com/messages/openebs/) |
| 199 | + - Already signed up? Head to our discussions at [#openebs](https://kubernetes.slack.com/messages/openebs/) |
74 | 200 | - Want to raise an issue or help with fixes and features? |
75 | | - - See [open issues](https://github.com/openebs/openebs/issues) |
76 | | - - See [contributing guide](./CONTRIBUTING.md) |
77 | | - - See [Project Roadmap](https://github.com/openebs/openebsctl/projects/1) |
78 | | - - Checkout our existing [adopters](https://github.com/openebs/openebs/tree/master/adopters) and their [feedbacks](https://github.com/openebs/openebs/issues/2719). |
79 | | - - Want to join our contributor community meetings, [check this out](https://hackmd.io/mfG78r7MS86oMx8oyaV8Iw?view). |
| 201 | + - See [open issues](https://github.com/openebs/openebs/issues) |
| 202 | + - See [contributing guide](./CONTRIBUTING.md) |
| 203 | + - See [Project Roadmap](https://github.com/openebs/openebsctl/projects/1) |
| 204 | + - Checkout our existing [adopters](https://github.com/openebs/openebs/tree/master/adopters) and their [feedbacks](https://github.com/openebs/openebs/issues/2719). |
| 205 | + - Want to join our contributor community meetings, [check this out](https://hackmd.io/mfG78r7MS86oMx8oyaV8Iw?view). |
80 | 206 | - Join our OpenEBS CNCF Mailing lists |
81 | | - - For OpenEBS project updates, subscribe to [OpenEBS Announcements](https://lists.cncf.io/g/cncf-openebs-announcements) |
82 | | - - For interacting with other OpenEBS users, subscribe to [OpenEBS Users](https://lists.cncf.io/g/cncf-openebs-users) |
| 207 | + - For OpenEBS project updates, subscribe to [OpenEBS Announcements](https://lists.cncf.io/g/cncf-openebs-announcements) |
| 208 | + - For interacting with other OpenEBS users, subscribe to [OpenEBS Users](https://lists.cncf.io/g/cncf-openebs-users) |
83 | 209 |
|
84 | 210 |
|
85 | 211 | For more details checkout [CONTRIBUTING.md](./CONTRIBUTING.md). |
|
0 commit comments