Removed 'mock' from TOSCA deployment
[oom.git] / TOSCA / Helm / onap-blueprint.yaml
1 # ============LICENSE_START==========================================
2 # ===================================================================
3 # Copyright (c) 2017 AT&T
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
20 imports:
21   - http://www.getcloudify.org/spec/cloudify/3.4.2/types.yaml
22   - http://www.getcloudify.org/spec/fabric-plugin/1.5/plugin.yaml
23
24 inputs:
25   # For agent, toggle to true.
26   install_method:
27     default: none # For fabric use false.
28   ip:
29   user:
30     default: centos
31   namespace:
32     default: onap
33
34 node_types:
35   cloudify.nodes.Helm:
36     derived_from: cloudify.nodes.SoftwareComponent
37     properties:
38       cwd:
39         default: /home/centos/oom/kubernetes
40       args:
41         default:
42         - onap
43         - mso
44     interfaces:
45       cloudify.interfaces.lifecycle:
46         # This is for fabric: # Run Anywhere.
47         start:
48           implementation: fabric.fabric_plugin.tasks.run_script
49           inputs:
50             script_path:
51               default: helminstall.sh # Relative to the blueprint file.
52             process:
53               default: &process_vars
54                 cwd: { get_property: [ SELF, cwd ] }
55                 args: { get_property: [ SELF, args ] }
56             fabric_env:
57               default: &fabric_env
58                 user: { get_property: [ k8s_master, agent_config, user ] }
59                 host_string: { get_property: [ k8s_master, ip ] }
60                 key: { get_property: [ k8s_master, agent_config, key ] }
61         stop:
62           implementation: fabric.fabric_plugin.tasks.run_script
63           inputs:
64             script_path:
65               default: helmdelete.sh
66             process:
67               default: *process_vars
68             fabric_env:
69               default: *fabric_env
70
71 node_templates:
72
73   k8s_master:
74      type: cloudify.nodes.Compute
75      properties:
76        ip: { get_input: ip }
77        agent_config:
78          install_method: { get_input: install_method } # False for Fabric.
79          key: { get_secret: agent_key_private }
80          user: { get_input: user }
81
82   k8s_env:
83     type: cloudify.nodes.SoftwareComponent
84     properties:
85     interfaces:
86       cloudify.interfaces.lifecycle:
87          start:
88           implementation: fabric.fabric_plugin.tasks.run_script
89           inputs:
90             script_path: k8s_setup_env.sh
91             process:
92               args:  [{ get_input: namespace }]
93             fabric_env:
94               host_string: { get_input: ip }
95               user: { get_input: user }
96               key: { get_secret: agent_key_private }
97          stop:
98           implementation: fabric.fabric_plugin.tasks.run_script
99           inputs:
100             script_path: k8s_delete_env.sh
101             process:
102               args:  [{ get_input: namespace }]
103             fabric_env:
104               host_string: { get_input: ip }
105               user: { get_input: user }
106               key: { get_secret: agent_key_private }
107     relationships:
108       - type: cloudify.relationships.connected_to
109         target: k8s_master
110
111   consul:
112      type: cloudify.nodes.Helm
113      properties:
114        args:
115        - { get_input: namespace }
116        - consul
117      relationships:
118        - type: cloudify.relationships.connected_to
119          target: k8s_env
120
121   msb:
122      type: cloudify.nodes.Helm
123      properties:
124        args:
125        - { get_input: namespace }
126        - msb
127      relationships:
128        - type: cloudify.relationships.connected_to
129          target: k8s_env
130
131   so:
132     type: cloudify.nodes.Helm
133     properties:
134       args:
135       - { get_input: namespace }
136       - so
137     relationships:
138       - type: cloudify.relationships.connected_to
139         target: k8s_env
140
141   appc:
142      type: cloudify.nodes.Helm
143      properties:
144        args:
145        - { get_input: namespace }
146        - appc
147      relationships:
148        - type: cloudify.relationships.connected_to
149          target: k8s_env
150
151   dmaap:
152     type: cloudify.nodes.Helm
153     properties:
154       args:
155       - { get_input: namespace }
156       - dmaap
157     relationships:
158       - type: cloudify.relationships.connected_to
159         target: k8s_env
160
161   oof:
162     type: cloudify.nodes.Helm
163     properties:
164       args:
165       - { get_input: namespace }
166       - oof
167     relationships:
168       - type: cloudify.relationships.connected_to
169         target: k8s_env
170
171   sdnc:
172     type: cloudify.nodes.Helm
173     properties:
174       args:
175       - { get_input: namespace }
176       - sdnc
177     relationships:
178       - type: cloudify.relationships.connected_to
179         target: k8s_env
180
181   vid:
182     type: cloudify.nodes.Helm
183     properties:
184       args:
185       - { get_input: namespace }
186       - vid
187     relationships:
188       - type: cloudify.relationships.connected_to
189         target: k8s_env
190
191   robot:
192     type: cloudify.nodes.Helm
193     properties:
194       args:
195       - { get_input: namespace }
196       - robot
197     relationships:
198       - type: cloudify.relationships.connected_to
199         target: k8s_env
200
201   policy:
202     type: cloudify.nodes.Helm
203     properties:
204       args:
205       - { get_input: namespace }
206       - policy
207     relationships:
208       - type: cloudify.relationships.connected_to
209         target: k8s_env
210
211   portal:
212     type: cloudify.nodes.Helm
213     properties:
214       args:
215       - { get_input: namespace }
216       - portal
217     relationships:
218       - type: cloudify.relationships.connected_to
219         target: k8s_env
220
221   aai:
222     type: cloudify.nodes.Helm
223     properties:
224       args:
225       - { get_input: namespace }
226       - aai
227     relationships:
228       - type: cloudify.relationships.connected_to
229         target: k8s_env
230
231   sdc:
232     type: cloudify.nodes.Helm
233     properties:
234       args:
235       - { get_input: namespace }
236       - sdc
237     relationships:
238       - type: cloudify.relationships.connected_to
239         target: k8s_env
240
241   log:
242     type: cloudify.nodes.Helm
243     properties:
244       args:
245       - { get_input: namespace }
246       - log
247     relationships:
248       - type: cloudify.relationships.connected_to
249         target: k8s_env
250
251   cli:
252     type: cloudify.nodes.Helm
253     properties:
254       args:
255       - { get_input: namespace }
256       - cli
257     relationships:
258       - type: cloudify.relationships.connected_to
259         target: k8s_env
260
261   multicloud:
262     type: cloudify.nodes.Helm
263     properties:
264       args:
265       - { get_input: namespace }
266       - multicloud
267     relationships:
268       - type: cloudify.relationships.connected_to
269         target: k8s_env
270
271   clamp:
272     type: cloudify.nodes.Helm
273     properties:
274       args:
275       - { get_input: namespace }
276       - clamp
277     relationships:
278       - type: cloudify.relationships.connected_to
279         target: k8s_env
280
281   vnfsdk:
282     type: cloudify.nodes.Helm
283     properties:
284       args:
285       - { get_input: namespace }
286       - vnfsdk
287     relationships:
288       - type: cloudify.relationships.connected_to
289         target: k8s_env
290
291   uui:
292     type: cloudify.nodes.Helm
293     properties:
294       args:
295       - { get_input: namespace }
296       - uui
297     relationships:
298       - type: cloudify.relationships.connected_to
299         target: k8s_env
300
301   aaf:
302     type: cloudify.nodes.Helm
303     properties:
304       args:
305       - { get_input: namespace }
306       - aaf
307     relationships:
308       - type: cloudify.relationships.connected_to
309         target: k8s_env
310
311   vfc:
312     type: cloudify.nodes.Helm
313     properties:
314       args:
315       - { get_input: namespace }
316       - vfc
317     relationships:
318       - type: cloudify.relationships.connected_to
319         target: k8s_env
320
321   dcaegen2:
322     type: cloudify.nodes.Helm
323     properties:
324       args:
325       - { get_input: namespace }
326       - dcaegen2
327     relationships:
328       - type: cloudify.relationships.connected_to
329         target: k8s_env
330
331   esr:
332     type: cloudify.nodes.Helm
333     properties:
334       args:
335       - { get_input: namespace }
336       - esr
337     relationships:
338       - type: cloudify.relationships.connected_to
339         target: k8s_env
340
341   sniro-emulator:
342     type: cloudify.nodes.Helm
343     properties:
344       args:
345       - { get_input: namespace }
346       - sniro-emulator
347     relationships:
348       - type: cloudify.relationships.connected_to
349         target: k8s_env