Skip to content

Commit 99e1db1

Browse files
authored
CLD-413: Kubernetes EA documentation (#7)
* CLD-413: Kubernetes EA documentation
1 parent 64f396e commit 99e1db1

File tree

1 file changed

+276
-2
lines changed

1 file changed

+276
-2
lines changed

README.md

Lines changed: 276 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,276 @@
1-
# marklogic-k8s-operator
2-
MarkLogic's Kubernetes Solutions
1+
# MarkLogic Kubernetes Helm Chart
2+
3+
- [MarkLogic Kubernetes Helm Chart](#marklogic-kubernetes-helm-chart)
4+
- [Introduction](#introduction)
5+
- [Prerequisites](#prerequisites)
6+
- [Set up the required tools](#set-up-the-required-tools)
7+
- [Helm](#helm)
8+
- [Kubectl](#kubectl)
9+
- [Set up the Kubernetes Cluster](#set-up-the-kubernetes-cluster)
10+
- [Local Development MiniKube](#local-development-minikube)
11+
- [Production Workload: AWS EKS](#production-workload-aws-eks)
12+
- [Install eksctl](#install-eksctl)
13+
- [Using eksctl to provision Kubernetes cluster on EKS](#using-eksctl-to-provision-kubernetes-cluster-on-eks)
14+
- [Suggestions for Naming](#suggestions-for-naming)
15+
- [Install Marklogic Helm Chart](#install-marklogic-helm-chart)
16+
- [Add Marklogic Repo](#add-marklogic-repo)
17+
- [Installing the Chart](#installing-the-chart)
18+
- [Configuration Options](#configuration-options)
19+
- [--values](#--values)
20+
- [--set](#--set)
21+
- [Uninstalling the Chart](#uninstalling-thechart)
22+
- [Parameters](#parameters)
23+
24+
# Introduction
25+
26+
MarkLogic Server is a multi-model database that has both NoSQL and trusted enterprise data management capabilities. It is the most secure multi-model database.
27+
28+
This custom Helm Chart deploys MarkLogic Server on Kubernetes using Helm.
29+
30+
# Prerequisites
31+
32+
## Set up the required tools
33+
34+
### Helm
35+
36+
Helm is a Kubernetes package manager that makes it easy to install MarkLogic on Kubernetes.
37+
38+
To install Helm, follow the steps described in: https://helm.sh/docs/intro/install/
39+
40+
Verify the installation with this command:
41+
42+
```
43+
helm -h
44+
```
45+
46+
If Helm is installed correctly, you will see the Helm user manual.
47+
48+
If Helm is not installed correctly, you will see the error: `command not found: helm`
49+
50+
### Kubectl
51+
52+
Kubectl is a command line tool that serves as a client, to connect to a Kubernetes cluster.
53+
54+
To install Kubectl, follow the steps at: https://kubernetes.io/docs/tasks/tools/
55+
56+
To verify the Kubectl installation, use this command:
57+
58+
```
59+
kubectl -h
60+
```
61+
If Kubectl is installed correctly, you will see the the Kubectl user manual.
62+
63+
If kubectl is not installed correctly, you will see the error: `command not found: kubectl`
64+
65+
## Set up the Kubernetes Cluster
66+
67+
### Local Development MiniKube
68+
69+
For local development, you will want to set up MiniKube. See the set up instructions here: [MiniKube Setup Guide](docs/Local_Development_Tutorial.md)
70+
71+
### Production Workload: AWS EKS
72+
73+
For production workload development, you will want to use a cloud platform.
74+
75+
EKS is a managed Kubernetes platform provided by AWS. The eksctl tool is a simple way to bring up a Kubernetes cluster on EKS.
76+
77+
#### Install eksctl
78+
79+
To install eksctl, follow the steps described here: https://docs.aws.amazon.com/eks/latest/userguide/eksctl.html
80+
81+
#### Using eksctl to provision Kubernetes cluster on EKS
82+
83+
The following eksctl code can be used to create a Kubernetes cluster in EKS. You will need to replace CLUSTER_NAME, KUBERNETES_VERSION, REGION, NODEGROUP_NAME, NODE_TYPE and NUMBER_OF_NODES based on your configuration.
84+
85+
```
86+
eksctl create cluster \
87+
--name CLUSTER_NANE \
88+
--version KUBERNETES_VERSION \
89+
--region REGION \
90+
--nodegroup-name NODEGROUP_NAME \
91+
--node-type NODE_TYPE \
92+
--nodes NUMBER_OF_NODES
93+
```
94+
95+
#### Suggestions for Naming
96+
97+
* CLUSTER_NAME: Choose a distinctive cluster name.
98+
* KUBERNETES_VERSION: For now, we only support the latest version of Kubernetes in EKS, which is 1.21.
99+
* NODEGROUP_NAME: Choose a distinctive node group name.
100+
* NODE_TYPE: The recommendation from our performance team is to use the r5.large node type for development purposes.
101+
* NUMBER_OF_NODES: Total number of nodes running not only Marklogic database, but also nodes running other applications.
102+
103+
# Install Marklogic Helm Chart
104+
105+
## Add Marklogic Repo
106+
107+
If you haven’t already, add the MarkLogic official repo to Helm using this command:
108+
109+
```
110+
helm repo add marklogic https://github.com/marklogic/marklogic-kubernetes
111+
```
112+
113+
The output will look like this:
114+
115+
```
116+
"marklogic" has been added to your repositories
117+
```
118+
119+
Use this command to verify that the repo has been added to Helm:
120+
121+
```
122+
helm repo list
123+
```
124+
125+
You should see an entry like this:
126+
127+
`marklogic https://github.com/marklogic/marklogic-kubernetes`
128+
129+
Use this command to ensure the Helm repo is up to date:
130+
131+
```
132+
helm repo update
133+
```
134+
135+
## Installing the Chart
136+
137+
Use this command to install MarkLogic Chart to the current namespace with default settings:
138+
139+
```
140+
helm install my-release marklogic/marklogic --version=1.0.0-ea1
141+
```
142+
143+
After you install MarkLogic Chart, the output will look like this:
144+
145+
```
146+
NAME: my-release
147+
LAST DEPLOYED:
148+
NAMESPACE: default
149+
STATUS: deployed
150+
REVISION: 1
151+
```
152+
153+
**Note:** --version=1.0.0-ea1 must be provided as part of the name. You can choose a distinctive release name to replace "my-release".
154+
155+
We strongly recommend that you deploy MarkLogic Chart in an exclusive namespace. Use the `--create-namespace` flag if the namespace has not already been created:
156+
157+
```
158+
helm install my-release marklogic/marklogic --version=1.0.0-ea1 --namespace=marklogic --create-namespace
159+
```
160+
161+
Use this command to verify the deployment:
162+
163+
```
164+
helm list --all-namespaces
165+
```
166+
167+
You should see an entry named "my-release" (or the release name you chose) with a status of "deployed".
168+
169+
## Configuration Options
170+
171+
This section describes the configuration options you can use with Helm. 
172+
173+
### --values
174+
175+
The `--values` flag points to a YAML file. The values in the file will override the default Helm values.
176+
177+
Use this command to view the default configurable values:
178+
179+
```
180+
helm show values marklogic/marklogic --version=1.0.0-ea1
181+
```
182+
183+
To configure a different value for your installation, create a `values.yaml` file.
184+
185+
For example, if you want to set the credential for Docker Hub, configure the `values.yaml` file like this:
186+
187+
```
188+
imagePullSecret:
189+
registry: "https://index.docker.io/v1/"
190+
username: YOUR_USERNAME
191+
 password: YOUR_PASSWORD
192+
```
193+
194+
Use the following command to install MarkLogic with the `values.yaml` file you just created.
195+
196+
```
197+
helm install my-release marklogic/marklogic --version=1.0.0-ea1 --values values.yaml
198+
```
199+
200+
### --set
201+
202+
Use the `--set` flag to make one or more configuration changes directly:
203+
204+
```
205+
helm install my-release marklogic/marklogic --version=1.0.0-ea1 \
206+
--set imagePullSecret.registry="https://index.docker.io/v1/" \
207+
--set imagePullSecret.username=YOUR_USERNAME \
208+
--set imagePullSecret.password=YOUR_PASSWORD
209+
```
210+
211+
We recommend that you use the `values.yaml` file for configuring your installation.
212+
213+
# Uninstalling the Chart
214+
215+
Use this Helm command to uninstall the chart:
216+
217+
```
218+
helm delete my-release
219+
```
220+
221+
The output will look like this:
222+
223+
```
224+
release "my-release" uninstalled
225+
```
226+
227+
Use this command to verify that the uninstall was successful:
228+
229+
```
230+
helm list --all-namespaces
231+
```
232+
You should not see an entry named "my-release" (or the release name you chose).
233+
234+
# Parameters
235+
236+
This table describes the list of available parameters for Helm Chart.
237+
238+
| Name | Description | Default Value |
239+
| ------------------------------------ | -------------------------------------------------------------------------------------------------------------- | ------------------------------------ |
240+
| `replicaCount` | Number of MarkLogic Nodes | `1` |
241+
| `image.repository` | repository for MarkLogic image | `store/marklogicdb/marklogic-server` |
242+
| `image.tag` | Image tag for MarkLogic | `10.0-9-centos-1.0.0-ea4` |
243+
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
244+
| `imagePullSecret.registry` | Registry of the imagePullSecret | `""` |
245+
| `imagePullSecret.username` | Username of the imagePullSecret | `""` |
246+
| `imagePullSecret.password` | Password of the imagePullSecret | `""` |
247+
| `nameOverride` | String to override the app name | `""` |
248+
| `auth.adminUsername` | Username for default MarkLogic Administrator | `admin` |
249+
| `auth.adminPassword` | Password for default MarkLogic Administrator | `admin` |
250+
| `serviceAccount.create` | Enable this parameter to create a service account for a MarkLogic Pod | `true` |
251+
| `serviceAccount.annotations` | Annotations for MarkLogic service account | `{}` |
252+
| `serviceAccount.name` | Name of the serviceAccount | `""` |
253+
| `livenessProbe.enabled` | Enable this parameter to enable the liveness probe | `true` |
254+
| `livenessProbe.initialDelaySeconds` | Initial delay seconds for liveness probe | `30` |
255+
| `livenessProbe.periodSeconds` | Period seconds for liveness probe | `60` |
256+
| `livenessProbe.timeoutSeconds` | Timeout seconds for liveness probe | `5` |
257+
| `livenessProbe.failureThreshold` | Failure threshold for liveness probe | `3` |
258+
| `livenessProbe.successThreshold` | Success threshold for liveness probe | `1` |
259+
| `readinessProbe.enabled` | Use this parameter to enable the readiness probe | `true` |
260+
| `readinessProbe.initialDelaySeconds` | Initial delay seconds for readiness probe | `10` |
261+
| `readinessProbe.periodSeconds` | Period seconds for readiness probe | `60` |
262+
| `readinessProbe.timeoutSeconds` | Timeout seconds for readiness probe | `5` |
263+
| `readinessProbe.failureThreshold` | Failure threshold for readiness probe | `3` |
264+
| `readinessProbe.successThreshold` | Success threshold for readiness probe | `1` |
265+
| `startupProbe.enabled` | Parameter to enable startup probe | `true` |
266+
| `startupProbe.initialDelaySeconds` | Initial delay seconds for startup probe | `10` |
267+
| `startupProbe.periodSeconds` | Period seconds for startup probe | `20` |
268+
| `startupProbe.timeoutSeconds` | Timeout seconds for startup probe | `1` |
269+
| `startupProbe.failureThreshold` | Failure threshold for startup probe | `30` |
270+
| `startupProbe.successThreshold` | Success threshold for startup probe | `1` |
271+
| `persistence.enabled` | Enable MarkLogic data persistence using Persistence Volume Claim (PVC). If set to false, EmptyDir will be used | `true` |
272+
| `persistence.storageClass` | Storage class for MarkLogic data volume, leave empty to use the default storage class | `""` |
273+
| `persistence.size` | Size of storage request for MarkLogic data volume | `10Gi` |
274+
| `persistence.annotations` | Annotations for Persistence Volume Claim (PVC) | `{}` |
275+
| `persistence.accessModes` | Access mode for persistence volume | `["ReadWriteOnce"]` |
276+
| `persistence.mountPath` | The path for the mounted persistence data volume | `/var/opt/MarkLogic` |

0 commit comments

Comments
 (0)