Skip to content

Commit 6abfd98

Browse files
authored
Merge branch 'develop' into feature/CLD-568
2 parents 08d38c3 + c416bc5 commit 6abfd98

File tree

4 files changed

+218
-40
lines changed

4 files changed

+218
-40
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,23 @@ kubectl logs pod/terminated-host-pod-name
294294
```
295295

296296
If you are permanently removing the host from the MarkLogic cluster, once the pod is terminated, follow standard MarkLogic administrative procedures using the administrative UI or APIs to remove the MarkLogic host from the cluster. Also, because Kubernetes keeps the Persistent Volume Claims and Persistent Volumes around until they are explicitly deleted, you must manually delete them using the Kubernetes APIs before attempting to scale the hosts in the StatefulSet back up again.
297+
298+
## Deploying a MarkLogic Cluster with Multiple Groups
299+
300+
To deploy a MarkLogic cluster with multiple groups (separate E and D nodes for example) the `bootstrapHostName` and `group.name` must be configured in values.yaml or set the values provided for these configurations using the `--set` flag while installing helm charts.
301+
For example, if you want to create a MarkLogic cluster with three nodes in a "dnode" group and two nodes in an "enode" group, start with the following helm command:
302+
303+
```
304+
helm install dnode-group ./charts/ --set group.name=dnode --set replicaCount=3
305+
```
306+
Once this deployment is complete, a MarkLogic cluster with three hosts should be running.
307+
To add the "enode" group and nodes to the cluster, the `bootstrapHostName` must be set to join the existing MarkLogic cluster. The first host in the other group can be used. For this example, set `bootstrapHostName` to `dnode-group-marklogic-0.dnode-group-marklogic-headless.default.svc.cluster.local` with the following command:
308+
309+
```
310+
helm install enode-group ./charts/ --set group.name=enode --set replicaCount=2 --set bootstrapHostName=dnode-group-marklogic-0.dnode-group-marklogic-headless.default.svc.cluster.local
311+
```
312+
Once this deployment is complete, there will be a new "enode" group with two hosts in the MarkLogic cluster.
313+
297314
# Access the MarkLogic Server
298315

299316
## Service

charts/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ startupProbe:
136136
# Log collection will collect all logs for each file type enabled, parse them,
137137
# And export them to a logging backend specified in the outputs section below
138138
logCollection:
139-
enabled: true
139+
enabled: false
140140
image: fluent/fluent-bit:1.9.7
141141
resources:
142142
requests:

test/e2e/install_test.go

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ package e2e
33
import (
44
"crypto/tls"
55
"fmt"
6+
"io/ioutil"
7+
"net/http"
68
"os"
79
"path/filepath"
810
"strings"
@@ -14,6 +16,7 @@ import (
1416
"github.com/gruntwork-io/terratest/modules/k8s"
1517
"github.com/gruntwork-io/terratest/modules/random"
1618
"github.com/stretchr/testify/assert"
19+
"github.com/tidwall/gjson"
1720
digestAuth "github.com/xinsnake/go-http-digest-auth-client"
1821
)
1922

@@ -25,6 +28,11 @@ func TestHelmInstall(t *testing.T) {
2528
}
2629
imageRepo, repoPres := os.LookupEnv("dockerRepository")
2730
imageTag, tagPres := os.LookupEnv("dockerVersion")
31+
username := "admin"
32+
password := "admin"
33+
var resp *http.Response
34+
var body []byte
35+
var err error
2836

2937
if !repoPres {
3038
imageRepo = "marklogic-centos/marklogic-server-centos"
@@ -42,9 +50,11 @@ func TestHelmInstall(t *testing.T) {
4250
KubectlOptions: kubectlOptions,
4351
SetValues: map[string]string{
4452
"persistence.enabled": "false",
45-
"replicaCount": "1",
53+
"replicaCount": "2",
4654
"image.repository": imageRepo,
4755
"image.tag": imageTag,
56+
"auth.adminUsername": username,
57+
"auth.adminPassword": password,
4858
"logCollection.enabled": "false",
4959
},
5060
}
@@ -103,4 +113,21 @@ func TestHelmInstall(t *testing.T) {
103113
// the generated password should be able to access the manage endpoint
104114
assert.Equal(t, 200, response.StatusCode)
105115

116+
// Verify no groups beyond enode were created/modified
117+
groupStatusEndpoint := fmt.Sprintf("http://%s/manage/v2/groups?format=json", tunnel8002.Endpoint())
118+
groupStatus := digestAuth.NewRequest(username, password, "GET", groupStatusEndpoint, "")
119+
t.Logf(`groupStatusEndpoint: %s`, groupStatusEndpoint)
120+
if resp, err = groupStatus.Execute(); err != nil {
121+
t.Fatalf(err.Error())
122+
}
123+
if body, err = ioutil.ReadAll(resp.Body); err != nil {
124+
t.Fatalf(err.Error())
125+
}
126+
groupQuantityJSON := gjson.Get(string(body), "group-default-list.list-items.list-count.value")
127+
128+
if groupQuantityJSON.Num != 1 {
129+
t.Errorf("Only one group should exist, instead %v groups exist", groupQuantityJSON.Num)
130+
}
131+
132+
t.Logf("Groups status response:\n" + string(body))
106133
}

0 commit comments

Comments
 (0)