Skip to content

Commit 3ac6ee8

Browse files
Daniel WasserlaufDaniel Wasserlauf
authored andcommitted
feature/cld-421: readme updates and changes
1 parent 5eceb4c commit 3ac6ee8

File tree

1 file changed

+50
-38
lines changed

1 file changed

+50
-38
lines changed

docs/Local_Development_Tutorial.md

Lines changed: 50 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -11,37 +11,42 @@
1111
* [Cleanup](#Cleanup)
1212

1313
# Introduction
14-
This tutorial serves as a guide for local development setup with Minikube and MarkLogic. These tasks are covered in this guild:
15-
- Setting up the necessary prerequisites for local MarkLogic in Kubernetes development
16-
- How to run Minikube and load MarkLogic into the cluster
17-
- How to Access the MarkLogic cluster
18-
- How to Debug the environment
19-
- How to Clean up
14+
This tutorial describes how to set up local Kubernetes development environment with Minikube and MarkLogic Server. It covers these tasks:
15+
- Set up the prerequisites necessary for local development using MarkLogic Server in Kubernetes
16+
- How to run Minikube and load MarkLogic Server into the Kubernetes cluster
17+
- Access the MarkLogic Server cluster
18+
- How to Debug the Kubernetes environment
19+
- How to Clean up your environment
2020

2121

2222
## Prerequisites
23-
The following assumes you are running this tutorial from a desktop environment, mobile environments will likely experience problems and may not work
23+
The following steps assume you are running this tutorial from a desktop environment. Mobile environments will likely experience problems and may not work.
2424
- [Docker](https://docs.docker.com/engine/install/)
25-
- Subscribe and pulldown the latest image from: https://hub.docker.com/_/marklogic
25+
- Subscribe to Docker Hub and pulldown the latest image from: https://hub.docker.com/_/marklogic
2626
```sh
2727
# Something similar to this, with the latest version tag, which can be found on the dockerhub link above
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.
3132
- [HELM](https://helm.sh/docs/intro/install/)
3233
- Clone or download the chart repository: https://github.com/marklogic/marklogic-kubernetes
3334
- [Minikube](https://k8s-docs.netlify.app/en/docs/tasks/tools/install-minikube/)
34-
- If running on Mac OSX: [Virtual Box](https://www.virtualbox.org/)
35-
- A supported [Web Browser](https://developer.marklogic.com/products/support-matrix/)
35+
- 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
37+
- The latest version of a supported web browser. See the list here: [Web Browser](https://developer.marklogic.com/products/support-matrix/)
3638

3739

3840
# Procedure
39-
Below is the procedure for setting up Minikube, installing MarkLogic, and verifying the installation.
41+
This section describes the procedure for setting up Minikube, installing MarkLogic Server, and verifying the installation.
4042

41-
## Setting Up minikube
42-
- Start minikube: `minikube start --driver=virtualbox`
43-
- If running in Linux: `minikube start --driver=docker`
44-
To verify the minikube started correctly run the following command:
43+
44+
## 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.
46+
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:
4550
```sh
4651
kubectl get nodes
4752
```
@@ -51,53 +56,59 @@ NAME STATUS ROLES AGE VERSION
5156
minikube Ready control-plane,master 1d v1.23.3
5257
```
5358

54-
- Enable Addons: `minikube addons enable ingress` for ingress
59+
- Enable Addons: `minikube addons enable ingress` for ingress.
5560
## Installing a Single MarkLogic Host to minikube
56-
- Push the image used for ML to the VM: `minikube image load store/marklogicdb/marklogic-server:10.0-9-centos-1.0.0-ea4`
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`
5762
- 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
58-
- Navigate to where you downloaded or cloned the MarkLogic helm repository
59-
- Verify the image loaded to minikube above matches the `repository` and `tag` in the `values.yaml`
63+
- Navigate to where you downloaded or cloned the MarkLogic Helm repository.
64+
- Verify that the image loaded to Minikube with the comand above matches the `repository` and `tag` in the `values.yaml`.
6065
```YAML
6166
image:
6267
repository: store/marklogicdb/marklogic-server
6368
tag: 10.0-9-centos-1.0.0-ea4
6469
```
65-
- Navigate to the `/charts` folder
66-
- Run `helm install RELEASE_NAME .` Where the `RELEASE_NAME` can be anything you want to identify this deployment EX: `helm install marklogic-local-dev-env .`
70+
- 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 .`.
6772
## Installing Multiple MarkLogic Hosts to Minikube
6873
TODO
6974

7075
## Verifying the Installation
71-
- After the installation, verify the status of the deployment to the cluster with:
76+
- After the installation is complete, verify the status of the deployment to the cluster with this command:
7277
```sh
7378
kubectl get pods --watch
7479
```
7580
and wait for the following output:
7681
```
7782
marklogic-0 1/1 Running 0 55s
7883
```
79-
It may take a minute or two.
84+
This process may take a minute or two.
8085

81-
- Port forward requests to the cluster in order to access it from `localhost` with the following command:
86+
- You will need to port forward requests to the cluster in order to access MarkLogic Server from `localhost`. Port forwarding can be achieved with the following command:
8287
```sh
8388
kubectl port-forward marklogic-0 8001 8000 7997
8489
```
85-
- If you want to forward other ports just append them to the command separated by a space
90+
If you want to forward other ports just append them to the command separated by a space
91+
For example:
92+
93+
```sh
94+
kubectl port-forward marklogic-0 8001 8000 7997 7996
95+
```
96+
8697

87-
- Finally access your browser and navigate to `localhost:8001` and you should see the MarkLogic Server Admin Interface
88-
- If you're unable to see the MarkLogic Server Admin Interface interface proceed to the debugging section to gather more information on the cluster and potential errors.
98+
- 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.
89100

90-
- Proceed to the [Cleanup](##Cleanup) section in order to teardown the cluster when finished
101+
- When you are finished, see the [Cleanup](##Cleanup) section in order to teardown the cluster when finished
91102

92103
# Debugging
93-
The 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/
104+
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/
94105

95-
The below command gives additional information on the state of each pod in a cluster
106+
This command provides additional information about the state of each pod in the cluster.
96107

97108
```sh
98109
kubectl describe pods
99110
```
100-
The output of this command is large and contains a lot of information pay attention to the bottom events section to see the state of events and what occurred during the startup of the pod.
111+
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.
101112
EX:
102113

103114
```
@@ -111,11 +122,11 @@ Events:
111122
Normal Started 13m kubelet Started container marklogic
112123
Warning Unhealthy 13m kubelet Startup probe failed: ls: cannot access /var/opt/MarkLogic/ready: No such file or directory
113124
```
114-
Note here it's ok that the startup probe failed once, the probe will poll a few times.
125+
**Note:** It is OK that the startup probe failed once. The probe will poll a few times.
115126

116127
-----
117128

118-
To get the logs on a pod run the following:
129+
Run the following command to see the logs on a specific pod:
119130
```sh
120131
kubectl logs {POD_NAME}
121132
```
@@ -132,22 +143,23 @@ Example Output:
132143

133144
-----
134145

135-
To get local access to a pod you can run the following:
146+
Run the following command to see the logs on a specific pod :
136147

137148
```sh
138149
kubectl exec --stdin --tty {POD_NAME} -- /bin/bash
139150
```
140-
The `{POD_NAME}` can be found with the `kubectl get pods` command
151+
The `{POD_NAME}` can be found with the `kubectl get pods` command.
141152

142-
EX:
153+
For Example:
143154
```sh
144155
> kubectl exec --stdin --tty marklogic-0 -- /bin/bash
145156
[marklogic_user@marklogic-0 /]$
146157
```
147158

148159
# Cleanup
149-
To cleanup a running cluster run the following commands
150-
- `helm uninstall <deployment_name>` EX: `helm uninstall marklogic-local-dev-env`
160+
To cleanup a running kubernetes cluster, run the following commands:
161+
- `helm uninstall <deployment_name>`
162+
For Example: `helm uninstall marklogic-local-dev-env`
151163
- `minikube delete`
152164

153165

0 commit comments

Comments
 (0)