Update blueprints to use k8splugin 3.4.3
[dcaegen2/platform/blueprints.git] / blueprints / k8s-tcagen2.yaml
1 # ============LICENSE_START====================================================
2 # =============================================================================
3 # Copyright (C) 2019-2020 AT&T Intellectual Property. All rights reserved.
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   - https://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml
21   - plugin:k8splugin?version=3.4.3
22 inputs:
23   service_component_type:
24     type: string
25     default: "dcae-tcagen2"
26   service_id:
27     type: string
28     default: "dcae-tcagen2"
29   service_component_name_override:
30     type: string
31     default: "dcae-tcagen2"
32   log_directory:
33     type: string
34     default: "/opt/logs/dcae-analytics-tca"
35   replicas:
36     type: integer
37     description: number of instances
38     default: 1
39   spring.data.mongodb.uri:
40     type: string
41     default: "mongodb://dcae-mongohost/dcae-tcagen2"
42   tag_version:
43     type: string
44     default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.analytics.tca-gen2.dcae-analytics-tca-web:1.2.1"
45   tca.aai.password:
46     type: string
47     default: "DCAE"
48   tca.aai.url:
49     type: string
50     default: "http://aai.onap.svc.cluster.local"
51   tca.aai.username:
52     type: string
53     default: "DCAE"
54   tca_handle_in_subscribe_url:
55     type: string
56     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.VES_MEASUREMENT_OUTPUT"
57   tca_handle_out_publish_url:
58     type: string
59     default: "http://message-router.onap.svc.cluster.local:3904/events/unauthenticated.DCAE_CL_OUTPUT"
60   tca_consumer_group:
61     type: string
62     default: "cg1"
63
64 node_templates:
65   docker.tca:
66     type: dcae.nodes.ContainerizedServiceComponent
67     interfaces:
68       cloudify.interfaces.lifecycle:
69         start:
70           inputs:
71             ports:
72               - concat: ["9091:", "0"]
73     properties:
74       application_config:
75         service_calls: []
76         streams_publishes:
77           tca_handle_out:
78             dmaap_info:
79               topic_url:
80                 get_input: tca_handle_out_publish_url
81             type: message_router
82         streams_subscribes:
83           tca_handle_in:
84             dmaap_info:
85               topic_url:
86                 get_input: tca_handle_in_subscribe_url
87             type: message_router
88         spring.data.mongodb.uri:
89           get_input: spring.data.mongodb.uri
90         streams_subscribes.tca_handle_in.consumer_group:
91           get_input: tca_consumer_group
92         streams_subscribes.tca_handle_in.consumer_ids[0]: c0
93         streams_subscribes.tca_handle_in.consumer_ids[1]: c1
94         streams_subscribes.tca_handle_in.message_limit: 50000
95         streams_subscribes.tca_handle_in.polling.auto_adjusting.max: 60000
96         streams_subscribes.tca_handle_in.polling.auto_adjusting.min: 30000
97         streams_subscribes.tca_handle_in.polling.auto_adjusting.step_down: 30000
98         streams_subscribes.tca_handle_in.polling.auto_adjusting.step_up: 10000
99         streams_subscribes.tca_handle_in.polling.fixed_rate: 0
100         streams_subscribes.tca_handle_in.timeout: -1
101         tca.aai.enable_enrichment: true
102         tca.aai.generic_vnf_path: aai/v11/network/generic-vnfs/generic-vnf
103         tca.aai.node_query_path: aai/v11/search/nodes-query
104         tca.aai.password:
105           get_input: tca.aai.password
106         tca.aai.url:
107           get_input: tca.aai.url
108         tca.aai.username:
109           get_input: tca.aai.username
110         tca.policy: '{"domain":"measurementsForVfScaling","metricsPerEventName":[{"eventName":"vFirewallBroadcastPackets","controlLoopSchemaType":"VM","policyScope":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyVersion":"v0.0.1","thresholds":[{"closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta","thresholdValue":300,"direction":"LESS_OR_EQUAL","severity":"MAJOR","closedLoopEventStatus":"ONSET"},{"closedLoopControlName":"ControlLoop-vFirewall-d0a1dfc6-94f5-4fd4-a5b5-4630b438850a","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta","thresholdValue":700,"direction":"GREATER_OR_EQUAL","severity":"CRITICAL","closedLoopEventStatus":"ONSET"}]},{"eventName":"vLoadBalancer","controlLoopSchemaType":"VM","policyScope":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyVersion":"v0.0.1","thresholds":[{"closedLoopControlName":"ControlLoop-vDNS-6f37f56d-a87d-4b85-b6a9-cc953cf779b3","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.vNicPerformanceArray[*].receivedTotalPacketsDelta","thresholdValue":300,"direction":"GREATER_OR_EQUAL","severity":"CRITICAL","closedLoopEventStatus":"ONSET"}]},{"eventName":"Measurement_vGMUX","controlLoopSchemaType":"VNF","policyScope":"DCAE","policyName":"DCAE.Config_tca-hi-lo","policyVersion":"v0.0.1","thresholds":[{"closedLoopControlName":"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value","thresholdValue":0,"direction":"EQUAL","severity":"MAJOR","closedLoopEventStatus":"ABATED"},{"closedLoopControlName":"ControlLoop-vCPE-48f0c2c3-a172-4192-9ae3-052274181b6e","version":"1.0.2","fieldPath":"$.event.measurementsForVfScalingFields.additionalMeasurements[*].arrayOfFields[0].value","thresholdValue":0,"direction":"GREATER","severity":"CRITICAL","closedLoopEventStatus":"ONSET"}]}]}'
111         tca.processing_batch_size: 10000
112         tca.enable_abatement: true
113         tca.enable_ecomp_logging: true
114       docker_config:
115         healthcheck:
116           endpoint: /actuator/health
117           interval: 30s
118           timeout: 10s
119           type: http
120       image:
121         get_input: tag_version
122       log_info:
123         log_directory:
124           get_input: log_directory
125       tls_info:
126         use_tls: true
127         cert_directory: '/etc/tca-gen2/ssl'
128       replicas:
129         get_input: replicas
130       service_component_type: { get_input: service_component_type }
131       service_id: { get_input: service_id }
132       service_component_name_override: { get_input: service_component_name_override }