This is an automated email from the ASF dual-hosted git repository. tloubrieu pushed a commit to branch SDAP-268 in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git
commit 4af12c27efd6552981ace4042390e07429d9a2c0 Author: Eamon Ford <[email protected]> AuthorDate: Wed Aug 5 12:18:27 2020 -0700 enable external solr/zk/cass hosts --- helm/requirements.yaml | 2 ++ helm/templates/_helpers.tpl | 7 +++++++ helm/templates/collection-manager.yml | 2 +- helm/templates/granule-ingester.yml | 2 +- helm/templates/solr-create-collection.yml | 8 ++++---- helm/templates/webapp.yml | 2 +- helm/values.yaml | 8 ++++++++ 7 files changed, 24 insertions(+), 7 deletions(-) diff --git a/helm/requirements.yaml b/helm/requirements.yaml index 3e038e7..725684c 100644 --- a/helm/requirements.yaml +++ b/helm/requirements.yaml @@ -10,7 +10,9 @@ dependencies: - name: solr version: 1.5.2 repository: http://storage.googleapis.com/kubernetes-charts-incubator + condition: solr.enabled - name: cassandra version: 5.5.3 repository: https://charts.bitnami.com/bitnami + condition: cassandra.enabled diff --git a/helm/templates/_helpers.tpl b/helm/templates/_helpers.tpl index b697c17..a016b2f 100644 --- a/helm/templates/_helpers.tpl +++ b/helm/templates/_helpers.tpl @@ -45,3 +45,10 @@ The data volume mount which is used in both the Collection Manager and the Granu mountPath: {{ .Values.ingestion.granules.mountPath }} {{- end -}} +{{- define "nexus.urls.solr" -}} +{{ .Values.external.solrHostAndPort | default (print "http://" .Release.Name "-solr-svc:8983") }} +{{- end -}} + +{{- define "nexus.urls.zookeeper" -}} +{{ .Values.external.zookeeperHostAndPort | default (print .Release.Name "-zookeeper:2181") }} +{{- end -}} \ No newline at end of file diff --git a/helm/templates/collection-manager.yml b/helm/templates/collection-manager.yml index 255deb3..e281526 100644 --- a/helm/templates/collection-manager.yml +++ b/helm/templates/collection-manager.yml @@ -32,7 +32,7 @@ spec: value: {{ include "nexus.collectionsConfig.mountPath" . }}/collections.yml {{- if $history.solrEnabled }} - name: HISTORY_URL - value: http://{{ .Release.Name }}-solr-svc:8983 + value: {{ include "nexus.urls.solr" . }} {{- else }} - name: HISTORY_PATH value: {{ include "nexus.history.mountPath" . }} diff --git a/helm/templates/granule-ingester.yml b/helm/templates/granule-ingester.yml index 29fbd56..bb616ad 100644 --- a/helm/templates/granule-ingester.yml +++ b/helm/templates/granule-ingester.yml @@ -33,7 +33,7 @@ spec: - name: CASSANDRA_PASSWORD value: cassandra - name: ZK_HOST_AND_PORT - value: {{ .Release.Name }}-zookeeper:2181 + value: {{ include "nexus.urls.zookeeper" . }} {{ if .Values.ingestion.granuleIngester.maxConcurrency }} - name: MAX_CONCURRENCY value: "{{ .Values.ingestion.granuleIngester.maxConcurrency }}" diff --git a/helm/templates/solr-create-collection.yml b/helm/templates/solr-create-collection.yml index 756c8ed..7ecb2e3 100644 --- a/helm/templates/solr-create-collection.yml +++ b/helm/templates/solr-create-collection.yml @@ -1,3 +1,4 @@ +{{ if .Values.solrInitEnabled }} apiVersion: apps/v1 kind: Deployment metadata: @@ -23,12 +24,11 @@ spec: env: - name: MINIMUM_NODES value: "{{ .Values.solr.replicaCount }}" - - name: SOLR_HOST - value: "{{ .Release.Name }}-solr-svc" - name: SDAP_SOLR_URL - value: "http://$(SOLR_HOST):8983/solr/" + value: {{ include "nexus.urls.solr" . }}/solr/ - name: SDAP_ZK_SOLR - value: "{{ .Release.Name }}-zookeeper:2181/solr" + value: {{ include "nexus.urls.zookeeper" . }}/solr - name: CREATE_COLLECTION_PARAMS value: "name=nexustiles&numShards=$(MINIMUM_NODES)&waitForFinalState=true" restartPolicy: Always +{{ end }} \ No newline at end of file diff --git a/helm/templates/webapp.yml b/helm/templates/webapp.yml index 2921bb6..e4e2adf 100644 --- a/helm/templates/webapp.yml +++ b/helm/templates/webapp.yml @@ -15,7 +15,7 @@ spec: - --cassandra-host={{ .Release.Name }}-cassandra - --cassandra-username=cassandra - --cassandra-password=cassandra - - --solr-host={{ .Release.Name }}-solr-svc:8983 + - --solr-host={{ include "nexus.urls.solr" . }} sparkVersion: "2.4.4" restartPolicy: type: OnFailure diff --git a/helm/values.yaml b/helm/values.yaml index 9158cb0..6cabd43 100644 --- a/helm/values.yaml +++ b/helm/values.yaml @@ -99,7 +99,14 @@ ingestion: ## Store ingestion history in a solr database instead of a filesystem directory solrEnabled: true +external: + solrHostAndPort: + zookeeperHostAndPort: + +solrInitEnabled: true + solr: + enabled: true replicaCount: 3 volumeClaimTemplates: storageClassName: hostpath @@ -158,6 +165,7 @@ rabbitmq: enabled: true cassandra: + enabled: true initDBConfigMap: init-cassandra dbUser: user: cassandra
