summaryrefslogtreecommitdiffstats
path: root/dpo
diff options
context:
space:
mode:
authors00370346 <swarup.nayak1@huawei.com>2019-03-14 15:06:40 +0530
committers00370346 <swarup.nayak1@huawei.com>2019-03-18 15:25:23 +0530
commitbe11dee889f5a740d584458b62804e5fd4296e53 (patch)
tree2cc5e14c29df1a40f8e7bbe3bb08fffa38e023b8 /dpo
parentd76c2d0f61bfb4373b13fcdb6fc3317467dd19b4 (diff)
Issue-ID: DCAEGEN2-1055 Generic RestConfCollector
Change-Id: I1800affa2b34cbb7487c0d8411e078adec5a0c48 Signed-off-by: s00370346 <swarup.nayak1@huawei.com>
Diffstat (limited to 'dpo')
-rw-r--r--dpo/blueprints/k8s-rcc-inputs.yaml22
-rwxr-xr-xdpo/blueprints/k8s-rcc-policy.yaml-template118
-rwxr-xr-xdpo/data-formats/dcaeRCCOutput.json35
-rw-r--r--dpo/data-formats/dmaap.json10
-rw-r--r--dpo/spec/rcc_spec.json200
5 files changed, 385 insertions, 0 deletions
diff --git a/dpo/blueprints/k8s-rcc-inputs.yaml b/dpo/blueprints/k8s-rcc-inputs.yaml
new file mode 100644
index 0000000..8f61f05
--- /dev/null
+++ b/dpo/blueprints/k8s-rcc-inputs.yaml
@@ -0,0 +1,22 @@
+#============LICENSE_START========================================================
+#=================================================================================
+# Copyright (c) 2017-2018 AT&T Intellectual Property. All rights reserved.
+# Modifications Copyright © 2018 Amdocs, Bell Canada
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+tag_version: nexus.onap.org:10001/org.onap.dcaegen2.collectors.restconfcollector:1.1.0
+
+external_port: 30416
+
diff --git a/dpo/blueprints/k8s-rcc-policy.yaml-template b/dpo/blueprints/k8s-rcc-policy.yaml-template
new file mode 100755
index 0000000..d6673ac
--- /dev/null
+++ b/dpo/blueprints/k8s-rcc-policy.yaml-template
@@ -0,0 +1,118 @@
+#
+# ============LICENSE_START====================================================
+# =============================================================================
+# Copyright (c) 2017-2019 AT&T Intellectual Property. All rights reserved.
+# Copyright (c) 2019 Huawei. All rights reserved.
+# =============================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END======================================================
+
+tosca_definitions_version: cloudify_dsl_1_3
+
+description: >
+ This blueprint deploys/manages the RestConf Collector module as a Docker container
+
+imports:
+ - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
+ - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.5/k8splugin_types.yaml
+inputs:
+ dmaap_host:
+ type: string
+ default: message-router.onap.svc.cluster.local
+ dmaap_port:
+ type: string
+ default: "3904"
+ tag_version:
+ type: string
+ default: "nexus3.onap.org:10001/org.onap.dcaegen2.collectors.restconfcollector:1.0.1"
+ consul_host:
+ type: string
+ default: consul-server.onap.svc.cluster.local
+ consul_port:
+ type: string
+ default: "8500"
+ cbs_host:
+ type: string
+ default: "config-binding-service.dcae.svc.cluster.local"
+ cbs_port:
+ type: string
+ default: "10000"
+ external_port:
+ type: string
+ description: Kubernetes node port on which collector is exposed
+ default: "30416"
+ notification_publish_url:
+ type: string
+ default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_RCC_OUTPUT"
+
+node_templates:
+ rcc_k8s:
+ type: dcae.nodes.ContainerizedPlatformComponent
+ properties:
+ name: 'dcaegen2-collectors-rcc'
+ docker_config:
+ healthcheck:
+ endpoint: /healthcheck
+ interval: 15s
+ timeout: 1s
+ type: http
+ image:
+ get_input: tag_version
+ log_info:
+ log_directory: "/opt/app/RCCollector/logs"
+ application_config:
+ collector.rcc.appDescription: DCAE RestConf Collector Application
+ collector.rcc.appName: "dcae-rcc"
+ collector.rcc.dmaap.streamid: "notification=device-registration"
+ collector.rcc.inputQueue.maxPending: "8096"
+ tomcat.maxthreads: "200"
+ collector.rcc.service.port: "8686"
+ collector.rcc.service.secure.port: "8687"
+ collector.rcc.keystore.file.location: "/opt/app/restconfcollector/etc/keystore"
+ collector.rcc.keystore.passwordfile: "/opt/app/restconfcollector/etc/rcc_password"
+ collector.rcc.keystore.alias: "dynamically generated"
+ collector.rcc.truststore.file.location: "/opt/app/restconfcollector/etc/truststore.onap.client.jks"
+ collector.rcc.truststore.passwordfile: "/opt/app/restconfcollector/etc/trustpasswordfile"
+ collector.keystore.file.location: "/opt/app/restconfcollector/etc/sdnc.p12"
+ collector.keystore.passwordfile: "/opt/app/restconfcollector/etc/passwordfile"
+ collector.header.authflag: "0"
+ collector.header.authlist: "sample1,c2FtcGxlMQ=="
+ collector.rcc.service.secure.clientauth: "0"
+ streams_publishes:
+ notification:
+ dmaap_info:
+ topic_url:
+ get_input: notification_publish_url
+ type: message_router
+ rcc_policy: '[{"controller_name":"AccessM&C","controller_restapiUrl":"192.167.1.3:8080","controller_restapiUser":"access","controller_restapiPassword":"Huawei@123","controller_accessTokenUrl":"/rest/plat/smapp/v1/oauth/token","controller_accessTokenFile":"./etc/access-token.json","controller_accessTokenMethod":"put","controller_subsMethod":"post","controller_subscriptionUrl":"/restconf/v1/operations/huawei-nce-notification-action:establish-subscription","event_details":[{"event_name":"ONT_registration","event_description":"ONTregistartionevent","event_sseventUrlEmbed":"true","event_sseventsField":"output.url","event_sseventsUrl":"null","event_subscriptionTemplate":"./etc/ont_registartion_subscription_template.json","event_unSubscriptionTemplate":"./etc/ont_registartion_unsubscription_template.json","event_ruleId":"12345678"}]}]'
+ interfaces:
+ cloudify.interfaces.lifecycle:
+ start:
+ inputs:
+ envs:
+ DMAAPHOST:
+ { get_input: dmaap_host }
+ DMAAPPORT:
+ { get_input: dmaap_port }
+ DMAAPPUBTOPIC: "unauthenticated.DCAE_RCC_OUTPUT"
+ CONSUL_HOST:
+ { get_input: consul_host }
+ CONSUL_PORT:
+ { get_input: consul_port }
+ CBS_HOST:
+ { get_input: cbs_host }
+ CBS_PORT:
+ { get_input: cbs_port }
+ CONFIG_BINDING_SERVICE: "config_binding_service"
+ ports:
+ - concat: ["8080:", { get_input: external_port }]
diff --git a/dpo/data-formats/dcaeRCCOutput.json b/dpo/data-formats/dcaeRCCOutput.json
new file mode 100755
index 0000000..72fb6eb
--- /dev/null
+++ b/dpo/data-formats/dcaeRCCOutput.json
@@ -0,0 +1,35 @@
+{
+ "self": {
+ "name": "DCAE_RCC_OUTPUT",
+ "version": "1.0.0",
+ "description": "teri format of the output CL event from DCAE to Policy"
+ },
+ "dataformatversion": "1.0.0",
+ "jsonschema": {
+ "$schema": "http://json-schema.org/draft-04/schema#",
+ "title": "RCC event Publish",
+ "type": "object",
+ "definitions": {
+ "ruleid": {
+ "description": "Rule id",
+ "type": "string"
+ },
+ "notification": {
+ "description": "Notification message",
+ "type": "object"
+ }
+ },
+ "properties": {
+ "rule-id": {
+ "description": "Rule id to be used by VES mapper",
+ "type": "string",
+ "$ref": "#/definitions/ruleid"
+ },
+ "notification": {
+ "description": "Notification event",
+ "type": "object",
+ "$ref": "#/definitions/notification"
+ }
+ }
+ }
+}
diff --git a/dpo/data-formats/dmaap.json b/dpo/data-formats/dmaap.json
new file mode 100644
index 0000000..11c08d3
--- /dev/null
+++ b/dpo/data-formats/dmaap.json
@@ -0,0 +1,10 @@
+{
+ "rcc_handle_out": {
+ "aaf_username": "USER",
+ "aaf_password": "PASSWORD",
+ "type": "message_router",
+ "dmaap_info": {
+ "topic_url": "https://HOSTNAME:3905/events/unauthenticated.DCAE_RCC_OUTPUT"
+ }
+ }
+} \ No newline at end of file
diff --git a/dpo/spec/rcc_spec.json b/dpo/spec/rcc_spec.json
new file mode 100644
index 0000000..2cae9ff
--- /dev/null
+++ b/dpo/spec/rcc_spec.json
@@ -0,0 +1,200 @@
+{
+ "self": {
+ "version": "1.0.0",
+ "name": "dcae-restconfcollector",
+ "description": "Collector for subscribing events/notification from external controller in rest format and publishing those events to Ves collector",
+ "component_type": "docker"
+ },
+ "streams": {
+ "subscribes": [],
+ "publishes": [{
+ "config_key": "rcc_handle_out",
+ "format": "DCAE_RCC_OUTPUT",
+ "version": "1.0.0",
+ "type": "message router"
+ }]
+ },
+ "services": {
+ "calls": [],
+ "provides": []
+ },
+ "parameters": [
+ {
+ "name": "collector.rcc.appName",
+ "description": "DCAE RestConf Collector Application",
+ "value": "dcae-rcc",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": false
+ },
+ {
+ "name": "collector.rcc.appDescription",
+ "description": "DCAE RestConf Collector Application",
+ "value": "DCAE RestConf Collector Application",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": false
+ },
+ {
+ "name": "collector.rcc.dmaap.streamid",
+ "description": "Stream id",
+ "value": "notification=device-registration",
+ "sourced_at_deployment": true,
+ "policy_editable": false,
+ "designer_editable": false
+ },
+ {
+ "name": "collector.rcc.inputQueue.maxPending",
+ "description": "Number of max queue outstanding",
+ "value": "8096",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": false
+ },
+ {
+ "name": "collector.rcc.service.port",
+ "value": "-1",
+ "description": "standard http port collector will open for listening; this will be disabled when collector.header.authflag is set to 1",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": false
+ },
+ {
+ "name": "collector.rcc.service.secure.port",
+ "value": "-1",
+ "description": "standard https port collector will open for listening; this will be enabled when collector.header.authflag is set to 1",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": false
+ },
+ {
+ "name": "collector.header.authflag",
+ "value": "-1",
+ "description": "Should be set to 1 when open secure port",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": false
+ },
+ {
+ "name": "collector.header.authlist",
+ "value": "sample1,$2a$10$pgjaxDzSuc6XVFEeqvxQ5u90DKJnM/u7TJTcinAlFJVaavXMWf/Zi",
+ "description": "List of id and base 64 encoded password.Password value should be base64 encoded in config here",
+ "policy_editable": false,
+ "sourced_at_deployment": true,
+ "designer_editable": true
+ },
+ {
+ "name": "collector.rcc.keystore.file.location",
+ "value": "/opt/app/RCCollector/dcae-certificate/keystore.jks",
+ "description": "fs location of keystore file in vm",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": false
+ },
+ {
+ "name": "collector.rcc.keystore.passwordfile",
+ "value": "/opt/app/RCCollector/dcae-certificate/.password",
+ "description": "location of keystore password file in vm",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": false
+ },
+ {
+ "name": "collector.rcc.keystore.alias",
+ "value": "dynamically generated",
+ "description": "alias to access the keystore; collector will identify this based on keystore and password file",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": false
+ },
+ {
+ "name": "collector.rcc.truststore.file.location",
+ "value": "/opt/app/RCCollector/dcae-certificate/truststore.jks",
+ "description": "fs location of truststore file in vm",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": false
+ },
+ {
+ "name": "collector.rcc.truststore.passwordfile",
+ "value": "/opt/app/RCCollector/dcae-certificate/.trustpassword",
+ "description": "location of truststore password file in vm",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": false
+ },
+ {
+ "name": "tomcat.maxthreads",
+ "description": "Max threads",
+ "value": "200",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": false
+ },
+ {
+ "name": "rcc_policy",
+ "description": "RCC Policy JSON",
+ "value":"[{\"controller_name\":\"AccessM&C\",\"controller_restapiUrl\":\"192.167.1.3:8080\",\"controller_restapiUser\":\"access\",\"controller_restapiPassword\":\"Huawei@123\",\"controller_accessTokenUrl\":\"/rest/plat/smapp/v1/oauth/token\",\"controller_accessTokenFile\":\"./etc/access-token.json\",\"controller_accessTokenMethod\":\"put\",\"controller_subsMethod\":\"post\",\"controller_subscriptionUrl\":\"/restconf/v1/operations/huawei-nce-notification-action:establish-subscription\",\"event_details\":[{\"event_name\":\"ONT_registration\",\"event_description\":\"ONTregistartionevent\",\"event_sseventUrlEmbed\":\"true\",\"event_sseventsField\":\"output.url\",\"event_sseventsUrl\":\"null\",\"event_subscriptionTemplate\":\"./etc/ont_registartion_subscription_template.json\",\"event_unSubscriptionTemplate\":\"./etc/ont_registartion_unsubscription_template.json\",\"event_ruleId\":\"12345678\"}]}]",
+ "sourced_at_deployment": false,
+ "policy_editable": true,
+ "designer_editable": false
+ },
+ {
+ "name": "collector.keystore.file.location",
+ "value": "/opt/app/restconfcolletcor/etc/keystore",
+ "description": "fs location of keystore file in vm",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": false
+ },
+ {
+ "name": "collector.keystore.passwordfile",
+ "value": "/opt/app/restconfcolletcor/etc/rcc_passwordfile",
+ "description": "location of keystore password file in vm",
+ "sourced_at_deployment": false,
+ "policy_editable": false,
+ "designer_editable": false
+ }
+ ],
+
+ "auxilary": {
+ "healthcheck": {
+ "type": "https",
+ "interval": "15s",
+ "timeout": "1s",
+ "endpoint": "/healthcheck"
+ },
+ "volumes": [
+ {
+ "container": {
+ "bind": "/opt/app/dcae-certificate"
+ },
+ "host": {
+ "path": "/opt/app/restconfcollector/dcae-certificate"
+ }
+ },
+ {
+ "container": {
+ "bind": "/opt/app/restconfcollector/logs"
+ },
+ "host": {
+ "path": "/opt/logs/DCAE/restconfcollector/logs"
+ }
+ },
+ {
+ "container": {
+ "bind": "/opt/app/restconfcollector/etc"
+ },
+ "host": {
+ "path": "/opt/logs/restconfcollector/etc"
+ }
+ }
+ ]
+ },
+ "artifacts": [
+ {
+ "type": "docker image",
+ "uri": "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.restconfcollector"
+ }
+ ]
+}