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 | |
| 151 | message-router: |
| 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 } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 156 | - message-router |
| 157 | relationships: |
| 158 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 159 | target: k8s_env |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 160 | |
| 161 | sdnc: |
| 162 | type: cloudify.nodes.Helm |
| 163 | properties: |
| 164 | args: |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 165 | - { get_input: namespace } |
Jun Hu | 64e83a3 | 2018-01-09 15:11:05 -0500 | [diff] [blame] | 166 | - sdnc |
| 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 | vid: |
| 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 | - vid |
| 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 | robot: |
| 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 | - robot |
| 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 | policy: |
| 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 | - policy |
| 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 | portal: |
| 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 | - portal |
| 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 | aai: |
| 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 | - aai |
| 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 | sdc: |
| 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 | - sdc |
| 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 | log: |
| 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 | - log |
| 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 | cli: |
| 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 | - cli |
| 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 | multicloud: |
| 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 | - multicloud |
| 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 | clamp: |
| 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 | - clamp |
| 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 | vnfsdk: |
| 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 | - vnfsdk |
| 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 | uui: |
| 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 | - uui |
| 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 | aaf: |
| 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 | - aaf |
| 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 | vfc: |
| 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 | - vfc |
| 307 | relationships: |
| 308 | - type: cloudify.relationships.connected_to |
Hong Guan | 02638a2 | 2018-04-20 13:49:23 -0400 | [diff] [blame] | 309 | 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 |