Allow custom plugins in SDC 54/75854/2
authorshrikantawachar <shrikant.awachar@amdocs.com>
Wed, 16 Jan 2019 07:42:21 +0000 (13:12 +0530)
committershrikantawachar <shrikant.awachar@amdocs.com>
Fri, 18 Jan 2019 12:09:02 +0000 (17:39 +0530)
Allow custom plugins in SDC

Change-Id: I48b3defca43de1fed4916ef5b9e27324d22af75e
Issue-ID: SDC-2022
Signed-off-by: shrikantawachar <shrikant.awachar@amdocs.com>
kubernetes/sdc/charts/sdc-fe/resources/config/plugins/plugins-configuration.yaml [new file with mode: 0644]
kubernetes/sdc/charts/sdc-fe/templates/configmap.yaml
kubernetes/sdc/charts/sdc-fe/templates/deployment.yaml
kubernetes/sdc/charts/sdc-fe/values.yaml
kubernetes/sdc/resources/config/environments/AUTO.json

diff --git a/kubernetes/sdc/charts/sdc-fe/resources/config/plugins/plugins-configuration.yaml b/kubernetes/sdc/charts/sdc-fe/resources/config/plugins/plugins-configuration.yaml
new file mode 100644 (file)
index 0000000..f9a3b17
--- /dev/null
@@ -0,0 +1,28 @@
+pluginsList:
+   - pluginId: DCAED
+     pluginDiscoveryUrl: "{{ .Values.config.plugins.dcae_discovery_url }}"
+     pluginSourceUrl: "{{ .Values.config.plugins.dcae_source_url }}"
+     pluginStateUrl: "dcaed"
+     pluginDisplayOptions:
+        context:
+            displayName: "Monitoring"
+            displayContext: ["SERVICE"]
+            displayRoles: ["DESIGNER"]
+   - pluginId: DCAE-DS
+     pluginDiscoveryUrl: "{{ .Values.config.plugins.dcae_dt_discovery_url }}"
+     pluginSourceUrl: "{{ .Values.config.plugins.dcae_dt_source_url }}"
+     pluginStateUrl: "dcae-ds"
+     pluginDisplayOptions:
+       tab:
+           displayName: "DCAE-DS"
+           displayRoles: ["DESIGNER"]
+   - pluginId: WORKFLOW
+     pluginDiscoveryUrl: "{{ .Values.config.plugins.workflow_discovery_url }}"
+     pluginSourceUrl: "{{ .Values.config.plugins.workflow_source_url }}"
+     pluginStateUrl: "workflowDesigner"
+     pluginDisplayOptions:
+        tab:
+            displayName: "WORKFLOW"
+            displayRoles: ["DESIGNER", "TESTER"]
+
+connectionTimeout: 1000
\ No newline at end of file
index 03eb04e..fedbda8 100644 (file)
@@ -25,3 +25,16 @@ metadata:
     heritage: {{ .Release.Service }}
 data:
 {{ tpl (.Files.Glob "resources/config/logging/*").AsConfig . | indent 2 }}
+---
+apiVersion: v1
+kind: ConfigMap
+metadata:
+  name: {{ include "common.fullname" . }}-plugins-configmap
+  namespace: {{ include "common.namespace" . }}
+  labels:
+    app: {{ include "common.name" . }}
+    chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+    release: {{ .Release.Name }}
+    heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/config/plugins/*").AsConfig . | indent 2 }}
\ No newline at end of file
index 9a34263..46ba241 100644 (file)
@@ -98,6 +98,9 @@ spec:
             readOnly: true
           - name: {{ include "common.fullname" . }}-logs
             mountPath: /var/log/onap
+          - name: {{ include "common.fullname" . }}-configs
+            mountPath: /var/lib/jetty/config/catalog-fe/plugins-configuration.yaml
+            subPath: plugins-configuration.yaml
           - name: {{ include "common.fullname" . }}-logback
             mountPath: /tmp/logback.xml
             subPath: logback.xml
@@ -126,6 +129,10 @@ spec:
             name: {{ .Release.Name }}-sdc-filebeat-configmap
         - name: {{ include "common.fullname" . }}-data-filebeat
           emptyDir: {}
+        - name: {{ include "common.fullname" . }}-configs
+          configMap:
+            name : {{ include "common.fullname" . }}-plugins-configmap
+            defaultMode: 0777
         - name: {{ include "common.fullname" . }}-logback
           configMap:
             name : {{ include "common.fullname" . }}-logging-configmap
index f0909e2..2782222 100644 (file)
@@ -33,6 +33,13 @@ pullPolicy: Always
 
 config:
   javaOptions: "-Xdebug -agentlib:jdwp=transport=dt_socket,address=6000,server=y,suspend=n -Xmx256m -Xms256m"
+  plugins:
+    dcae_discovery_url: "http://sdc-dcae-fe:8183/dcaed/#/home"
+    dcae_source_url: "http://sdc.dcae.plugin.simpledemo.onap.org:30263/dcaed/#/home"
+    dcae_dt_discovery_url: "http://sdc-dcae-dt:8186/dcae/#/dcae/home"
+    dcae_dt_source_url: "http://sdc.dcae.plugin.simpledemo.onap.org:30265/dcae/#/dcae/home"
+    workflow_discovery_url: "http://sdc-wfd-fe:8080"
+    workflow_source_url: "http://sdc.workflow.plugin.simpledemo.onap.org:30256"
 
 # default number of instances
 replicaCount: 1
index 46c58ef..bb5df2b 100755 (executable)
             ],
             "KB": "sdc-kb.{{include "common.namespace" .}}"
         },
-        "Plugins": {
-            "DCAE": {
-                "dcae_discovery_url": "http://sdc-dcae-fe.{{include "common.namespace" .}}:8183/dcaed/#/home",
-                "dcae_source_url": "http://sdc.dcae.plugin.simpledemo.onap.org:30263/dcaed/#/home"
-            },
-            "DCAE-TAB": {
-                "dcae_dt_discovery_url": "http://sdc-dcae-dt.{{include "common.namespace" .}}:8186/dcae/#/dcae/home",
-                "dcae_dt_source_url": "http://sdc.dcae.plugin.simpledemo.onap.org:30265/dcae/#/dcae/home"
-            },
-            "WORKFLOW": {
-                "workflow_discovery_url": "http://sdc-wfd-fe.{{include "common.namespace" .}}:8080",
-                "workflow_source_url": "http://sdc.workflow.plugin.simpledemo.onap.org:30256"
-            }
-        },
         "VnfRepo": {
             "vnfRepoPort": "{{.Values.config.environment.vnfRepoPort}}",
             "vnfRepoHost": "refrepo.{{include "common.namespace" .}}"