integrate artifact broker into multicloud plugins 99/86499/6
authorliboNet <libo.zhu@intel.com>
Tue, 30 Apr 2019 01:26:11 +0000 (09:26 +0800)
committerAlexis de Talhouët <adetalhouet89@gmail.com>
Fri, 10 May 2019 17:39:06 +0000 (17:39 +0000)
add config.json for each multicloud plugin
update deployment to add it as sidecar
update the values.yaml of multicloud to store image name
remove the hardcode namespace
fix typo and use 1.3.1 image tag

Change-Id: I6cc9e381ea655b1d75760b013d2be693b0c0575c
Issue-ID: MULTICLOUD-597
Signed-off-by: liboNet <libo.zhu@intel.com>
kubernetes/multicloud/charts/multicloud-starlingx/resources/config/log/config.json [new file with mode: 0644]
kubernetes/multicloud/charts/multicloud-starlingx/templates/deployment.yaml
kubernetes/multicloud/charts/multicloud-windriver/resources/config/log/config.json [new file with mode: 0644]
kubernetes/multicloud/charts/multicloud-windriver/templates/deployment.yaml
kubernetes/multicloud/values.yaml

diff --git a/kubernetes/multicloud/charts/multicloud-starlingx/resources/config/log/config.json b/kubernetes/multicloud/charts/multicloud-starlingx/resources/config/log/config.json
new file mode 100644 (file)
index 0000000..d62fec6
--- /dev/null
@@ -0,0 +1,70 @@
+{
+    "name":"SDCDistributionGroup",
+    "restServerParameters":{
+        "host":"0.0.0.0",
+        "port":9014,
+        "userName":"healthcheck",
+        "password":"zb!XztG34",
+        "https":true
+    },
+    "receptionHandlerParameters":{
+        "SDCReceptionHandler":{
+            "receptionHandlerType":"SDC",
+            "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler",
+           "receptionHandlerConfigurationName":"sdcConfiguration",
+            "pluginHandlerParameters":{
+                "artifactForwarders":{
+                    "PAPEngineForwarder":{
+                        "forwarderType":"PAPEngine",
+                        "forwarderClassName":"org.onap.policy.distribution.forwarding.k8s.K8sArtifactForwarder",
+                        "forwarderConfigurationName": "k8sConfiguration"
+                    }
+                }
+            }
+        }
+    },
+    "receptionHandlerConfigurationParameters":{
+        "sdcConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandlerConfigurationParameterGroup",
+            "parameters":{
+               "asdcAddress": "sdc-be:8443",
+                "messageBusAddress": [
+                    "message-router"
+                 ],
+                "user": "policy",
+                "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U",
+                "pollingInterval":20,
+                "pollingTimeout":30,
+                "consumerId": "policy-id",
+                "artifactTypes": [
+                    "TOSCA_CSAR",
+                    "HEAT",
+                    "HEAT_ENV",
+                    "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT"
+                ],
+                "consumerGroup": "policy-group",
+                "environmentName": "AUTO",
+                "keystorePath": "null",
+                "keystorePassword": "null",
+                "activeserverTlsAuth": false,
+                "isFilterinEmptyResources": true,
+                "isUseHttpsWithDmaap": false
+               }
+        }
+    },
+    "artifactForwarderConfigurationParameters":{
+        "k8sConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.forwarding.k8s.K8sArtifactForwarderParameterGroup",
+            "parameters":{
+                "useHttps": true,
+                "hostname": "pdp",
+                "port": 8081,
+                "userName": "testpdp",
+                "password": "alpha123",
+                "clientAuth": "cHl0aG9uOnRlc3Q=",
+                "isManaged": true,
+                "pdpGroup": "default"
+            }
+        }
+    }
+}
index 0ccc3f9..62bacd7 100644 (file)
@@ -61,6 +61,8 @@ spec:
        - mountPath: /opt/starlingx/starlingx/pub/config/log.yml
          name: starlingx-logconfig
          subPath: log.yml
+       - mountPath: /opt/artifacts/
+         name: artifact-data
        resources:
 {{ include "common.resources" . | indent 12 }}
        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
@@ -93,6 +95,19 @@ spec:
          name: starlingx-log
        - mountPath: /usr/share/filebeat/data
          name: starlingx-data-filebeat
+     - image: "{{ include "common.repository" . }}/{{ .Values.global.artifactImage }}"
+       name: framework-artifactbroker
+       command: ["/opt/app/distribution/bin/artifact-dist.sh"]
+       args: ["/opt/app/distribution/etc/mounted/config.json"]
+       ports:
+       - containerPort: 9014
+         protocol: TCP
+       volumeMounts:
+       - mountPath: /opt/app/distribution/etc/mounted/config.json
+         name: starlingx-logconfig
+         subPath: config.json
+       - mountPath: /data
+         name: artifact-data
 
      volumes:
      - name: starlingx-log
