[DCAE] Version bump for restconf and snmptrap collector
[dcaegen2/platform/blueprints.git] / blueprints / k8s-restconf.yaml
1 # ============LICENSE_START====================================================
2 # =============================================================================
3 # Copyright (c) 2017-2021 AT&T Intellectual Property. All rights reserved.
4 # Copyright (c) 2019 Huawei. All rights reserved.
5 # =============================================================================
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
9 #
10 #      http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
17 # ============LICENSE_END======================================================
18
19 tosca_definitions_version: cloudify_dsl_1_3
20
21 description: >
22   This blueprint deploys/manages the RestConf Collector module as a Docker container
23
24 imports:
25   - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml
26   - plugin:k8splugin?version=>=3.4.3,<4.0.0
27 inputs:
28   dmaap_host:
29     type: string
30     default: "message-router.onap.svc.cluster.local"
31   dmaap_port:
32     type: string
33     default: "3904"
34   tag_version:
35     type: string
36     default:  "nexus3.onap.org:10001/onap/org.onap.dcaegen2.collectors.restconfcollector:1.2.4"
37   consul_host:
38     type: string
39     default: "consul-server.onap.svc.cluster.local"
40   consul_port:
41     type: string
42     default: "8500"
43   cbs_host:
44     type: string
45     default: "config-binding-service.dcae.svc.cluster.local"
46   cbs_port:
47     type: string
48     default: "10000"
49   external_port:
50     type: string
51     description: Kubernetes node port on which collector is exposed
52     default: "30416"
53   notification_publish_url:
54     type: string
55     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_RCC_OUTPUT"
56   service_component_type:
57     type: string
58     default: "dcae-restconf-collector"
59   service_id:
60     type: string
61     default: "dcae-restconf-collector"
62   service_component_name_override:
63     type: string
64     default: "dcae-restconf-collector"
65
66 node_templates:
67   rcc_k8s:
68     type: dcae.nodes.ContainerizedServiceComponent
69     properties:
70         docker_config:
71             healthcheck:
72               endpoint: /healthcheck
73               interval: 15s
74               timeout: 1s
75               type: http
76         image:
77           get_input: tag_version
78         log_info:
79           log_directory: "/opt/app/RCCollector/logs"
80         application_config:
81             collector.rcc.appDescription: DCAE RestConf Collector Application
82             collector.rcc.appName: "dcae-rcc"
83             collector.rcc.dmaap.streamid: "notification=device-registration"
84             collector.rcc.inputQueue.maxPending: "8096"
85             tomcat.maxthreads: "200"
86             collector.rcc.service.port: "8080"
87             collector.rcc.service.secure.port: "8687"
88             collector.rcc.keystore.file.location: "/opt/app/restconfcollector/etc/keystore"
89             collector.rcc.keystore.passwordfile: "/opt/app/restconfcollector/etc/rcc_passwordfile"
90             collector.rcc.keystore.alias: "dynamically generated"
91             collector.rcc.truststore.file.location: "/opt/app/restconfcollector/etc/truststore.onap.client.jks"
92             collector.rcc.truststore.passwordfile: "/opt/app/restconfcollector/etc/trustpasswordfile"
93             collector.keystore.file.location: "/opt/app/restconfcollector/etc/sdnc.p12"
94             collector.keystore.passwordfile: "/opt/app/restconfcollector/etc/passwordfile"
95             collector.header.authflag: "0"
96             collector.header.authlist: "sample1,c2FtcGxlMQ=="
97             collector.rcc.service.secure.clientauth: "0"
98             streams_publishes:
99                         device-registration:
100                           dmaap_info:
101                             topic_url:
102                               get_input: notification_publish_url
103                           type: message_router
104             rcc_policy: '[{"controller_name":"AccessM&C","controller_restapiUrl":"172.30.0.55:26335","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","controller_disableSsl":"true","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","modifyData": "true","modifyMethod": "modifyOntEvent","userData": "remote_id=AC9.0234.0337;svlan=100;cvlan=10;"}]}]'
105         service_component_type: { get_input: service_component_type }
106         service_id: { get_input: service_id }
107         service_component_name_override: { get_input: service_component_name_override }
108     interfaces:
109       cloudify.interfaces.lifecycle:
110         start:
111           inputs:
112             envs:
113                 DMAAPHOST:
114                     { get_input: dmaap_host }
115                 DMAAPPORT: "3904"
116                 DMAAPPUBTOPIC: "unauthenticated.DCAE_RCC_OUTPUT"
117                 CONSUL_HOST:
118                     { get_input: consul_host }
119                 CONSUL_PORT: "8500"
120                 CBS_HOST:
121                     { get_input: cbs_host }
122                 CBS_PORT: "10000"
123                 CONFIG_BINDING_SERVICE: "config_binding_service"
124             ports:
125               - concat: ["8080:", { get_input: external_port }]
126