[DCAE] INFO.yaml update
[dcaegen2/platform/blueprints.git] / blueprints / k8s-kpi-ms.yaml
1  #
2  #============LICENSE_START=======================================================
3  #Copyright (C) 2021 China Mobile.
4  #Copyright (C) 2021 Nokia
5  # Copyright (c) 2021 AT&T Intellectual Property. All rights reserved.
6  #==============================================================================
7  #Licensed under the Apache License, Version 2.0 (the "License");
8  #you may not use this file except in compliance with the License.
9  #You may obtain a copy of the License at
10  #
11  #    http://www.apache.org/licenses/LICENSE-2.0
12  #
13  #Unless required by applicable law or agreed to in writing, software
14  #distributed under the License is distributed on an "AS IS" BASIS,
15  #WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  #See the License for the specific language governing permissions and
17  #limitations under the License.
18  #============LICENSE_END=========================================================
19 tosca_definitions_version: cloudify_dsl_1_3
20 imports:
21   - 'http://www.getcloudify.org/spec/cloudify/4.5.5/types.yaml'
22   - plugin:dmaap?version=>=1.5.1,<2.0.0
23   - plugin:k8splugin?version=>=3.4.3,<4.0.0
24 inputs:
25   replicas:
26     type: integer
27     description: replica count for deployment
28     default: 1
29   tag_version:
30     type: string
31     description: docker image name and version
32     default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.components.kpi-ms:1.0.1"
33   aaf_username:
34     type: string
35     description: aaf username
36     default: "dcae@dcae.onap.org"
37   aaf_password:
38     type: string
39     description: aaf password
40     default: "demo123456!"
41   dmaap_polling_interval:
42     type: integer
43     description: dmaap polling interval
44     default: 20
45   cbs_polling_interval:
46     type: integer
47     description: cbs polling interval
48     default: 60
49   dmaap_polling_timeout:
50     type: integer
51     description: dmaap polling timeout
52     default: 60
53   dmaap:
54     type: string
55     description: dmaap server
56     default: "message-router"
57   cg:
58     type: string
59     description: consumer group
60     default: "kpi-cg"
61   cid:
62     type: string
63     description: consumer id
64     default: "kpi-cid"
65   log_path:
66     type: string
67     description: log location in host
68     default: "/dockerdata-nfs/kpi-ms"
69   performance_management_topic_url:
70     type: string
71     description: performance measurement topic url
72     default: "https://message-router.onap.svc.cluster.local:3905/events/org.onap.dmaap.mr.PERFORMANCE_MEASUREMENTS"
73   dcae_kpi_topic_url:
74     type: string
75     description: dcae control loop topic url
76     default: "https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_KPI_OUTPUT"
77 node_templates:
78   kpims:
79     type: dcae.nodes.ContainerizedServiceComponent
80     interfaces:
81       cloudify.interfaces.lifecycle:
82         start:
83           inputs:
84             envs:
85               STANDALONE: "false"
86             ports:
87               - "8080:0"
88             volumes:
89               - host:
90                   path: { get_input: log_path }
91                 container:
92                   bind: /home/kpims/logs
93                   mode: rw
94     properties:
95       image:
96         get_input: tag_version
97       service_component_type: 'dcae-kpi-ms'
98       service_id: 'kpims'
99       service_component_name_override: 'dcae-kpi-ms'
100       always_pull_image: true
101       replicas: {get_input: replicas}
102       docker_config:
103         healthcheck:
104           endpoint: /healthcheck
105           interval: 15s
106           timeout: 1s
107           type: http
108       tls_info:
109         cert_directory: '/opt/app/kpims/etc/cert/'
110         use_tls: true
111       application_config:
112         aafUsername: { get_input: aaf_username }
113         aafPassword: { get_input: aaf_password }
114         trust_store_path: '/opt/app/kpims/etc/cert/trust.jks'
115         trust_store_pass_path: '/opt/app/kpims/etc/cert/trust.pass'
116         streams_subscribes:
117           performance_management_topic:
118             aaf_username: { get_input: aaf_username }
119             aaf_password: { get_input: aaf_password }
120             dmaap_info:
121               topic_url: { get_input: performance_management_topic_url }
122             type: message-router
123         streams_publishes:
124           kpi_topic:
125             dmaap_info:
126               topic_url: { get_input: dcae_kpi_topic_url }
127             type: message-router
128         pollingInterval: { get_input: dmaap_polling_interval}
129         pollingTimeout: { get_input: dmaap_polling_timeout }
130         cbsPollingInterval: { get_input: cbs_polling_interval }
131         dmaap.server:
132           - { get_input: dmaap }
133         cg: { get_input: cg }
134         cid: { get_input: cid }
135         kpi.policy:
136           '{"domain":"measurementsForKpi","methodForKpi":[{"eventName":"perf3gpp_CORE-AMF_pmMeasResult","controlLoopSchemaType":"SLICE","policyScope":"resource=networkSlice;type=configuration","policyName":"configuration.dcae.microservice.kpi-computation","policyVersion":"v0.0.1","kpis":[{"measType":"AMFRegNbr","operation":"SUM","operands":"RM.RegisteredSubNbrMean"}]},{"eventName":"perf3gpp_CORE-UPF_pmMeasResult","controlLoopSchemaType":"SLICE","policyScope":"resource=networkSlice;type=configuration","policyName":"configuration.dcae.microservice.kpi-computation","policyVersion":"v0.0.1","kpis":[{"measType":"UpstreamThr","operation":"SUM","operands":"GTP.InDataOctN3UPF"},{"measType":"DownstreamThr","operation":"SUM","operands":"GTP.OutDataOctN3UPF"}]}]}'
137