blob: d11597f3ab064c2f01f3d61cb652f0434b6243f0 [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
151 message-router:
152 type: cloudify.nodes.Helm
153 properties:
154 args:
Hong Guan02638a22018-04-20 13:49:23 -0400155 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500156 - message-router
157 relationships:
158 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400159 target: k8s_env
Jun Hu64e83a32018-01-09 15:11:05 -0500160
161 sdnc:
162 type: cloudify.nodes.Helm
163 properties:
164 args:
Hong Guan02638a22018-04-20 13:49:23 -0400165 - { get_input: namespace }
Jun Hu64e83a32018-01-09 15:11:05 -0500166 - sdnc
167 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 vid:
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 - vid
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 robot:
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 - robot
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 policy:
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 - policy
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 portal:
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 - portal
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 aai:
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 - aai
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 sdc:
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 - sdc
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 log:
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 - log
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 cli:
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 - cli
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 multicloud:
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 - multicloud
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 clamp:
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 - clamp
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 vnfsdk:
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 - vnfsdk
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 uui:
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 - uui
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 aaf:
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 - aaf
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 vfc:
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 - vfc
307 relationships:
308 - type: cloudify.relationships.connected_to
Hong Guan02638a22018-04-20 13:49:23 -0400309 target: k8s_env
310
311 dcaegen2:
312 type: cloudify.nodes.Helm
313 properties:
314 args:
315 - { get_input: namespace }
316 - dcaegen2
317 relationships:
318 - type: cloudify.relationships.connected_to
319 target: k8s_env
320
321 esr:
322 type: cloudify.nodes.Helm
323 properties:
324 args:
325 - { get_input: namespace }
326 - esr
327 relationships:
328 - type: cloudify.relationships.connected_to
329 target: k8s_env
330
331 mock:
332 type: cloudify.nodes.Helm
333 properties:
334 args:
335 - { get_input: namespace }
336 - mock
337 relationships:
338 - type: cloudify.relationships.connected_to
339 target: k8s_env