Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 1 | # ============LICENSE_START========================================== |
| 2 | # =================================================================== |
Jun (Nicolas) Hu | 8cbcb30 | 2018-02-21 14:18:44 -0500 | [diff] [blame] | 3 | # Copyright (c) 2017 AT&T |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 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 |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 31 | namespace: |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 32 | default: onap |
| 33 | |
| 34 | node_types: |
| 35 | cloudify.nodes.Helm: |
| 36 | derived_from: cloudify.nodes.SoftwareComponent |
| 37 | properties: |
| 38 | cwd: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 39 | default: /home/centos/oom/kubernetes |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 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 | |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 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 | |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 111 | consul: |
| 112 | type: cloudify.nodes.Helm |
| 113 | properties: |
| 114 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 115 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 116 | - consul |
| 117 | relationships: |
| 118 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 119 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 120 | |
| 121 | msb: |
| 122 | type: cloudify.nodes.Helm |
| 123 | properties: |
| 124 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 125 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 126 | - msb |
| 127 | relationships: |
| 128 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 129 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 130 | |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 131 | so: |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 132 | type: cloudify.nodes.Helm |
| 133 | properties: |
| 134 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 135 | - { get_input: namespace } |
| 136 | - so |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 137 | relationships: |
| 138 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 139 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 140 | |
| 141 | appc: |
| 142 | type: cloudify.nodes.Helm |
| 143 | properties: |
| 144 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 145 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 146 | - appc |
| 147 | relationships: |
| 148 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 149 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 150 | |
Hong Guan | a8f269e | 2018-05-09 11:36:00 -0400 | [diff] [blame] | 151 | dmaap: |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 152 | type: cloudify.nodes.Helm |
| 153 | properties: |
| 154 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 155 | - { get_input: namespace } |
Hong Guan | a8f269e | 2018-05-09 11:36:00 -0400 | [diff] [blame] | 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 |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 167 | relationships: |
| 168 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 169 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 170 | |
| 171 | sdnc: |
| 172 | type: cloudify.nodes.Helm |
| 173 | properties: |
| 174 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 175 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 176 | - sdnc |
| 177 | relationships: |
| 178 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 179 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 180 | |
| 181 | vid: |
| 182 | type: cloudify.nodes.Helm |
| 183 | properties: |
| 184 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 185 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 186 | - vid |
| 187 | relationships: |
| 188 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 189 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 190 | |
| 191 | robot: |
| 192 | type: cloudify.nodes.Helm |
| 193 | properties: |
| 194 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 195 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 196 | - robot |
| 197 | relationships: |
| 198 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 199 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 200 | |
| 201 | policy: |
| 202 | type: cloudify.nodes.Helm |
| 203 | properties: |
| 204 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 205 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 206 | - policy |
| 207 | relationships: |
| 208 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 209 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 210 | |
| 211 | portal: |
| 212 | type: cloudify.nodes.Helm |
| 213 | properties: |
| 214 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 215 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 216 | - portal |
| 217 | relationships: |
| 218 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 219 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 220 | |
| 221 | aai: |
| 222 | type: cloudify.nodes.Helm |
| 223 | properties: |
| 224 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 225 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 226 | - aai |
| 227 | relationships: |
| 228 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 229 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 230 | |
| 231 | sdc: |
| 232 | type: cloudify.nodes.Helm |
| 233 | properties: |
| 234 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 235 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 236 | - sdc |
| 237 | relationships: |
| 238 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 239 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 240 | |
| 241 | log: |
| 242 | type: cloudify.nodes.Helm |
| 243 | properties: |
| 244 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 245 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 246 | - log |
| 247 | relationships: |
| 248 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 249 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 250 | |
| 251 | cli: |
| 252 | type: cloudify.nodes.Helm |
| 253 | properties: |
| 254 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 255 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 256 | - cli |
| 257 | relationships: |
| 258 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 259 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 260 | |
| 261 | multicloud: |
| 262 | type: cloudify.nodes.Helm |
| 263 | properties: |
| 264 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 265 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 266 | - multicloud |
| 267 | relationships: |
| 268 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 269 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 270 | |
| 271 | clamp: |
| 272 | type: cloudify.nodes.Helm |
| 273 | properties: |
| 274 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 275 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 276 | - clamp |
| 277 | relationships: |
| 278 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 279 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 280 | |
| 281 | vnfsdk: |
| 282 | type: cloudify.nodes.Helm |
| 283 | properties: |
| 284 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 285 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 286 | - vnfsdk |
| 287 | relationships: |
| 288 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 289 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 290 | |
| 291 | uui: |
| 292 | type: cloudify.nodes.Helm |
| 293 | properties: |
| 294 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 295 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 296 | - uui |
| 297 | relationships: |
| 298 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 299 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 300 | |
| 301 | aaf: |
| 302 | type: cloudify.nodes.Helm |
| 303 | properties: |
| 304 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 305 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 306 | - aaf |
| 307 | relationships: |
| 308 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 309 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 310 | |
| 311 | vfc: |
| 312 | type: cloudify.nodes.Helm |
| 313 | properties: |
| 314 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 315 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 316 | - vfc |
| 317 | relationships: |
| 318 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 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 | |
Hong Guan | eb2af80 | 2018-05-14 15:37:15 -0400 | [diff] [blame] | 341 | sniro-emulator: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 342 | type: cloudify.nodes.Helm |
| 343 | properties: |
| 344 | args: |
| 345 | - { get_input: namespace } |
Hong Guan | eb2af80 | 2018-05-14 15:37:15 -0400 | [diff] [blame] | 346 | - sniro-emulator |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 347 | relationships: |
| 348 | - type: cloudify.relationships.connected_to |
Hong Guan | eb2af80 | 2018-05-14 15:37:15 -0400 | [diff] [blame] | 349 | target: k8s_env |
Hong Guan | c6fdd53 | 2018-05-18 08:19:10 -0400 | [diff] [blame] | 350 | |
| 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 |