Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
Merge branch 'integration' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
john-a-fletcher committed Oct 12, 2021
2 parents 0652951 + 7f5444d commit 4afac7e
Show file tree
Hide file tree
Showing 14 changed files with 249 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,34 @@
#!/bin/bash
set -x

USAGE="USAGE: bash $(basename "$0") [--rootdnpassword <rootdnpassword>]
[--help | -h]
where:
--rootdnpassword openldap root user password
--help help
"

ROOTDN_PASSWORD=

while test $# -gt 0
do
case "$1" in
--rootdnpassword ) shift;
ROOTDN_PASSWORD=$1
;;
--help | -h )
echo "$USAGE"
exit 1
;;
esac
shift
done

if [ -z $ROOTDN_PASSWORD ]
then
echo $USAGE
exit 1
fi

rm -rf /tmp/hostlist
rm -rf /tmp/podlist

Expand All @@ -15,6 +44,20 @@ done

for i in "${pod_arr[@]}"
do
kubectl cp /tmp/hostlist $i:/root/hostlist
kubectl exec -it $i -- sh /opt/openldap-config/setupReplicationScript.sh -h /root/hostlist -p seagate1
retry_count=1
while [ ! -z "$(kubectl exec -it $i -- ldapsearch -w $ROOTDN_PASSWORD -x -D cn=admin,cn=config -b cn=config -h localhost 2>/dev/null | grep -o "Can't contact LDAP server (-1)")" ]
do
if [ $retry_count -eq 11 ]
then
exit 1
fi
echo "Retry: $retry_count"
echo "Waiting for ldap service on $i ..."
sleep 2
retry_count=$((retry_count+1))
done
echo "Ldap is up on $i"
kubectl cp /tmp/hostlist $i:/root/hostlist
kubectl exec -it $i -- cat /root/hostlist
kubectl exec -it $i -- sh /opt/openldap-config/setupReplicationScript.sh -h /root/hostlist -p $ROOTDN_PASSWORD
done
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: v1
kind: Secret
metadata:
name: <<.Values.secret.name>>
type: Opaque
stringData:
<<.Values.secret.content>>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ spec:
- name: local-path-pv
persistentVolumeClaim:
claimName: {{ .Values.cortxcontrolprov.localpathpvc.name }}
{{- range .Files.Lines .Values.cortxcontrolprov.secretinfo }}
- name: {{ printf "%s" . }}
secret:
secretName: {{ printf "%s" . }}
{{- end }}
containers:
- name: cortx-setup
image: {{ .Values.cortxcontrolprov.image }}
Expand All @@ -35,6 +40,11 @@ spec:
mountPath: {{ .Values.cortxgluster.pv.mountpath }}
- name: local-path-pv
mountPath: {{ .Values.cortxcontrolprov.localpathpvc.mountpath }}
{{- range .Files.Lines .Values.cortxcontrolprov.secretinfo }}
- name: {{ printf "%s" . }}
mountPath: {{ printf "/etc/cortx/solution/secret/%s" . }}
readOnly: true
{{- end }}
ports:
- containerPort: 5050
restartPolicy: Never
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ namespace: default
cortxcontrolprov:
name: cortx-control-prov-pod
image: centos:7
secretinfo: secret-info.txt
service:
clusterip:
name: cortx-control-clusterip-svc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ spec:
claimName: {{ .Values.cortxgluster.pvc.name }}
- name: local-path-pv
persistentVolumeClaim:
claimName: {{ .Values.cortxcontrol.localpathpvc.name }}
claimName: {{ .Values.cortxcontrol.localpathpvc.name }}
{{- range .Files.Lines .Values.cortxcontrol.secretinfo }}
- name: {{ printf "%s" . }}
secret:
secretName: {{ printf "%s" . }}
{{- end }}
containers:
- name: cortx-free-space-monitor
image: {{ .Values.cortxcontrol.image }}
Expand All @@ -40,6 +45,11 @@ spec:
mountPath: {{ .Values.cortxgluster.pv.mountpath }}
- name: local-path-pv
mountPath: {{ .Values.cortxcontrol.localpathpvc.mountpath }}
{{- range .Files.Lines .Values.cortxcontrol.secretinfo }}
- name: {{ printf "%s" . }}
mountPath: {{ printf "/etc/cortx/solution/secret/%s" . }}
readOnly: true
{{- end }}
env:
- name: UDS_CLOUD_CONTAINER_NAME
value: {{ .Values.cortxcontrol.name }}
Expand All @@ -56,6 +66,11 @@ spec:
mountPath: {{ .Values.cortxgluster.pv.mountpath }}
- name: local-path-pv
mountPath: {{ .Values.cortxcontrol.localpathpvc.mountpath }}
{{- range .Files.Lines .Values.cortxcontrol.secretinfo }}
- name: {{ printf "%s" . }}
mountPath: {{ printf "/etc/cortx/solution/secret/%s" . }}
readOnly: true
{{- end }}
env:
- name: UDS_CLOUD_CONTAINER_NAME
value: {{ .Values.cortxcontrol.name }}
Expand All @@ -74,6 +89,11 @@ spec:
mountPath: {{ .Values.cortxgluster.pv.mountpath }}
- name: local-path-pv
mountPath: {{ .Values.cortxcontrol.localpathpvc.mountpath }}
{{- range .Files.Lines .Values.cortxcontrol.secretinfo }}
- name: {{ printf "%s" . }}
mountPath: {{ printf "/etc/cortx/solution/secret/%s" . }}
readOnly: true
{{- end }}
env:
- name: UDS_CLOUD_CONTAINER_NAME
value: {{ .Values.cortxcontrol.name }}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ namespace: default
cortxcontrol:
name: cortx-control
image: centos:7
secretinfo: secret-info.txt
service:
clusterip:
name: cortx-control-clusterip-svc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ spec:
- name: local-path-pv
persistentVolumeClaim:
claimName: {{ .Values.cortxdataprov.localpathpvc.name }}
{{- range .Files.Lines .Values.cortxdataprov.secretinfo }}
- name: {{ printf "%s" . }}
secret:
secretName: {{ printf "%s" . }}
{{- end }}
containers:
- name: cortx-setup
image: {{ .Values.cortxdataprov.image }}
Expand All @@ -47,6 +52,11 @@ spec:
mountPath: {{ .Values.cortxgluster.pv.mountpath }}
- name: local-path-pv
mountPath: {{ .Values.cortxdataprov.localpathpvc.mountpath }}
{{- range .Files.Lines .Values.cortxdataprov.secretinfo }}
- name: {{ printf "%s" . }}
mountPath: {{ printf "/etc/cortx/solution/secret/%s" . }}
readOnly: true
{{- end }}
ports:
- containerPort: 5050
restartPolicy: Never
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ cortxdataprov:
image: centos:7
nodename: node-1
mountblkinfo: mnt-blk-info.txt
secretinfo: secret-info.txt
service:
clusterip:
name: cortx-data-clusterip-svc
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ spec:
- name: local-path-pv
persistentVolumeClaim:
claimName: {{ .Values.cortxdata.localpathpvc.name }}
{{- range .Files.Lines .Values.cortxdata.secretinfo }}
- name: {{ printf "%s" . }}
secret:
secretName: {{ printf "%s" . }}
{{- end }}
containers:
- name: cortx-s3-server
image: {{ .Values.cortxdata.image }}
Expand All @@ -52,6 +57,11 @@ spec:
mountPath: {{ .Values.cortxgluster.pv.mountpath }}
- name: local-path-pv
mountPath: {{ .Values.cortxdata.localpathpvc.mountpath }}
{{- range .Files.Lines .Values.cortxdata.secretinfo }}
- name: {{ printf "%s" . }}
mountPath: {{ printf "/etc/cortx/solution/secret/%s" . }}
readOnly: true
{{- end }}
env:
- name: UDS_CLOUD_CONTAINER_NAME
value: {{ .Values.cortxdata.name }}
Expand All @@ -78,6 +88,11 @@ spec:
mountPath: {{ .Values.cortxgluster.pv.mountpath }}
- name: local-path-pv
mountPath: {{ .Values.cortxdata.localpathpvc.mountpath }}
{{- range .Files.Lines .Values.cortxdata.secretinfo }}
- name: {{ printf "%s" . }}
mountPath: {{ printf "/etc/cortx/solution/secret/%s" . }}
readOnly: true
{{- end }}
env:
- name: UDS_CLOUD_CONTAINER_NAME
value: {{ .Values.cortxdata.name }}
Expand All @@ -97,6 +112,11 @@ spec:
mountPath: {{ $.Values.cortxgluster.pv.mountpath }}
- name: local-path-pv
mountPath: {{ $.Values.cortxdata.localpathpvc.mountpath }}
{{- range $.Files.Lines $.Values.cortxdata.secretinfo }}
- name: {{ printf "%s" . }}
mountPath: {{ printf "/etc/cortx/solution/secret/%s" . }}
readOnly: true
{{- end }}
env:
- name: UDS_CLOUD_CONTAINER_NAME
value: {{ $.Values.cortxdata.name }}
Expand All @@ -121,6 +141,11 @@ spec:
mountPath: {{ .Values.cortxgluster.pv.mountpath }}
- name: local-path-pv
mountPath: {{ .Values.cortxdata.localpathpvc.mountpath }}
{{- range .Files.Lines .Values.cortxdata.secretinfo }}
- name: {{ printf "%s" . }}
mountPath: {{ printf "/etc/cortx/solution/secret/%s" . }}
readOnly: true
{{- end }}
env:
- name: UDS_CLOUD_CONTAINER_NAME
value: {{ .Values.cortxdata.name }}
Expand All @@ -142,6 +167,11 @@ spec:
mountPath: {{ .Values.cortxgluster.pv.mountpath }}
- name: local-path-pv
mountPath: {{ .Values.cortxdata.localpathpvc.mountpath }}
{{- range .Files.Lines .Values.cortxdata.secretinfo }}
- name: {{ printf "%s" . }}
mountPath: {{ printf "/etc/cortx/solution/secret/%s" . }}
readOnly: true
{{- end }}
env:
- name: UDS_CLOUD_CONTAINER_NAME
value: {{ .Values.cortxdata.name }}
Expand All @@ -163,6 +193,11 @@ spec:
mountPath: {{ .Values.cortxgluster.pv.mountpath }}
- name: local-path-pv
mountPath: {{ .Values.cortxdata.localpathpvc.mountpath }}
{{- range .Files.Lines .Values.cortxdata.secretinfo }}
- name: {{ printf "%s" . }}
mountPath: {{ printf "/etc/cortx/solution/secret/%s" . }}
readOnly: true
{{- end }}
env:
- name: UDS_CLOUD_CONTAINER_NAME
value: {{ .Values.cortxdata.name }}
Expand All @@ -180,6 +215,11 @@ spec:
mountPath: {{ $.Values.cortxgluster.pv.mountpath }}
- name: local-path-pv
mountPath: {{ $.Values.cortxdata.localpathpvc.mountpath }}
{{- range $.Files.Lines $.Values.cortxdata.secretinfo }}
- name: {{ printf "%s" . }}
mountPath: {{ printf "/etc/cortx/solution/secret/%s" . }}
readOnly: true
{{- end }}
env:
- name: UDS_CLOUD_CONTAINER_NAME
value: {{ $.Values.cortxdata.name }}
Expand All @@ -204,6 +244,11 @@ spec:
mountPath: {{ .Values.cortxgluster.pv.mountpath }}
- name: local-path-pv
mountPath: {{ .Values.cortxdata.localpathpvc.mountpath }}
{{- range .Files.Lines .Values.cortxdata.secretinfo }}
- name: {{ printf "%s" . }}
mountPath: {{ printf "/etc/cortx/solution/secret/%s" . }}
readOnly: true
{{- end }}
env:
- name: UDS_CLOUD_CONTAINER_NAME
value: {{ .Values.cortxdata.name }}
Expand All @@ -227,6 +272,11 @@ spec:
mountPath: {{ .Values.cortxgluster.pv.mountpath }}
- name: local-path-pv
mountPath: {{ .Values.cortxdata.localpathpvc.mountpath }}
{{- range .Files.Lines .Values.cortxdata.secretinfo }}
- name: {{ printf "%s" . }}
mountPath: {{ printf "/etc/cortx/solution/secret/%s" . }}
readOnly: true
{{- end }}
env:
- name: UDS_CLOUD_CONTAINER_NAME
value: {{ .Values.cortxdata.name }}
Expand All @@ -250,6 +300,11 @@ spec:
mountPath: {{ .Values.cortxgluster.pv.mountpath }}
- name: local-path-pv
mountPath: {{ .Values.cortxdata.localpathpvc.mountpath }}
{{- range .Files.Lines .Values.cortxdata.secretinfo }}
- name: {{ printf "%s" . }}
mountPath: {{ printf "/etc/cortx/solution/secret/%s" . }}
readOnly: true
{{- end }}
env:
- name: UDS_CLOUD_CONTAINER_NAME
value: {{ .Values.cortxdata.name }}
1 change: 1 addition & 0 deletions k8_cortx_cloud/cortx-cloud-helm-pkg/cortx-data/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ cortxdata:
image: centos:7
nodename: node-1
mountblkinfo: mnt-blk-info.txt
secretinfo: secret-info.txt
s3:
numinst: 2
startportnum: 28051
Expand Down
2 changes: 1 addition & 1 deletion k8_cortx_cloud/deploy-cortx-cloud-3rd-party.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ printf "===========================================================\n"
printf "Setup OpenLDAP replication \n"
printf "===========================================================\n"
# Run replication script
./cortx-cloud-3rd-party-pkg/openldap-replication/replication.sh
./cortx-cloud-3rd-party-pkg/openldap-replication/replication.sh --rootdnpassword seagate1

printf "######################################################\n"
printf "# Deploy Zookeeper \n"
Expand Down
Loading

0 comments on commit 4afac7e

Please sign in to comment.