@@ -105,6 +120,8 @@ spec:
      - name: starlingx-logconfig
        configMap:
          name: {{ include "common.fullname" . }}-log-configmap
+     - name: artifact-data
+       emptyDir: {}
      imagePullSecrets:
      - name: "{{ include "common.namespace" . }}-docker-registry-key"
      restartPolicy: Always
diff --git a/kubernetes/multicloud/charts/multicloud-windriver/resources/config/log/config.json b/kubernetes/multicloud/charts/multicloud-windriver/resources/config/log/config.json
new file mode 100644 (file)
index 0000000..d62fec6
--- /dev/null
@@ -0,0 +1,70 @@
+{
+    "name":"SDCDistributionGroup",
+    "restServerParameters":{
+        "host":"0.0.0.0",
+        "port":9014,
+        "userName":"healthcheck",
+        "password":"zb!XztG34",
+        "https":true
+    },
+    "receptionHandlerParameters":{
+        "SDCReceptionHandler":{
+            "receptionHandlerType":"SDC",
+            "receptionHandlerClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandler",
+           "receptionHandlerConfigurationName":"sdcConfiguration",
+            "pluginHandlerParameters":{
+                "artifactForwarders":{
+                    "PAPEngineForwarder":{
+                        "forwarderType":"PAPEngine",
+                        "forwarderClassName":"org.onap.policy.distribution.forwarding.k8s.K8sArtifactForwarder",
+                        "forwarderConfigurationName": "k8sConfiguration"
+                    }
+                }
+            }
+        }
+    },
+    "receptionHandlerConfigurationParameters":{
+        "sdcConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.reception.handling.sdc.SdcReceptionHandlerConfigurationParameterGroup",
+            "parameters":{
+               "asdcAddress": "sdc-be:8443",
+                "messageBusAddress": [
+                    "message-router"
+                 ],
+                "user": "policy",
+                "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U",
+                "pollingInterval":20,
+                "pollingTimeout":30,
+                "consumerId": "policy-id",
+                "artifactTypes": [
+                    "TOSCA_CSAR",
+                    "HEAT",
+                    "HEAT_ENV",
+                    "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT"
+                ],
+                "consumerGroup": "policy-group",
+                "environmentName": "AUTO",
+                "keystorePath": "null",
+                "keystorePassword": "null",
+                "activeserverTlsAuth": false,
+                "isFilterinEmptyResources": true,
+                "isUseHttpsWithDmaap": false
+               }
+        }
+    },
+    "artifactForwarderConfigurationParameters":{
+        "k8sConfiguration":{
+            "parameterClassName":"org.onap.policy.distribution.forwarding.k8s.K8sArtifactForwarderParameterGroup",
+            "parameters":{
+                "useHttps": true,
+                "hostname": "pdp",
+                "port": 8081,
+                "userName": "testpdp",
+                "password": "alpha123",
+                "clientAuth": "cHl0aG9uOnRlc3Q=",
+                "isManaged": true,
+                "pdpGroup": "default"
+            }
+        }
+    }
+}
index 99b1ea9..e6f1456 100644 (file)
@@ -62,6 +62,8 @@ spec:
        - mountPath: /opt/windriver/titanium_cloud/pub/config/log.yml
          name: windriver-logconfig
          subPath: log.yml
+       - mountPath: /opt/artifacts/
+         name: artifact-data
        resources:
 {{ include "common.resources" . | indent 12 }}
        image: "{{ include "common.repository" . }}/{{ .Values.image }}"
@@ -94,6 +96,19 @@ spec:
          name: windriver-log
        - mountPath: /usr/share/filebeat/data
          name: windriver-data-filebeat
+     - image: "{{ include "common.repository" . }}/{{ .Values.global.artifactImage }}"
+       name: framework-artifactbroker
+       command: ["/opt/app/distribution/bin/artifact-dist.sh"]
+       args: ["/opt/app/distribution/etc/mounted/config.json"]
+       ports:
+       - containerPort: 9014
+         protocol: TCP
+       volumeMounts:
+       - mountPath: /opt/app/distribution/etc/mounted/config.json
+         name: windriver-logconfig
+         subPath: config.json
+       - mountPath: /data
+         name: artifact-data
 
      volumes:
      - name: windriver-log
@@ -106,6 +121,8 @@ spec:
      - name: windriver-logconfig
        configMap:
          name: {{ include "common.fullname" . }}-log-configmap
+     - name: artifact-data
+       emptyDir: {}
      imagePullSecrets:
      - name: "{{ include "common.namespace" . }}-docker-registry-key"
      restartPolicy: Always
index 6188e43..889c06b 100644 (file)
@@ -20,6 +20,7 @@ global:
   nodePortPrefix: 302
   loggingRepository: docker.elastic.co
   loggingImage: beats/filebeat:5.5.0
+  artifactImage: onap/multicloud/framework-artifactbroker:1.3.1
   prometheus:
     enabled: false