c707ac128cce49cc3eadc13beb8e0140ff2a8890
[dcaegen2/platform/blueprints.git] / blueprints / k8s-sonhms.yaml
1  #============LICENSE_START=======================================================
2  #    son-handler
3  #   ================================================================================
4  #     Copyright (C) 2019-2020 Wipro Limited.
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 imports:
21   - "http://www.getcloudify.org/spec/cloudify/3.4/types.yaml"
22   - plugin:k8splugin?version=3.4.2
23   - plugin:pgaas?version=1.3.0
24   - plugin:dcaepolicyplugin?version=2.4.0
25 inputs:
26   replicas:
27     type: integer
28     description: replica count for deployment
29     default: 1
30   tag_version:
31     type: string
32     description: docker image name and version
33     default: "nexus3.onap.org:10001/onap/org.onap.dcaegen2.services.son-handler:2.1.2"
34   pgaas_cluster_name:
35     type: string
36     description: pg cluster
37     default: "dcae-pg-primary.onap"
38   database_name:
39     type: string
40     description: database name
41     default: "sonhms"
42   aaf_username:
43     type: string
44     description: aaf username
45     default:
46   aaf_password:
47     type: string
48     description: aaf password
49     default:
50   polling_interval:
51     type: integer
52     description: dmaap polling interval
53     default: 20
54   cbs_polling_interval:
55     type: integer
56     description: cbs polling interval
57     default: 60
58   polling_timeout:
59     type: integer
60     description: dmaap polling timeout
61     default: 60
62   num_solutions:
63     type: integer
64     description: num of solutions
65     default: 5
66   min_collision:
67     type: integer
68     description: minimum no. of collisions
69     default: 5
70   min_confusion:
71     type: integer
72     description: minimum no. of confusions
73     default: 5
74   max_clusters:
75     type: integer
76     description: maximum clusters
77     default: 5
78   bad_threshold:
79     type: integer
80     description: threshold for bad neighbors
81     default: 50
82   poor_threshold:
83     type: integer
84     description: threshold for poor neighbors
85     default: 70
86   namespace:
87     type: string
88     description: namespace
89     default: "onap"
90   dmaap:
91     type: string
92     description: dmaap server
93     default: "message-router"
94   buffer_time:
95     type: integer
96     description: buffer time
97     default: 60
98   cg:
99     type: string
100     description: consumer group
101     default: "sonhms-cg"
102   cid:
103     type: string
104     description: consumer id
105     default: "sonhms-cid"
106   config_db:
107     type: string
108     description: config db location
109     default: "http://sdnc.onap:8181"
110   oof:
111     type: string
112     description: oof location
113     default: "https://oof-osdf.onap:8698"
114   oof_endpoint:
115     type: string
116     description: oof endpoint
117     default: "/api/oof/v1/pci"
118   pci_optimizer:
119     type: string
120     description: pci optimizer name in oof
121     default: "pci"
122   pci_anr_optimizer:
123     type: string
124     description: pci and anr optimizer name in oof
125     default: "pci_anr"
126   log_path:
127     type: string
128     description: log location in host
129     default: "/dockerdata-nfs/son-handler"
130   poorCountThreshold:
131     type: integer
132     description: poor neighbor count threshold
133     default: 3
134   badCountThreshold:
135     type: integer
136     description: bad neighbor count threshold
137     default: 3
138   oofTriggerCountTimer:
139     type: integer
140     description: timer for oof triggered count in minutes
141     default: 30
142   oofTriggerCountThreshold:
143     type: integer
144     description: Threshold for oof trigger count
145     default: 5
146   policyRespTimer:
147     type: integer
148     description: policy response wait timer in seconds
149     default: 10
150   policy_id:
151     type: string
152     description: policy id for config policy
153     default: "com.Config_PCIMS_CONFIG_POLICY"
154   performance_management_topic_url:
155     type: string
156     description: ves measurement topic url
157     default: "https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.VES_MEASUREMENT_OUTPUT"
158   fault_management_topic_url:
159     type: string
160     description: ves fault topic url
161     default: "https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.SEC_FAULT_OUTPUT"
162   nbr_list_change_topic_url:
163     type: string
164     description: neighbor list change notification topic url
165     default: "https://message-router.onap.svc.cluster.local:3905/events/PCI-NOTIF-TOPIC-NGHBR-LIST-CHANGE-INFO"
166   dcae_cl_response_topic_url:
167     type: string
168     description: dcae control loop response topic url
169     default: "https://message-router.onap.svc.cluster.local:3905/events/DCAE_CL_RSP"
170   dcae_cl_topic_url:
171     type: string
172     description: dcae control loop topic url
173     default: "https://message-router.onap.svc.cluster.local:3905/events/unauthenticated.DCAE_CL_OUTPUT"
174   policyNegativeAckThreshold:
175     type: integer
176     description: negative acknowledgement from policy threshold
177     default: 3
178   policyFixedPciTimeInterval:
179     type: integer
180     description: time interval for checking FixedPci table
181     default: 30000
182   nfNamingCode:
183     type: string
184     description: filter fm and pm notification using this parameter
185     default: "RansimAgent"
186
187 node_templates:
188   pgaasvm:
189     type: dcae.nodes.pgaas.database
190     properties:
191       writerfqdn: { get_input: pgaas_cluster_name }
192       name: { get_input: database_name }
193       use_existing: false
194
195   sonhms:
196     type: dcae.nodes.ContainerizedServiceComponent
197     interfaces:
198       cloudify.interfaces.lifecycle:
199         start:
200           inputs:
201             envs:
202               STANDALONE: "false"
203             ports:
204               - "8080:0"
205             volumes:
206               - host:
207                   path: { get_input: log_path }
208                 container:
209                   bind: /home/sonhms/logs
210                   mode: rw
211     properties:
212       image:
213         get_input: tag_version
214       service_component_type: 'dcae-sonhms'
215       service_id: 'sonhms'
216       always_pull_image: true
217       replicas: {get_input: replicas}
218       docker_config:
219         healthcheck:
220           endpoint: /healthcheck
221           interval: 15s
222           timeout: 1s
223           type: http
224       application_config:
225         streams_subscribes:
226           performance_management_topic:
227             aaf_username: { get_input: aaf_username }
228             aaf_password: { get_input: aaf_password }
229             dmaap_info:
230               topic_url: { get_input: performance_management_topic_url }
231             type: message-router
232           fault_management_topic:
233             aaf_username: { get_input: aaf_username }
234             aaf_password: { get_input: aaf_password }
235             dmaap_info:
236               topic_url: { get_input: fault_management_topic_url }
237             type: message-router
238           nbr_list_change_topic:
239             aaf_username: { get_input: aaf_username }
240             aaf_password: { get_input: aaf_password }
241             dmaap_info:
242               topic_url: { get_input: nbr_list_change_topic_url }
243             type: message-router
244           dcae_cl_response_topic:
245             aaf_username: { get_input: aaf_username }
246             aaf_password: { get_input: aaf_password }
247             dmaap_info:
248               topic_url: { get_input: dcae_cl_response_topic_url }
249             type: message-router
250         streams_publishes:
251           CL_topic:
252             aaf_username: { get_input: aaf_username }
253             aaf_password: { get_input: aaf_password }
254             dmaap_info:
255               topic_url: { get_input: dcae_cl_topic_url }
256             type: message-router
257         postgres.host: { get_attribute: [ pgaasvm, admin, host ] }
258         postgres.port: { get_attribute: [ pgaasvm, admin, port ] }
259         postgres.username: { get_attribute: [ pgaasvm, admin, user ] }
260         postgres.password: { get_attribute: [ pgaasvm, admin, password ] }
261         sonhandler.pollingInterval: { get_input: polling_interval}
262         sonhandler.pollingTimeout: { get_input: polling_timeout }
263         cbsPollingInterval: { get_input: cbs_polling_interval }
264         sonhandler.numSolutions: { get_input: num_solutions }
265         sonhandler.minCollision: { get_input: min_collision }
266         sonhandler.minConfusion: { get_input: min_confusion }
267         sonhandler.maximumClusters: { get_input: max_clusters }
268         sonhandler.badThreshold: { get_input: bad_threshold }
269         sonhandler.poorThreshold: { get_input: poor_threshold }
270         sonhandler.namespace: { get_input: namespace }
271         sonhandler.sourceId: SONHMS
272         sonhandler.dmaap.server:
273           - { get_input: dmaap }
274         sonhandler.bufferTime: { get_input: buffer_time }
275         sonhandler.cg: { get_input: cg }
276         sonhandler.cid: { get_input: cid }
277         sonhandler.configDb.service: { get_input: config_db }
278         sonhandler.oof.service: { get_input: oof }
279         sonhandler.oof.endpoint: { get_input: oof_endpoint }
280         sonhandler.pciOptimizer: { get_input: pci_optimizer }
281         sonhandler.pciAnrOptimizer: { get_input: pci_anr_optimizer }
282         sonhandler.poorCountThreshold: { get_input: poorCountThreshold}
283         sonhandler.badCountThreshold: { get_input: badCountThreshold}
284         sonhandler.oofTriggerCountTimer: { get_input: oofTriggerCountTimer}
285         sonhandler.oofTriggerCountThreshold: { get_input: oofTriggerCountThreshold}
286         sonhandler.policyRespTimer: { get_input: policyRespTimer}
287         sonhandler.policyNegativeAckThreshold: { get_input: policyNegativeAckThreshold}
288         sonhandler.policyFixedPciTimeInterval: { get_input: policyFixedPciTimeInterval}
289         sonhandler.nfNamingCode: { get_input: nfNamingCode}
290         service_calls:
291           sdnr-getpnfname: []
292           sdnr-getpci: []
293           sdnr-getnbrlist: []
294           sdnr-getcelllist: []
295           oof-req: []
296           policy-req: []
297     relationships:
298       - type: cloudify.relationships.depends_on
299         target: pgaasvm
300       - type: cloudify.relationships.depends_on
301         target: son_policy
302
303   son_policy:
304     type: dcae.nodes.policy
305     properties:
306       policy_id:
307            get_input: policy_id
308
309
310
311