Skip to content

Commit 5d6da80

Browse files
Daniel WasserlaufDaniel Wasserlauf
authored andcommitted
feature/cld-421: fixed documentation from peer review
1 parent 3ac6ee8 commit 5d6da80

File tree

1 file changed

+34
-26
lines changed

1 file changed

+34
-26
lines changed

docs/Local_Development_Tutorial.md

Lines changed: 34 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
* [Introduction](#Introduction)
55
* [Prerequisites](##Prerequisites)
66
* [Procedure](#Procedure)
7-
* [Setting Up minikube](##Setting-Up-minikube)
8-
* [Installing MarkLogic to minikube](##Installing-a-Single-MarkLogic-Host-to-Minikube)
7+
* [Setting Up Minikube](##Setting-Up-Minikube)
8+
* [Installing MarkLogic to Minikube](##Installing-a-Single-MarkLogic-Host-to-Minikube)
99
* [Verifying the Installation](##Verifying-the-Installation)
1010
* [Debugging](#Debugging)
1111
* [Cleanup](#Cleanup)
@@ -15,8 +15,8 @@ This tutorial describes how to set up local Kubernetes development environment w
1515
- Set up the prerequisites necessary for local development using MarkLogic Server in Kubernetes
1616
- How to run Minikube and load MarkLogic Server into the Kubernetes cluster
1717
- Access the MarkLogic Server cluster
18-
- How to Debug the Kubernetes environment
19-
- How to Clean up your environment
18+
- How to debug the Kubernetes environment
19+
- How to clean up your environment
2020

2121

2222
## Prerequisites
@@ -28,12 +28,12 @@ The following steps assume you are running this tutorial from a desktop environm
2828
docker pull store/marklogicdb/marklogic-server:10.0-9-centos-1.0.0-ea4
2929
```
3030
- [KubeCTL](https://kubernetes.io/docs/tasks/tools/)
31-
- Download and install this tool to assit with debugging in a Kubernetes environment.
31+
- Download and install this tool to assist with debugging in a Kubernetes environment.
3232
- [HELM](https://helm.sh/docs/intro/install/)
3333
- Clone or download the chart repository: https://github.com/marklogic/marklogic-kubernetes
3434
- [Minikube](https://k8s-docs.netlify.app/en/docs/tasks/tools/install-minikube/)
3535
- If you are running on Mac OSX, you will need Virtual Box: [Virtual Box](https://www.virtualbox.org/)
36-
- Virtual Box is used as the VM for the Minikube Kubernetes environment which will host the MarkLogic Server Application
36+
- Virtual Box is used as the VM for the Minikube Kubernetes environment, which will host the MarkLogic Server Application.
3737
- The latest version of a supported web browser. See the list here: [Web Browser](https://developer.marklogic.com/products/support-matrix/)
3838

3939

@@ -42,12 +42,15 @@ This section describes the procedure for setting up Minikube, installing MarkLog
4242

4343

4444
## Setting Up Minikube
45-
First we need to setup the Kubernetes control plane on our local machine, Minikube is an easy tool which handles setting up a Kubernetes enviornment locally.
45+
First you will need to set up the Kubernetes control plan on your local machine. Minikube is a tool that makes it easy to set up a local Kubernetes enviornment.
4646

47-
- Start Minikube: `minikube start --driver=virtualbox`
48-
- If you are running in a Linux OS: `minikube start --driver=docker`
49-
To verify the minikube started correctly we can use the Kubernetes command line tool, KubeCTL:
50-
```sh
47+
- Start Minikube:
48+
`minikube start --driver=virtualbox`
49+
- If you are running in a Linux OS: `minikube start --driver=docker`
50+
51+
To verify the Minikube started correctly, use the Kubernetes command line tool, KubeCTL:
52+
53+
``sh
5154
kubectl get nodes
5255
```
5356
```
@@ -56,10 +59,13 @@ NAME STATUS ROLES AGE VERSION
5659
minikube Ready control-plane,master 1d v1.23.3
5760
```
5861
59-
- Enable Addons: `minikube addons enable ingress` for ingress.
60-
## Installing a Single MarkLogic Host to minikube
61-
- Push the image used for MarkLogic Server to the VM: `minikube image load store/marklogicdb/marklogic-server:10.0-9-centos-1.0.0-ea4`
62-
- The above Image ID: `store/marklogicdb/marklogic-server:10.0-9-centos-1.0.0-ea4` is whatever the latest image is, to find the latest id go to https://hub.docker.com/_/marklogic
62+
- Enable Addons:
63+
`minikube addons enable ingress`
64+
for ingress.
65+
## Installing a Single MarkLogic Host to Minikube
66+
- Push the image used for MarkLogic Server to the VM:
67+
`minikube image load store/marklogicdb/marklogic-server:10.0-9-centos-1.0.0-ea4`
68+
- For the image ID in this example,`store/marklogicdb/marklogic-server:10.0-9-centos-1.0.0-ea4` is what the latest image is. To find the latest id go to https://hub.docker.com/_/marklogic
6369
- Navigate to where you downloaded or cloned the MarkLogic Helm repository.
6470
- Verify that the image loaded to Minikube with the comand above matches the `repository` and `tag` in the `values.yaml`.
6571
```YAML
@@ -68,7 +74,8 @@ minikube Ready control-plane,master 1d v1.23.3
6874
tag: 10.0-9-centos-1.0.0-ea4
6975
```
7076
- Navigate to the `/charts` folder in your local directory.
71-
- Run `helm install RELEASE_NAME .` where the `RELEASE_NAME` can be any name you want to use to identify this deployment. For example: `helm install marklogic-local-dev-env .`.
77+
- Run `helm install RELEASE_NAME .` where the `RELEASE_NAME` can be any name you want to use to identify this deployment.
78+
For example: `helm install marklogic-local-dev-env .`.
7279
## Installing Multiple MarkLogic Hosts to Minikube
7380
TODO
7481

@@ -87,7 +94,7 @@ This process may take a minute or two.
8794
```sh
8895
kubectl port-forward marklogic-0 8001 8000 7997
8996
```
90-
If you want to forward other ports just append them to the command separated by a space
97+
If you want to forward other ports, just append them to the command separated by a space.
9198
For example:
9299

93100
```sh
@@ -96,9 +103,9 @@ kubectl port-forward marklogic-0 8001 8000 7997 7996
96103

97104

98105
- To complete this step, access your browser and navigate to `localhost:8001`. You should see the MarkLogic Server Admin interface.
99-
If you are unable to see the MarkLogic Server Admin Interface, see the Debugging section to gather more information about the cluster and potential errors.
106+
If you are unable to see the MarkLogic Server Admin interface, see the [Debugging](#Debugging) section to gather more information about the cluster and potential errors.
100107

101-
- When you are finished, see the [Cleanup](##Cleanup) section in order to teardown the cluster when finished
108+
- When you are done, see the [Cleanup](##Cleanup) section in order to teardown the cluster when done.
102109

103110
# Debugging
104111
This Debugging section contains useful commands to help debug a Kubernetes cluster running MarkLogic Server. Additional information and commands can be found here: https://kubernetes.io/docs/tasks/debug-application-cluster/debug-running-pod/
@@ -109,7 +116,7 @@ This command provides additional information about the state of each pod in the
109116
kubectl describe pods
110117
```
111118
The command outputs a large amount of data and contains a lot of information. Pay attention to the events section near the bottom of the output to view the state of events, and what occurred during the startup of the pod.
112-
EX:
119+
For Example:
113120

114121
```
115122
...
@@ -126,13 +133,13 @@ Events:
126133

127134
-----
128135

129-
Run the following command to see the logs on a specific pod:
136+
Run the following command to see the logs for a specific pod:
130137
```sh
131138
kubectl logs {POD_NAME}
132139
```
133140
The `{POD_NAME}` can be found with the `kubectl get pods` command.
134141

135-
Example Output:
142+
Example output:
136143

137144
```
138145
2022-03-28 16:53:00.127 Info: Memory 4% phys=5812 size=536(9%) rss=275(4%) anon=205(3%) file=9(0%) forest=853(14%) cache=1920(33%) registry=1(0%)
@@ -143,23 +150,24 @@ Example Output:
143150

144151
-----
145152

146-
Run the following command to see the logs on a specific pod :
153+
Run the following command to see the logs for a specific pod :
147154

148155
```sh
149156
kubectl exec --stdin --tty {POD_NAME} -- /bin/bash
150157
```
151158
The `{POD_NAME}` can be found with the `kubectl get pods` command.
152159

153-
For Example:
160+
For example:
154161
```sh
155162
> kubectl exec --stdin --tty marklogic-0 -- /bin/bash
156163
[marklogic_user@marklogic-0 /]$
157164
```
158165

159166
# Cleanup
160167
To cleanup a running kubernetes cluster, run the following commands:
161-
- `helm uninstall <deployment_name>`
162-
For Example: `helm uninstall marklogic-local-dev-env`
168+
- `helm uninstall <deployment_name>`
169+
For Example:
170+
`helm uninstall marklogic-local-dev-env`
163171
- `minikube delete`
164172

165173

0 commit comments

Comments
 (0)