blob: c5b699b5be2d8c4e6265b732bad159e0b1990644 [file] [log] [blame]
Jun Hu64e83a32018-01-09 15:11:05 -05001# ============LICENSE_START==========================================
2# ===================================================================
Jun (Nicolas) Hu8cbcb302018-02-21 14:18:44 -05003# Copyright (c) 2017 AT&T
Jun Hu64e83a32018-01-09 15:11:05 -05004#
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
18tosca_definitions_version: cloudify_dsl_1_3
19
20imports:
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
24inputs:
25 # For agent, toggle to true.
26 install_method:
27 default: none # For fabric use false.
28 ip:
29 user:
30 default: centos
Hong Guan02638a22018-04-20 13:49:23 -040031 namespace:
Jun Hu64e83a32018-01-09 15:11:05 -050032 default: onap
33
34node_types:
35 cloudify.nodes.Helm:
36 derived_from: cloudify.nodes.SoftwareComponent
37 properties:
38 cwd:
Hong Guan02638a22018-04-20 13:49:23 -040039 default: /home/centos/oom/kubernetes
Jun Hu64e83a32018-01-09 15:11:05 -050040 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
71node_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
Hong Guan02638a22018-04-20 13:49:23 -040082 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
Jun Hu64e83a32018-01-09 15:11:05 -0500111 consul:
112 type: cloudify.nodes.Helm
113 properties:
114 args:
Hong Guan02638a22018-04-20 13:49:23 -0400115 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500116 - consul
117 relationships:
118 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400119 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500120
121 msb:
122 type: cloudify.nodes.Helm
123 properties:
124 args:
Hong Guan02638a22018-04-20 13:49:23 -0400125 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500126 - msb
127 relationships:
128 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400129 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500130
Hong Guan02638a22018-04-20 13:49:23 -0400131 so:
Jun Hu64e83a32018-01-09 15:11:05 -0500132 type: cloudify.nodes.Helm
133 properties:
134 args:
Hong Guan02638a22018-04-20 13:49:23 -0400135 - { get_input: namespace }
136 - so
Jun Hu64e83a32018-01-09 15:11:05 -0500137 relationships:
138 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400139 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500140
141 appc:
142 type: cloudify.nodes.Helm
143 properties:
144 args:
Hong Guan02638a22018-04-20 13:49:23 -0400145 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500146 - appc
147 relationships:
148 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400149 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500150
Hong Guana8f269e2018-05-09 11:36:00 -0400151 dmaap:
Jun Hu64e83a32018-01-09 15:11:05 -0500152 type: cloudify.nodes.Helm
153 properties:
154 args:
Hong Guan02638a22018-04-20 13:49:23 -0400155 - { get_input: namespace }
Hong Guana8f269e2018-05-09 11:36:00 -0400156 - 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
Jun Hu64e83a32018-01-09 15:11:05 -0500167 relationships:
168 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400169 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500170
171 sdnc:
172 type: cloudify.nodes.Helm
173 properties:
174 args:
Hong Guan02638a22018-04-20 13:49:23 -0400175 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500176 - sdnc
177 relationships:
178 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400179 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500180
181 vid:
182 type: cloudify.nodes.Helm
183 properties:
184 args:
Hong Guan02638a22018-04-20 13:49:23 -0400185 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500186 - vid
187 relationships:
188 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400189 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500190
191 robot:
192 type: cloudify.nodes.Helm
193 properties:
194 args:
Hong Guan02638a22018-04-20 13:49:23 -0400195 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500196 - robot
197 relationships:
198 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400199 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500200
201 policy:
202 type: cloudify.nodes.Helm
203 properties:
204 args:
Hong Guan02638a22018-04-20 13:49:23 -0400205 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500206 - policy
207 relationships:
208 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400209 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500210
211 portal:
212 type: cloudify.nodes.Helm
213 properties:
214 args:
Hong Guan02638a22018-04-20 13:49:23 -0400215 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500216 - portal
217 relationships:
218 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400219 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500220
221 aai:
222 type: cloudify.nodes.Helm
223 properties:
224 args:
Hong Guan02638a22018-04-20 13:49:23 -0400225 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500226 - aai
227 relationships:
228 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400229 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500230
231 sdc:
232 type: cloudify.nodes.Helm
233 properties:
234 args:
Hong Guan02638a22018-04-20 13:49:23 -0400235 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500236 - sdc
237 relationships:
238 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400239 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500240
241 log:
242 type: cloudify.nodes.Helm
243 properties:
244 args:
Hong Guan02638a22018-04-20 13:49:23 -0400245 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500246 - log
247 relationships:
248 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400249 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500250
251 cli:
252 type: cloudify.nodes.Helm
253 properties:
254 args:
Hong Guan02638a22018-04-20 13:49:23 -0400255 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500256 - cli
257 relationships:
258 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400259 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500260
261 multicloud:
262 type: cloudify.nodes.Helm
263 properties:
264 args:
Hong Guan02638a22018-04-20 13:49:23 -0400265 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500266 - multicloud
267 relationships:
268 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400269 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500270
271 clamp:
272 type: cloudify.nodes.Helm
273 properties:
274 args:
Hong Guan02638a22018-04-20 13:49:23 -0400275 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500276 - clamp
277 relationships:
278 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400279 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500280
281 vnfsdk:
282 type: cloudify.nodes.Helm
283 properties:
284 args:
Hong Guan02638a22018-04-20 13:49:23 -0400285 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500286 - vnfsdk
287 relationships:
288 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400289 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500290
291 uui:
292 type: cloudify.nodes.Helm
293 properties:
294 args:
Hong Guan02638a22018-04-20 13:49:23 -0400295 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500296 - uui
297 relationships:
298 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400299 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500300
301 aaf:
302 type: cloudify.nodes.Helm
303 properties:
304 args:
Hong Guan02638a22018-04-20 13:49:23 -0400305 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500306 - aaf
307 relationships:
308 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400309 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500310
311 vfc:
312 type: cloudify.nodes.Helm
313 properties:
314 args:
Hong Guan02638a22018-04-20 13:49:23 -0400315 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500316 - vfc
317 relationships:
318 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400319 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
Hong Guaneb2af802018-05-14 15:37:15 -0400341 sniro-emulator:
Hong Guan02638a22018-04-20 13:49:23 -0400342 type: cloudify.nodes.Helm
343 properties:
344 args:
345 - { get_input: namespace }
Hong Guaneb2af802018-05-14 15:37:15 -0400346 - sniro-emulator
Hong Guan02638a22018-04-20 13:49:23 -0400347 relationships:
348 - type: cloudify.relationships.connected_to
Hong Guaneb2af802018-05-14 15:37:15 -0400349 target: k8s_env
Hong Guanc6fdd532018-05-18 08:19:10 -0400350
351 nbi:
352 type: cloudify.nodes.Helm
353 properties:
354 args:
355 - { get_input: namespace }
356 - nbi
357 relationships:
358 - type: cloudify.relationships.connected_to
359 target: k8s_env