[DCAEGEN2]Release dcaegen2-services-son-handler maven dependency
[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.0.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   polling_timeout:
53     type: integer
54     description: dmaap polling timeout
55     default: 60
56   num_solutions:
57     type: integer
58     description: num of solutions
59     default: 5
60   min_collision:
61     type: integer
62     description: minimum no. of collisions
63     default: 5
64   min_confusion: 
65     type: integer
66     description: minimum no. of confusions
67     default: 5
68   max_clusters:
69     type: integer
70     description: maximum clusters
71     default: 5
72   bad_threshold:
73     type: integer
74     description: threshold for bad neighbors
75     default: 50
76   poor_threshold:
77     type: integer
78     description: threshold for poor neighbors
79     default: 70
80   namespace:
81     type: string
82     description: namespace
83     default: onap
84   dmaap:
85     type: string
86     description: dmaap server
87     default: message-router
88   buffer_time:
89     type: integer
90     description: buffer time
91     default: 60
92   cg:
93     type: string
94     description: consumer group
95     default: sonhms-cg
96   cid:
97     type: string
98     description: consumer id
99     default: sonhms-cid
100   config_db:
101     type: string
102     description: config db location
103   oof:
104     type: string
105     description: oof location
106   pci_optimizer:
107     type: string
108     description: pci optimizer name in oof
109     default: pci
110   log_path:
111     type: string
112     description: log location in host
113     default: /dockerdata-nfs/son-handler
114   policy_id:
115     type: string
116     description: policy id for config policy
117   topic00_location:
118   topic01_location:
119   topic02_location:
120   topic03_location:
121   topic04_location:
122   topic00_client_role:
123   topic01_client_role:
124   topic02_client_role:
125   topic03_client_role:
126   topic04_client_role:
127   topic00_client_id:
128   topic01_client_id:
129   topic02_client_id:
130   topic03_client_id:
131   topic04_client_id:
132   topic00_url:
133   topic01_url:
134   topic02_url:
135   topic03_url:
136   topic04_url:
137
138   
139 node_templates:
140   pgaasvm:
141     type: dcae.nodes.pgaas.database
142     properties: 
143       writerfqdn: { get_input: pgaas_cluster_name }
144       name: { get_input: database_name }
145       use_existing: false
146     
147   sonhms:
148     type: dcae.nodes.ContainerizedServiceComponent
149     interfaces:
150       cloudify.interfaces.lifecycle:
151         start:
152           inputs:
153             ports:
154               - "8080:0"
155             volumes:
156               - host:
157                   path: { get_input: log_path }
158                 container:
159                   bind: /home/sonhms/logs
160                   mode: rw
161     properties:
162       image:
163         get_input: tag_version
164       service_component_type: 'dcae-sonhms'
165       service_id: 'sonhms'
166       always_pull_image: true
167       replicas: {get_input: replicas}
168       docker_config:
169         healthcheck:
170           endpoint: /healthcheck
171           interval: 15s
172           timeout: 1s
173           type: http
174       application_config:
175         streams_subscribes:
176           performance_management_topic:
177             aaf_username: { get_input: aaf_username }
178             aaf_password: { get_input: aaf_password }
179             dmaap_info:
180               location: { get_input: topic00_location }
181               client_role: { get_input: topic00_client_role }
182               client_id: { get_input: topic00_client_id }
183               topic_url: { get_input: topic00_url }
184             type: message-router
185           fault_management_topic:
186             aaf_username: { get_input: aaf_username }
187             aaf_password: { get_input: aaf_password }
188             dmaap_info: 
189               location: { get_input: topic01_location }
190               client_role: { get_input: topic01_client_role }
191               client_id: { get_input: topic01_client_id }
192               topic_url: { get_input: topic01_url }
193             type: message-router
194           nbr_list_change_topic:
195             aaf_username: { get_input: aaf_username }
196             aaf_password: { get_input: aaf_password }
197             dmaap_info:
198               location: { get_input: topic02_location }
199               client_role: { get_input: topic02_client_role }
200               client_id: { get_input: topic02_client_id }
201               topic_url: { get_input: topic02_url }
202             type: message-router
203           dcae_cl_response_topic:
204             aaf_username: { get_input: aaf_username }
205             aaf_password: { get_input: aaf_password }
206             dmaap_info:
207               location: { get_input: topic04_location }
208               client_role: { get_input: topic04_client_role }
209               client_id: { get_input: topic04_client_id }
210               topic_url: { get_input: topic04_url }
211             type: message-router
212         streams_publishes:
213           CL_topic:
214             aaf_username: { get_input: aaf_username }
215             aaf_password: { get_input: aaf_password }
216             dmaap_info: 
217               location: { get_input: topic03_location }
218               client_role: { get_input: topic03_client_role }
219               client_id: { get_input: topic03_client_id }
220               topic_url: { get_input: topic03_url }
221             type: message-router
222         postgres.host: { get_attribute: [ pgaasvm, admin, host ] }
223         postgres.port: { get_attribute: [ pgaasvm, admin, port ] }
224         postgres.username: { get_attribute: [ pgaasvm, admin, user ] }
225         postgres.password: { get_attribute: [ pgaasvm, admin, password ] }
226         sonhandler.pollingInterval: { get_input: polling_interval}
227         sonhandler.pollingTimeout: { get_input: polling_timeout }
228         sonhandler.numSolutions: { get_input: num_solutions }
229         sonhandler.minCollision: { get_input: min_collision }
230         sonhandler.minConfusion: { get_input: min_confusion }
231         sonhandler.maximumClusters: { get_input: max_clusters }
232         sonhandler.badThreshold: { get_input: bad_threshold }
233         sonhandler.poorThreshold: { get_input: poor_threshold }
234         sonhandler.namespace: { get_input: namespace }
235         sonhandler.sourceId: SONHMS
236         sonhandler.dmaap.server: 
237           - { get_input: dmaap }
238         sonhandler.bufferTime: { get_input: buffer_time }
239         sonhandler.cg: { get_input: cg }
240         sonhandler.cid: { get_input: cid }
241         sonhandler.configDb.service: { get_input: config_db }
242         sonhandler.oof.service: { get_input: oof }
243         sonhandler.optimizers: 
244           - { get_input: pci_optimizer }
245         service_calls:
246           sdnr-getpnfname: []
247           sdnr-getpci: []
248           sdnr-getnbrlist: []
249           sdnr-getcelllist: []
250           oof-req: []
251           policy-req: []
252     relationships:
253       - type: cloudify.relationships.depends_on
254         target: pgaasvm
255       - type: cloudify.relationships.depends_on
256         target: son_policy
257
258   son_policy:
259     type: dcae.nodes.policy
260     properties:
261       policy_id:
262            get_input: policy_id
263        
264       
265       
266