Skip to content

Commit 5cc9b1d

Browse files
Merge pull request #8 from ilanRosenbaum/CLD-488
CLD-488: Update Helm Chart to use docker image scripts
2 parents e55467a + 6f131c0 commit 5cc9b1d

File tree

4 files changed

+8
-71
lines changed

4 files changed

+8
-71
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
.vscode
2+
values.yaml

charts/templates/configmap.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ metadata:
66
labels:
77
{{- include "marklogic.labels" . | nindent 4 }}
88
data:
9-
ML_BOOTSTRAP_HOST: {{ include "marklogic.fullname" . }}-0
10-
ML_FQDN_SUFFIX: {{ include "marklogic.headlessURL" . }}
11-
9+
MARKLOGIC_BOOTSTRAP_HOST: {{ include "marklogic.fullname" . }}-0
10+
MARKLOGIC_FQDN_SUFFIX: {{ include "marklogic.headlessURL" . }}
11+
MARKLOGIC_INIT: "true"
12+
MARKLOGIC_JOIN_CLUSTER: "true"

charts/templates/statefulset.yaml

Lines changed: 2 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -31,83 +31,19 @@ spec:
3131
{{- toYaml .Values.extraVolumeMounts | nindent 12 }}
3232
{{- end }}
3333
env:
34-
- name: ML_ADMIN_USER
34+
- name: MARKLOGIC_ADMIN_USERNAME
3535
valueFrom:
3636
secretKeyRef:
3737
name: {{ include "marklogic.fullname" . }}
3838
key: username
39-
- name: ML_ADMIN_PASS
39+
- name: MARKLOGIC_ADMIN_PASSWORD
4040
valueFrom:
4141
secretKeyRef:
4242
name: {{ include "marklogic.fullname" . }}
4343
key: password
4444
envFrom:
4545
- configMapRef:
4646
name: {{ include "marklogic.fullname" . }}
47-
command:
48-
- bash
49-
- '-c'
50-
- |
51-
echo '### Begin ML Container Config ###'
52-
53-
# Set Hostname to the value of hostname command to /etc/marklogic.conf
54-
HOST_FQDN="$(hostname).$ML_FQDN_SUFFIX"
55-
echo "export MARKLOGIC_HOSTNAME=\"$HOST_FQDN\"" | sudo tee /etc/marklogic.conf
56-
57-
cd ~
58-
59-
AUTH_CURL="curl --anyauth --user $ML_ADMIN_USER:$ML_ADMIN_PASS -m 20 -s "
60-
61-
# Start MarkLogic
62-
sudo service MarkLogic start
63-
sleep 5s
64-
65-
# Initialize and Setup Admin User
66-
echo '### Initialize and Setup Admin User ###'
67-
ML_STATUS_CODE=`curl -s -o /dev/null --write-out %{response_code} http://localhost:8001/admin/v1/init`
68-
if [ "$ML_STATUS_CODE" == "401" ]; then
69-
echo "Server is already configured."
70-
else
71-
curl -X POST -d "" http://$HOSTNAME:8001/admin/v1/init
72-
sleep 5s
73-
74-
curl -X POST -H "Content-type: application/x-www-form-urlencoded" \
75-
--data "admin-username=$ML_ADMIN_USER" --data "admin-password=$ML_ADMIN_PASS" \
76-
--data "realm=public" \
77-
http://$HOSTNAME:8001/admin/v1/instance-admin
78-
sleep 10s
79-
80-
# for EA1 release, disable turning on XDQP by default.
81-
# Turn on XDQP encryption via CMA
82-
# $AUTH_CURL -X POST -H 'Content-Type: application/json' \
83-
# -d '{"config":[{"op":"update","group":[{"group-name":"Default","xdqp-ssl-enabled":true}]}]}' \
84-
# http://$HOSTNAME:8002/manage/v3/
85-
86-
# Join Cluster
87-
if [ "$HOSTNAME" != "$ML_BOOTSTRAP_HOST" ]; then
88-
echo "### joining cluster ###"
89-
joiner=$HOSTNAME
90-
cluster="$ML_BOOTSTRAP_HOST"
91-
$AUTH_CURL -o host.xml -X GET -H "Accept: application/xml" http://${joiner}:8001/admin/v1/server-config
92-
$AUTH_CURL -X POST -d "group=Default" --data-urlencode "server-config@./host.xml" -H "Content-type: application/x-www-form-urlencoded" -o cluster.zip http://${cluster}:8001/admin/v1/cluster-config
93-
94-
sleep 10s
95-
96-
$AUTH_CURL -X POST -H "Content-type: application/zip" --data-binary @./cluster.zip http://${joiner}:8001/admin/v1/cluster-config
97-
sleep 5s
98-
99-
rm -f host.xml
100-
rm -f cluster.zip
101-
fi
102-
103-
fi
104-
105-
# mark the pod ready for readiness probe
106-
sudo touch /var/opt/MarkLogic/ready
107-
108-
echo '### END ML Container Config ###'
109-
110-
tail -f $MARKLOGIC_DATA_DIR/Logs/ErrorLog.txt
11147
ports:
11248
- containerPort: 7997
11349
name: health-check

docs/Local_Development_Tutorial.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,5 +157,3 @@ To cleanup a running kubernetes cluster, run the following commands:
157157
For Example:
158158
`helm uninstall marklogic-local-dev-env`
159159
- `minikube delete`
160-
161-

0 commit comments

Comments
 (0)