Process fault clearance notification from RANSIM
[dcaegen2/services/son-handler.git] / dpo / blueprints / k8s-sonhms.yaml
1  #============LICENSE_START=======================================================
2  #    son-handler
3  #   ================================================================================
4  #     Copyright (C) 2019 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   - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/k8splugin/1.4.5/k8splugin_types.yaml
23   - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.ccsdk.platform.plugins/type_files/pgaas/1.1.0/pgaas_types.yaml
24   - https://nexus.onap.org/service/local/repositories/raw/content/org.onap.dcaegen2.platform.plugins/R4/dcaepolicyplugin/2.3.0/dcaepolicyplugin_types.yaml
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:1.1.0"
34   pgaas_cluster_name:
35     type: string
36     description: pg cluster
37     default: "dcae-postgres.onap.svc.cluster.local"
38   database_name:
39     type: string
40     description: database name
41     default: sonhms
42   aaf_username:
43     type: string
44     description: aaf username
45   aaf_password:
46     type: string
47     description: aaf password
48   polling_interval:
49     type: integer
50     description: dmaap polling interval
51     default: 20
52   cbs_polling_interval:
53     type: integer
54     description: cbs polling interval
55     default: 60
56   polling_timeout:
57     type: integer
58     description: dmaap polling timeout
59     default: 60
60   num_solutions:
61     type: integer
62     description: num of solutions
63     default: 5
64   min_collision:
65     type: integer
66     description: minimum no. of collisions
67     default: 5
68   min_confusion: 
69     type: integer
70     description: minimum no. of confusions
71     default: 5
72   max_clusters:
73     type: integer
74     description: maximum clusters
75     default: 5
76   bad_threshold:
77     type: integer
78     description: threshold for bad neighbors
79     default: 50
80   poor_threshold:
81     type: integer
82     description: threshold for poor neighbors
83     default: 70
84   namespace:
85     type: string
86     description: namespace
87     default: onap
88   dmaap:
89     type: string
90     description: dmaap server
91     default: message-router
92   buffer_time:
93     type: integer
94     description: buffer time
95     default: 60
96   cg:
97     type: string
98     description: consumer group
99     default: sonhms-cg
100   cid:
101     type: string
102     description: consumer id
103     default: sonhms-cid
104   config_db:
105     type: string
106     description: config db location
107   oof:
108     type: string
109     description: oof location
110   oof_endpoint:
111     type: string
112     description: oof endpoint
113     default: /api/oof/v1/pci
114   pci_optimizer:
115     type: string
116     description: pci optimizer name in oof
117     default: pci
118   pci_anr_optimizer:
119     type: string
120     description: pci and anr optimizer name in oof
121     default: pci_anr
122   log_path:
123     type: string
124     description: log location in host
125     default: /dockerdata-nfs/son-handler
126   poorCountThreshold:
127     type: integer
128     description: poor neighbor count threshold
129     default: 3
130   badCountThreshold:
131     type: integer
132     description: bad neighbor count threshold
133     default: 3
134   oofTriggerCountTimer:
135     type: integer
136     description: timer for oof triggered count in minutes
137     default: 30
138   oofTriggerCountThreshold:
139     type: integer
140     description: Threshold for oof trigger count
141     default: 5
142   policyRespTimer:
143     type: integer
144     description: policy response wait timer in seconds
145     default: 10
146   policy_id:
147     type: string
148     description: policy id for config policy
149   topic00_location:
150   topic01_location:
151   topic02_location:
152   topic03_location:
153   topic04_location:
154   topic00_client_role:
155   topic01_client_role:
156   topic02_client_role:
157   topic03_client_role:
158   topic04_client_role:
159   topic00_client_id:
160   topic01_client_id:
161   topic02_client_id:
162   topic03_client_id:
163   topic04_client_id:
164   topic00_url:
165   topic01_url:
166   topic02_url:
167   topic03_url:
168   topic04_url:
169
170   
171 node_templates:
172   pgaasvm:
173     type: dcae.nodes.pgaas.database
174     properties: 
175       writerfqdn: { get_input: pgaas_cluster_name }
176       name: { get_input: database_name }
177       use_existing: false
178     
179   sonhms:
180     type: dcae.nodes.ContainerizedServiceComponent
181     interfaces:
182       cloudify.interfaces.lifecycle:
183         start:
184           inputs:
185             ports:
186               - "8080:0"
187             volumes:
188               - host:
189                   path: { get_input: log_path }
190                 container:
191                   bind: /home/sonhms/logs
192                   mode: rw
193     properties:
194       image:
195         get_input: tag_version
196       service_component_type: 'dcae-sonhms'
197       service_id: 'sonhms'
198       always_pull_image: true
199       replicas: {get_input: replicas}
200       docker_config:
201         healthcheck:
202           endpoint: /healthcheck
203           interval: 15s
204           timeout: 1s
205           type: http
206       application_config:
207         streams_subscribes:
208           performance_management_topic:
209             aaf_username: { get_input: aaf_username }
210             aaf_password: { get_input: aaf_password }
211             dmaap_info:
212               location: { get_input: topic00_location }
213               client_role: { get_input: topic00_client_role }
214               client_id: { get_input: topic00_client_id }
215               topic_url: { get_input: topic00_url }
216             type: message-router
217           fault_management_topic:
218             aaf_username: { get_input: aaf_username }
219             aaf_password: { get_input: aaf_password }
220             dmaap_info: 
221               location: { get_input: topic01_location }
222               client_role: { get_input: topic01_client_role }
223               client_id: { get_input: topic01_client_id }
224               topic_url: { get_input: topic01_url }
225             type: message-router
226           nbr_list_change_topic:
227             aaf_username: { get_input: aaf_username }
228             aaf_password: { get_input: aaf_password }
229             dmaap_info:
230               location: { get_input: topic02_location }
231               client_role: { get_input: topic02_client_role }
232               client_id: { get_input: topic02_client_id }
233               topic_url: { get_input: topic02_url }
234             type: message-router
235           dcae_cl_response_topic:
236             aaf_username: { get_input: aaf_username }
237             aaf_password: { get_input: aaf_password }
238             dmaap_info:
239               location: { get_input: topic04_location }
240               client_role: { get_input: topic04_client_role }
241               client_id: { get_input: topic04_client_id }
242               topic_url: { get_input: topic04_url }
243             type: message-router
244         streams_publishes:
245           CL_topic:
246             aaf_username: { get_input: aaf_username }
247             aaf_password: { get_input: aaf_password }
248             dmaap_info: 
249               location: { get_input: topic03_location }
250               client_role: { get_input: topic03_client_role }
251               client_id: { get_input: topic03_client_id }
252               topic_url: { get_input: topic03_url }
253             type: message-router
254         postgres.host: { get_attribute: [ pgaasvm, admin, host ] }
255         postgres.port: { get_attribute: [ pgaasvm, admin, port ] }
256         postgres.username: { get_attribute: [ pgaasvm, admin, user ] }
257         postgres.password: { get_attribute: [ pgaasvm, admin, password ] }
258         sonhandler.pollingInterval: { get_input: polling_interval}
259         sonhandler.pollingTimeout: { get_input: polling_timeout }
260         cbsPollingInterval: { get_input: cbs_polling_interval }
261         sonhandler.numSolutions: { get_input: num_solutions }
262         sonhandler.minCollision: { get_input: min_collision }
263         sonhandler.minConfusion: { get_input: min_confusion }
264         sonhandler.maximumClusters: { get_input: max_clusters }
265         sonhandler.badThreshold: { get_input: bad_threshold }
266         sonhandler.poorThreshold: { get_input: poor_threshold }
267         sonhandler.namespace: { get_input: namespace }
268         sonhandler.sourceId: SONHMS
269         sonhandler.dmaap.server: 
270           - { get_input: dmaap }
271         sonhandler.bufferTime: { get_input: buffer_time }
272         sonhandler.cg: { get_input: cg }
273         sonhandler.cid: { get_input: cid }
274         sonhandler.configDb.service: { get_input: config_db }
275         sonhandler.oof.service: { get_input: oof }
276         sonhandler.oof.endpoint: { get_input: oof_endpoint }
277         sonhandler.pciOptimizer: { get_input: pci_optimizer }
278         sonhandler.pciAnrOptimizer: { get_input: pci_anr_optimizer }
279         sonhandler.poorCountThreshold: { get_input: poorCountThreshold}
280         sonhandler.badCountThreshold: { get_input: badCountThreshold}
281         sonhandler.oofTriggerCountTimer: { get_input: oofTriggerCountTimer}
282         sonhandler.oofTriggerCountThreshold: { get_input: oofTriggerCountThreshold}
283         sonhandler.policyRespTimer: { get_input: policyRespTimer}
284         service_calls:
285           sdnr-getpnfname: []
286           sdnr-getpci: []
287           sdnr-getnbrlist: []
288           sdnr-getcelllist: []
289           oof-req: []
290           policy-req: []
291     relationships:
292       - type: cloudify.relationships.depends_on
293         target: pgaasvm
294       - type: cloudify.relationships.depends_on
295         target: son_policy
296
297   son_policy:
298     type: dcae.nodes.policy
299     properties:
300       policy_id:
301            get_input: policy_id
302        
303       
304       
305