blob: 8070d821fa394f411b2564178ef14408a9515ca7 [file] [log] [blame]
Matteo Scandoloeb0d11c2017-08-08 13:05:26 -07001
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 Vavilapallib2a50192017-02-03 18:25:59 +000017tosca_definitions_version: tosca_simple_yaml_1_0
18
19description: Setup example service/slice to demonstrate auto-scaling for that service/slice.
20
21imports:
22 - custom_types/xos.yaml
23
24topology_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