From eb74512021cd99ce973b652b592fc43f094833fe Mon Sep 17 00:00:00 2001 From: Alexander Trost Date: Fri, 25 Oct 2019 09:23:59 +0200 Subject: [PATCH] yugabyte: docs: unified formatting and style This is the first phase YugabyteDB part of three phases to improve and rework the Rook documentation for better user accessibility to the Rook projects and with that the storage providers. Phase two is about automatic generation of CRD documentation and phase three is about reworking the docs themselves and, e.g., examples for CRDs and certain use cases. Signed-off-by: Alexander Trost --- Documentation/yugabytedb-cluster-crd.md | 23 ++++++++++++++--------- Documentation/yugabytedb.md | 13 ++++++++++--- 2 files changed, 24 insertions(+), 12 deletions(-) diff --git a/Documentation/yugabytedb-cluster-crd.md b/Documentation/yugabytedb-cluster-crd.md index 08e4cd41a..2b9b5469b 100644 --- a/Documentation/yugabytedb-cluster-crd.md +++ b/Documentation/yugabytedb-cluster-crd.md @@ -4,7 +4,8 @@ weight: 9000 --- # YugabyteDB Cluster CRD -YugabyteDB clusters can be created/configured by creating/updating the custom resource object `ybclusters.yugabytedb.rook.io`. Please follow instructions in the [YugabyteDB Operator Quikstart](yugabytedb.md) to create a YugabyteDB cluster. +YugabyteDB clusters can be created/configured by creating/updating the custom resource object `ybclusters.yugabytedb.rook.io`. +Please follow instructions in the [YugabyteDB Operator Quikstart](yugabytedb.md) to create a YugabyteDB cluster. The configuration options provided by the custom resource are explained here. @@ -69,27 +70,31 @@ spec: ## Configuration options ### Master/TServer + Master & TServer are two essential components of a YugabyteDB cluster. Master is responsible for recording and maintaining system metadata & for admin activities. TServers are mainly responsible for data I/O. Specify Master/TServer specific attributes under `master`/`tserver`. The valid attributes are `replicas`, `network` & `volumeClaimTemplate`. ### Replica Count + Specify replica count for `master` & `tserver` pods under `replicas` field. This is a **required** field. ### Network + `network` field accepts `NetworkSpec` to be specified which describes YugabyteDB network settings. This is an **optional** field. Default network settings will be used, if any or all of the acceptable values are absent. A ClusterIP service will be created when `yb-tserver-ui` port is explicitly specified. If it is not specified, only StatefulSet & headless service will be created for TServer. ClusterIP service creation will be skipped. Whereas for Master, all 3 kubernetes objects will always be created. The acceptable port names & their default values are as follows: -| Name | Default Value | -| ---- | ------------- | -| yb-master-ui | 7000 | -| yb-master-rpc | 7100 | -| yb-tserver-rpc | 9100 | -| ycql | 9042 | -| yedis | 6379 | -| ysql | 5433 | +| Name | Default Value | +| ---------------- | ------------- | +| `yb-master-ui` | `7000` | +| `yb-master-rpc` | `7100` | +| `yb-tserver-rpc` | `9100` | +| `ycql` | `9042` | +| `yedis` | `6379` | +| `ysql` | `5433` | ### Volume Claim Templates + Specify a `PersistentVolumeClaim` template under the `volumeClaimTemplate` field for `master` & `tserver` each. This is a **required** field. diff --git a/Documentation/yugabytedb.md b/Documentation/yugabytedb.md index 326adc163..b1d90b1ee 100644 --- a/Documentation/yugabytedb.md +++ b/Documentation/yugabytedb.md @@ -5,12 +5,15 @@ indent: true --- # YugabyteDB operator Quikstart + YugaByte DB is a high-performance distributed SQL database (more information [here](https://docs.yugabyte.com/latest/introduction/)). Rook provides an operator that can create and manage YugabyteDB clusters. ## Prerequisites + Follow [these instructions](k8s-pre-reqs.md) to make your kubernetes cluster ready for `Rook`. ## TL;DR + You can create a simple YugabyteDB cluster with below commands. For more detailed instructions, please skip to the [Deploy Rook YugabyteDB Operator](#Deploy-Rook-YugabyteDB-Operator) section. ```console @@ -65,7 +68,8 @@ kubectl -n rook-yugabytedb get pods ## Troubleshooting Skip this section, if the cluster is up & running. Continue to the [Access the Database](#access-the-database) section to access `ysql` api. -
If the cluster does not come up, first run following command to take a look at operator logs. + +If the cluster does not come up, first run following command to take a look at operator logs. ```console kubectl -n rook-yugabytedb-system logs -l app=rook-yugabytedb-operator @@ -85,6 +89,7 @@ After all the pods in YugabyteDB cluster are running, you can access the Yugabyt ```console kubectl -n rook-yugabytedb exec -it yb-tserver-hello-ybdb-cluster-0 /home/yugabyte/bin/ysqlsh -- -h yb-tserver-hello-ybdb-cluster-0 --echo-queries ``` + Refer the [YugabyteDB documentation](https://docs.yugabyte.com/latest/quick-start/explore-ysql/#kubernetes) for more details on the `ysql` api. You can also access the YugabyteDB dashboard using port-forwarding. @@ -93,15 +98,17 @@ You can also access the YugabyteDB dashboard using port-forwarding. kubectl port-forward -n rook-yugabytedb svc/yb-master-ui-hello-ybdb-cluster 7000:7000 ``` -You should now be able to navigate to `127.0.0.1:7000` to visualize your cluster. +> **NOTE**: You should now be able to navigate to `127.0.0.1:7000` to visualize your cluster. ## Cleanup + Run the commands below to clean up all resources created above. -**NOTE:** This will destroy your database and delete all of its data. +> **NOTE**: This will destroy your database and delete all of its data. ```console kubectl delete -f cluster.yaml kubectl delete -f operator.yaml ``` + Manually delete any Persistent Volumes that were created for this YugabyteDB cluster.