You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sdap.apache.org by ea...@apache.org on 2020/06/24 23:58:33 UTC

[incubator-sdap-nexus] 01/01: create collection-manager.yaml template

This is an automated email from the ASF dual-hosted git repository.

eamonford pushed a commit to branch helm-ingester
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-nexus.git

commit ee1fe60d5fb149109842ee31748cf7f7972e06f2
Author: Eamon Ford <ea...@jpl.nasa.gov>
AuthorDate: Wed Jun 24 16:57:56 2020 -0700

    create collection-manager.yaml template
---
 helm/Chart.yaml                        |  2 +-
 helm/requirements.yaml                 |  3 ++
 helm/templates/collection-manager.yaml | 76 ++++++++++++++++++++++++++++++++++
 helm/templates/webapp.yaml             |  6 ++-
 helm/values.yaml                       | 18 +++++++-
 5 files changed, 102 insertions(+), 3 deletions(-)

diff --git a/helm/Chart.yaml b/helm/Chart.yaml
index b861805..3636dd4 100644
--- a/helm/Chart.yaml
+++ b/helm/Chart.yaml
@@ -2,4 +2,4 @@ apiVersion: v1
 appVersion: "0.1.3"
 description: Science Data Analytics Platform
 name: nexus
-version: 0.1.10
+version: 0.2.0
diff --git a/helm/requirements.yaml b/helm/requirements.yaml
index 25818d2..154b27d 100644
--- a/helm/requirements.yaml
+++ b/helm/requirements.yaml
@@ -3,5 +3,8 @@ dependencies:
     version: 1.28.2
     repository: https://kubernetes-charts.storage.googleapis.com
     condition: ingressEnabled
+  - name: rabbitmq
+    version: 7.1.0
+    repository: https://charts.bitnami.com/bitnami
   
 
diff --git a/helm/templates/collection-manager.yaml b/helm/templates/collection-manager.yaml
new file mode 100644
index 0000000..c2e9256
--- /dev/null
+++ b/helm/templates/collection-manager.yaml
@@ -0,0 +1,76 @@
+{{ if .Values.collectionManager.enabled }}
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  labels:
+    app: collection-manager
+  name: collection-manager
+spec:
+  replicas: 1
+  selector:
+    matchLabels:
+      app: collection-manager
+  template:
+    metadata:
+      labels:
+        app: collection-manager
+    spec:
+      containers:
+        - image: nexusjpl/collection-manager:0.0.1
+          name: collection-manager
+          env:
+            - name: RABBITMQ_USERNAME
+              value: {{ .Values.rabbitmq.auth.username }}
+            - name: RABBITMQ_PASSWORD
+              value: {{ .Values.rabbitmq.auth.password }}
+            - name: RABBITMQ_HOST
+              value: {{ .Values.rabbitmq.fullnameOverride }}
+            - name: COLLECTIONS_PATH
+              value: /sdap/ingester/collections.yml
+            {{ if .Values.collectionManager.historyUrl }}
+            - name: HISTORY_URL
+              value: {{ .Values.collectionManager.historyUrl }}
+            {{ else }}
+            - name: HISTORY_PATH
+              value: /sdap/history
+            {{ end }}
+          volumeMounts:
+            - name: collections-config-volume
+              mountPath: /sdap/ingester
+            {{ if not .Values.collectionManager.historyUrl }}
+            - name: history-volume
+              mountPath: /sdap/history
+            {{ end }}
+            - name: data-volume
+              mountPath: /data
+      volumes:
+        - name: collections-config-volume
+          configMap:
+            name: collections-config
+        {{ if not .Values.collectionManager.historyUrl }}
+        - name: history-volume
+          persistentVolumeClaim:
+            claimName: history-volume-claim
+        {{ end }}
+        - name: data-volume
+          hostPath:
+            path: {{ .Values.ingestion.dataPath }}
+      restartPolicy: Always
+
+---
+
+{{ if not .Values.collectionManager.historyUrl }}
+apiVersion: v1
+kind: PersistentVolumeClaim
+metadata:
+  name: history-volume-claim
+spec:
+  accessModes:
+    - ReadWriteOnce
+  resources:
+    requests:
+      storage: 3Gi
+  storageClassName: {{ .Values.storageClass }}
+{{ end }}
+
+{{ end }}
\ No newline at end of file
diff --git a/helm/templates/webapp.yaml b/helm/templates/webapp.yaml
index 2c08bf3..d77496f 100644
--- a/helm/templates/webapp.yaml
+++ b/helm/templates/webapp.yaml
@@ -1,3 +1,5 @@
+{{ if .Values.webapp.enabled }}
+
 apiVersion: "sparkoperator.k8s.io/v1beta2"
 kind: SparkApplication
 metadata:
@@ -41,4 +43,6 @@ spec:
   - name: webapp
     protocol: TCP
     port: 8083
-    targetPort: 8083
\ No newline at end of file
+    targetPort: 8083
+
+{{ end }}
\ No newline at end of file
diff --git a/helm/values.yaml b/helm/values.yaml
index 6be14b9..ff86d85 100644
--- a/helm/values.yaml
+++ b/helm/values.yaml
@@ -6,6 +6,7 @@ rootWebpage:
   enabled: true
 
 webapp:
+  enabled: true
   distributed:
     image: nexusjpl/nexus-webapp:distributed.0.1.3
     driver:
@@ -19,6 +20,13 @@ webapp:
       instances: 2
       memory: "512m"
 
+ingestion:
+  dataPath: /Users/edford/Desktop/ingestion_test/data
+
+collectionManager:
+  enabled: true
+#  historyUrl: history-solr
+
 cassandra:
   replicas: 2
   storage: 13Gi
@@ -62,4 +70,12 @@ nginx-ingress:
       enabled: true
       type: LoadBalancer
   defaultBackend:
-    enabled: false
\ No newline at end of file
+    enabled: false
+
+rabbitmq:
+  fullnameOverride: rabbitmq
+  auth:
+    username: guest
+    password: guest
+  ingress:
+    enabled: true
\ No newline at end of file