cloudify blueprint added
[dcaegen2/analytics/tca-gen2.git] / dcae-analytics / dcae-analytics-tca-web / dpo / blueprint / k8s-tca-gen2-web.yaml
1 # ============LICENSE_START====================================================
2 # =============================================================================
3 # Copyright (C) 2019 IBM
4 # =============================================================================
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
8 #
9 #      http://www.apache.org/licenses/LICENSE-2.0
10 #
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 # ============LICENSE_END======================================================
17
18 tosca_definitions_version: cloudify_dsl_1_3
19 imports:
20 - http://www.getcloudify.org/spec/cloudify/3.4/types.yaml
21 - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.5/k8splugin_types.yaml
22 - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml
23 inputs:
24   external_port:
25     type: string
26     description: Kubernetes node port on which collector is exposed
27     default: "30235"
28   service_name:
29     type: string
30     default: 'dcae-analytics-tca-gen2'
31   log_directory:
32     type: string
33   replicas:
34     type: integer
35     description: number of instances
36     default: 1
37   spring.mongodb.uri:
38     type: string
39     default: "mongodb://localhost:27017/analytics-tca"
40   tag_version:
41     type: string
42     default: "nexus.onap.org:10001/onap/org.onap.dcaegen2.analytics.tca-gen2.dcae-analytics-tca-web:3.0.0-SNAPSHOT"
43   tca.aai.password:
44     type: string
45     default: "DCAE"
46   tca.aai.url:
47     type: string
48     default: "http://localhost:8443"
49   tca.aai.username:
50     type: string
51     default: "DCAE"
52   tca_handle_in_subscribe_url:
53     type: string
54   tca_handle_out_publish_url:
55     type: string
56 node_templates:
57   docker.tca:
58     type: dcae.nodes.ContainerizedPlatformComponent
59     interfaces:
60       cloudify.interfaces.lifecycle:
61         start:
62           inputs:
63             ports: []
64     properties:
65       application_config:
66         service_calls: []
67         stream_publishes:
68           tca_handle_out:
69             dmaap_info:
70               topic_url:
71                 get_input: tca_handle_out_publish_url
72             type: message router
73         stream_subcribes:
74           tca_handle_in:
75             dmaap_info:
76               topic_url:
77                 get_input: tca_handle_in_subscribe_url
78             type: message router
79         spring.mongodb.uri:
80           get_input: spring.mongodb.uri
81         streams_subscribes.tca_handle_in.consumer_group: cg1
82         streams_subscribes.tca_handle_in.consumer_ids[0]: c0
83         streams_subscribes.tca_handle_in.consumer_ids[1]: c1
84         streams_subscribes.tca_handle_in.message_limit: 50000
85         streams_subscribes.tca_handle_in.polling.auto_adjusting.max: 60000
86         streams_subscribes.tca_handle_in.polling.auto_adjusting.min: 30000
87         streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down: 30000
88         streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up: 10000
89         streams_subscribes.tca_handle_in.polling.fixedRate: 0
90         streams_subscribes.tca_handle_in.timeout: -1
91         tca.aai.generic_vnf_path: aai/v11/network/generic-vnfs/generic-vnf
92         tca.aai.node_query_path: aai/v11/search/nodes-query
93         tca.aai.password:
94           get_input: tca.aai.password
95         tca.aai.url:
96           get_input: tca.aai.url
97         tca.aai.username:
98           get_input: tca.aai.username
99         tca.policy: {"domain":"measurementsForVfScaling","metricsPerEventName":[{"eventName":"Mfvs_eNodeB_RANKPI","controlLoopSchemaType":"VNF","policyScope":"resource=vFirewall;type=configuration","policyName":"configuration.dcae.microservice.tca.xml","policyVersion":"v0.0.1","thresholds":[{"closedLoopControlName":"CL-FRWL-LOW-TRAFFIC-SIG-d925ed73-8231-4d02-9545-db4e101f88f8","closedLoopEventStatus":"ONSET","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated","thresholdValue":4000,"direction":"LESS_OR_EQUAL","severity":"MAJOR"},{"closedLoopControlName":"CL-FRWL-HIGH-TRAFFIC-SIG-EA36FE84-9342-5E13-A656-EC5F21309A09","closedLoopEventStatus":"ONSET","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated","thresholdValue":20000,"direction":"GREATER_OR_EQUAL","severity":"CRITICAL"},{"closedLoopControlName":"CL-FRWL-HIGH-TRAFFIC-SIG-EA36FE84-9342-5E13-A656-EC5F21309A09","closedLoopEventStatus":"ABATED","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated","thresholdValue":0,"direction":"EQUAL","severity":"CRITICAL"}]},{"eventName":"vLoadBalancer","controlLoopSchemaType":"VNF","policyScope":"resource=vLoadBalancer;type=configuration","policyName":"configuration.dcae.microservice.tca.xml","policyVersion":"v0.0.1","thresholds":[{"closedLoopControlName":"CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A","closedLoopEventStatus":"ONSET","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated","thresholdValue":500,"direction":"LESS_OR_EQUAL","severity":"MAJOR"},{"closedLoopControlName":"CL-LBAL-LOW-TRAFFIC-SIG-0C5920A6-B564-8035-C878-0E814352BC2B","closedLoopEventStatus":"ONSET","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated","thresholdValue":5000,"direction":"GREATER_OR_EQUAL","severity":"CRITICAL"}]},{"eventName":"virtualVMEventName","controlLoopSchemaType":"VM","policyScope":"resource=virtualVM;type=configuration","policyName":"configuration.dcae.microservice.tca.xml","policyVersion":"v0.0.1","thresholds":[{"closedLoopControlName":"CL-LBAL-LOW-TRAFFIC-SIG-FB480F95-A453-6F24-B767-FD703241AB1A","closedLoopEventStatus":"ONSET","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedBroadcastPacketsAccumulated","thresholdValue":500,"direction":"LESS_OR_EQUAL","severity":"MAJOR"}]}]}
100         tca.processing_batch_size: 10000
101       docker_config:
102         interval: 30s
103         timeout: 10s
104         type: http
105         endpoint: actuator/health
106       image:
107         get_input: tag_version
108       log_info:
109         get_input: log_directory
110       dns_name: { get_input: service_name }
111       replicas:
112         get_input: replicas
113       name: { get_input: service_name }