Skip to content

Commit 355aa1c

Browse files
authored
CLD-413: Document update for EA1 release (#15)
* fix test failure * CLD-413: add parameters and how to access marklogic section in README * README review update * change README as per review * change README base on review
1 parent e92b852 commit 355aa1c

File tree

3 files changed

+100
-9
lines changed

3 files changed

+100
-9
lines changed

README.md

Lines changed: 97 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
- [Configuration Options](#configuration-options)
1919
- [--values](#--values)
2020
- [--set](#--set)
21+
- [Access the MarkLogic Server](#access-the-marklogic-server)
22+
- [Service](#service)
23+
- [Get the ClusterIP Service Name](#get-the-clusterip-service-name)
24+
- [Using the Service DNS Record to Access MarkLogic](#using-the-service-dns-record-to-access-marklogic)
25+
- [Port Forward](#port-forward)
26+
- [Forward to Pod](#forward-to-pod)
27+
- [Forward to Service](#forward-to-service)
28+
- [Notice](#notice)
2129
- [Uninstalling the Chart](#uninstalling-thechart)
2230
- [Parameters](#parameters)
2331

@@ -210,6 +218,80 @@ helm install my-release marklogic/marklogic --version=1.0.0-ea1 \
210218

211219
We recommend that you use the `values.yaml` file for configuring your installation.
212220

221+
# Access the MarkLogic Server
222+
223+
## Service
224+
225+
You can use the ClusterIP service to access MarkLogic within the Kubernetes cluster.
226+
227+
### Get the ClusterIP Service Name
228+
229+
Use the following command to get a list of Kubernetes services:
230+
231+
```
232+
kubectl get services
233+
```
234+
235+
The output will look like this: (the actual names may be different)
236+
237+
```
238+
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
239+
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 1d
240+
marklogic ClusterIP 10.109.182.205 <none> 8000/TCP,8002/TCP 1d
241+
marklogic-headless ClusterIP None <none> 7997/TCP,7998/TCP,7999/TCP,8000/TCP,8001/TCP,8002/TCP 1d
242+
```
243+
244+
The service you are looking for is the one ending with "marklogic" and where the CLUSTER-IP is not None. In the example above, "marklogic" is the service name for the ClusterIP service.
245+
246+
### Using the Service DNS Record to Access MarkLogic
247+
248+
For each Kubernetes service, a DNS with the following format is created:
249+
250+
```
251+
<service-name>.<namespace-name>.svc.cluster.local
252+
```
253+
254+
For example, if the service-name is "marklogic" and namespace-name is "default", the DNS URL to access the MarkLogic cluster is "marklogic.default.svc.cluster.local".
255+
256+
## Port Forward
257+
258+
The `kubectl port-forward` command can help you access MarkLogic outside of the Kubernetes cluster. Use the service to access a specific pod, or the whole cluster.
259+
### Forward to Pod
260+
261+
To access each pod directly, use the `kubectl port-forward` command using the following format:
262+
263+
```
264+
kubectl port-forward <POD-NAME> <LOCAL-PORT>:<CONTAINER-PORT>
265+
```
266+
267+
For example, run this command to forward ports 8000 and 8001 from marklogic-0 pod to localhost:
268+
269+
```
270+
kubectl port-forward marklogic-0 8000:8000 8001:8001
271+
```
272+
273+
This pod can now be accessed via http://localhost:8001.
274+
275+
### Forward to Service
276+
277+
To access the whole cluster, use the `kubectl port-forward` command with the following format:
278+
279+
```
280+
kubectl port-forward svc/<SERVICE-NAME> <LOCAL-PORT>:<CONTAINER-PORT>
281+
```
282+
283+
For example, run this command to forward ports 8000 from marklogic service to localhost:
284+
285+
```
286+
kubectl port-forward svc/marklogic 8000:8000
287+
```
288+
289+
This pod can now be accessed via http://localhost:8001.
290+
291+
## Notice
292+
293+
To use transactional functionality with MarkLogic, you have to set up Ingress and configure cookie-based session affinity. This function will be supported in a future release.
294+
213295
# Uninstalling the Chart
214296

215297
Use this Helm command to uninstall the chart:
@@ -244,9 +326,24 @@ This table describes the list of available parameters for Helm Chart.
244326
| `imagePullSecret.registry` | Registry of the imagePullSecret | `""` |
245327
| `imagePullSecret.username` | Username of the imagePullSecret | `""` |
246328
| `imagePullSecret.password` | Password of the imagePullSecret | `""` |
329+
| `resources.limits` | The resource limits for MarkLogic container | `{}` |
330+
| `resources.requests` | The resource requests for MarkLogic container | `{}` |
247331
| `nameOverride` | String to override the app name | `""` |
248332
| `auth.adminUsername` | Username for default MarkLogic Administrator | `admin` |
249333
| `auth.adminPassword` | Password for default MarkLogic Administrator | `admin` |
334+
| `affinity` | Affinity property for pod assignment | `{}` |
335+
| `nodeSelector` | nodeSelector property for pod assignment | `{}` |
336+
| `persistence.enabled` | Enable MarkLogic data persistence using Persistence Volume Claim (PVC). If set to false, EmptyDir will be used | `true` |
337+
| `persistence.storageClass` | Storage class for MarkLogic data volume, leave empty to use the default storage class | `""` |
338+
| `persistence.size` | Size of storage request for MarkLogic data volume | `10Gi` |
339+
| `persistence.annotations` | Annotations for Persistence Volume Claim (PVC) | `{}` |
340+
| `persistence.accessModes` | Access mode for persistence volume | `["ReadWriteOnce"]` |
341+
| `persistence.mountPath` | The path for the mounted persistence data volume | `/var/opt/MarkLogic` |
342+
| `extraVolumes` | Extra list of additional volumes for MarkLogic statefulset | `[]` |
343+
| `extraVolumeMounts` | Extra list of additional volumeMounts for MarkLogic container | `[]` |
344+
| `extraContainerPorts` | Extra list of additional containerPorts for MarkLogic container | `[]` |
345+
| `service.type` | type of the default service | `ClusterIP` |
346+
| `service.ports` | ports of the default service | `[8000, 8002]` |
250347
| `serviceAccount.create` | Enable this parameter to create a service account for a MarkLogic Pod | `true` |
251348
| `serviceAccount.annotations` | Annotations for MarkLogic service account | `{}` |
252349
| `serviceAccount.name` | Name of the serviceAccount | `""` |
@@ -268,9 +365,3 @@ This table describes the list of available parameters for Helm Chart.
268365
| `startupProbe.timeoutSeconds` | Timeout seconds for startup probe | `1` |
269366
| `startupProbe.failureThreshold` | Failure threshold for startup probe | `30` |
270367
| `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` |

test/e2e/e2e.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ echo "=====Installing minikube cluster"
77
minikube start --driver=docker -n=1
88

99
echo "=====Loading marklogc images to minikube cluster"
10-
minikube image load store/marklogicdb/marklogic-server:10.0-9-centos-1.0.0-ea4
10+
minikube image load marklogicdb/marklogic-db:10.0-9.1-centos-1.0.0-ea4
1111

1212
echo "=====Running tests"
13-
go test -v ./test/e2e/...
13+
go test -v -count=1 ./test/e2e/...

test/e2e/e2e_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func TestHelmInstall(t *testing.T) {
4242
helm.Install(t, options, helmChartPath, releaseName)
4343

4444
tlsConfig := tls.Config{}
45-
podName := "marklogic-0"
45+
podName := "marklogic-test-0"
4646
// wait until the pod is in Ready status
4747
k8s.WaitUntilPodAvailable(t, kubectlOptions, podName, 10, 10*time.Second)
4848
tunnel := k8s.NewTunnel(

0 commit comments

Comments
 (0)