Matteo Scandolo | eb0d11c | 2017-08-08 13:05:26 -0700 | [diff] [blame^] | 1 | |
| 2 | # Copyright 2017-present Open Networking Foundation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | |
| 16 | |
Srikanth Vavilapalli | b2a5019 | 2017-02-03 18:25:59 +0000 | [diff] [blame] | 17 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 18 | |
| 19 | description: Setup example service/slice to demonstrate auto-scaling for that service/slice. |
| 20 | |
| 21 | imports: |
| 22 | - custom_types/xos.yaml |
| 23 | |
| 24 | topology_template: |
| 25 | node_templates: |
| 26 | service_xyz: |
| 27 | type: tosca.nodes.Service |
| 28 | properties: |
| 29 | kind: xyz |
| 30 | |
| 31 | # private network template, created in fixtures.yml |
| 32 | Private: |
| 33 | type: tosca.nodes.NetworkTemplate |
| 34 | |
| 35 | # site, fully created in deployment.yaml |
| 36 | mysite: |
| 37 | type: tosca.nodes.Site |
| 38 | |
| 39 | trusty-server-multi-nic: |
| 40 | type: tosca.nodes.Image |
| 41 | |
| 42 | m1.small: |
| 43 | type: tosca.nodes.Flavor |
| 44 | |
| 45 | # management network, fully created in management-net.yaml |
| 46 | management: |
| 47 | type: tosca.nodes.network.Network.XOS |
| 48 | properties: |
| 49 | no-create: true |
| 50 | no-delete: true |
| 51 | no-update: true |
| 52 | |
| 53 | mysite_scalable_xyz: |
| 54 | type: tosca.nodes.Slice |
| 55 | properties: |
| 56 | network: noauto |
| 57 | requirements: |
| 58 | - service: |
| 59 | node: service_xyz |
| 60 | relationship: tosca.relationships.MemberOfService |
| 61 | - site: |
| 62 | node: mysite |
| 63 | relationship: tosca.relationships.MemberOfSite |
| 64 | - management: |
| 65 | node: management |
| 66 | relationship: tosca.relationships.ConnectsToNetwork |
| 67 | - default_image: |
| 68 | node: trusty-server-multi-nic |
| 69 | relationship: tosca.relationships.DefaultImage |
| 70 | - m1.small: |
| 71 | node: m1.small |
| 72 | relationship: tosca.relationships.DefaultFlavor |
| 73 | |
| 74 | # Virtual machines |
| 75 | xyz_service_vm1: |
| 76 | type: tosca.nodes.Compute |
| 77 | capabilities: |
| 78 | # Host container properties |
| 79 | host: |
| 80 | properties: |
| 81 | num_cpus: 1 |
| 82 | disk_size: 20 GB |
| 83 | mem_size: 2 GB |
| 84 | requirements: |
| 85 | - slice: |
| 86 | node: mysite_scalable_xyz |
| 87 | relationship: tosca.relationships.MemberOfSlice |
| 88 | - image: |
| 89 | node: trusty-server-multi-nic |
| 90 | relationship: tosca.relationships.UsesImage |
| 91 | |