blob: a5c770887d771d095219d8e83004b16315a9a185 [file] [log] [blame]
Matteo Scandolo3896c472017-08-01 13:31:42 -07001{#
2Copyright 2017-present Open Networking Foundation
3
4Licensed under the Apache License, Version 2.0 (the "License");
5you may not use this file except in compliance with the License.
6You may obtain a copy of the License at
7
8http://www.apache.org/licenses/LICENSE-2.0
9
10Unless required by applicable law or agreed to in writing, software
11distributed under the License is distributed on an "AS IS" BASIS,
12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13See the License for the specific language governing permissions and
14limitations under the License.
15#}
16
17
Zack Williams682450e2016-11-19 09:04:41 -070018tosca_definitions_version: tosca_simple_yaml_1_0
19
Zack Williams682450e2016-11-19 09:04:41 -070020imports:
21 - custom_types/xos.yaml
Scott Bakerdfca35f2017-10-26 11:29:04 -070022 - custom_types/slice.yaml
23 - custom_types/site.yaml
24 - custom_types/image.yaml
25 - custom_types/flavor.yaml
26 - custom_types/network.yaml
27 - custom_types/networktemplate.yaml
28 - custom_types/networkslice.yaml
Zack Williams682450e2016-11-19 09:04:41 -070029 - custom_types/exampleservice.yaml
Scott Bakerdfca35f2017-10-26 11:29:04 -070030 - custom_types/exampleserviceinstance.yaml
31
32description: configure exampleservice
Zack Williams682450e2016-11-19 09:04:41 -070033
34topology_template:
35 node_templates:
36
Scott Bakerdfca35f2017-10-26 11:29:04 -070037# site, image, fully created in deployment.yaml
38 {{ site_name }}:
39 type: tosca.nodes.Site
40 properties:
41 must-exist: true
42 name: {{ site_humanname }}
43
Zack Williams682450e2016-11-19 09:04:41 -070044 m1.small:
45 type: tosca.nodes.Flavor
Scott Bakerdfca35f2017-10-26 11:29:04 -070046 properties:
47 name: m1.small
48 must-exist: true
Zack Williams682450e2016-11-19 09:04:41 -070049
50 trusty-server-multi-nic:
51 type: tosca.nodes.Image
Scott Bakerdfca35f2017-10-26 11:29:04 -070052 properties:
53 name: trusty-server-multi-nic
54 must-exist: true
Zack Williams682450e2016-11-19 09:04:41 -070055
Scott Bakerdfca35f2017-10-26 11:29:04 -070056# private network template, fully created somewhere else
57 private:
Zack Williams682450e2016-11-19 09:04:41 -070058 type: tosca.nodes.NetworkTemplate
Zack Williams682450e2016-11-19 09:04:41 -070059 properties:
Scott Bakerdfca35f2017-10-26 11:29:04 -070060 must-exist: true
61 name: Private
Zack Williams682450e2016-11-19 09:04:41 -070062
Scott Bakerdfca35f2017-10-26 11:29:04 -070063# management networks, fully created in management-net.yaml
64 management_network:
65 type: tosca.nodes.Network
Zack Williams682450e2016-11-19 09:04:41 -070066 properties:
Scott Bakerdfca35f2017-10-26 11:29:04 -070067 must-exist: true
68 name: management
Zack Williams682450e2016-11-19 09:04:41 -070069
Scott Bakerdfca35f2017-10-26 11:29:04 -070070# public network, fully created somewhere else
71 public_network:
72 type: tosca.nodes.Network
Zack Williams682450e2016-11-19 09:04:41 -070073 properties:
Scott Bakerdfca35f2017-10-26 11:29:04 -070074 must-exist: true
75 name: public
Zack Williams682450e2016-11-19 09:04:41 -070076
Srikanth Vavilapalli988b8992017-01-20 05:10:21 +000077 exampleservice_network:
Scott Bakerdfca35f2017-10-26 11:29:04 -070078 type: tosca.nodes.Network
Srikanth Vavilapalli988b8992017-01-20 05:10:21 +000079 properties:
Scott Bakerdfca35f2017-10-26 11:29:04 -070080 name: exampleservice_network
Srikanth Vavilapalli988b8992017-01-20 05:10:21 +000081 labels: exampleservice_private_network
82 requirements:
Scott Bakerdfca35f2017-10-26 11:29:04 -070083 - template:
84 node: private
85 relationship: tosca.relationships.BelongsToOne
Srikanth Vavilapalli988b8992017-01-20 05:10:21 +000086 - owner:
87 node: {{ site_name }}_exampleservice
Scott Bakerdfca35f2017-10-26 11:29:04 -070088 relationship: tosca.relationships.BelongsToOne
Srikanth Vavilapalli988b8992017-01-20 05:10:21 +000089
Scott Bakerdfca35f2017-10-26 11:29:04 -070090# CORD Slices
Zack Williams682450e2016-11-19 09:04:41 -070091 {{ site_name }}_exampleservice:
Scott Bakerdfca35f2017-10-26 11:29:04 -070092 description: Example Service Slice
Zack Williams682450e2016-11-19 09:04:41 -070093 type: tosca.nodes.Slice
94 properties:
Scott Bakerdfca35f2017-10-26 11:29:04 -070095 name: {{ site_name }}_exampleservice
96 default_isolation: vm
97 network: noauto
Zack Williams682450e2016-11-19 09:04:41 -070098 requirements:
Scott Bakerdfca35f2017-10-26 11:29:04 -070099 - site:
100 node: mysite
101 relationship: tosca.relationships.BelongsToOne
102 - service:
103 node: exampleservice
104 relationship: tosca.relationships.BelongsToOne
105 - default_image:
106 node: trusty-server-multi-nic
107 relationship: tosca.relationships.BelongsToOne
108 - default_flavor:
109 node: m1.small
110 relationship: tosca.relationships.BelongsToOne
Zack Williams682450e2016-11-19 09:04:41 -0700111
Scott Bakerdfca35f2017-10-26 11:29:04 -0700112# CORD NetworkSlices
113 exampleservice_slice_management_network:
114 type: tosca.nodes.NetworkSlice
Zack Williams682450e2016-11-19 09:04:41 -0700115 requirements:
Scott Bakerdfca35f2017-10-26 11:29:04 -0700116 - network:
117 node: management_network
118 relationship: tosca.relationships.BelongsToOne
119 - slice:
120 node: {{ site_name }}_exampleservice
121 relationship: tosca.relationships.BelongsToOne
122
123 exampleservice_slice_public_network:
124 type: tosca.nodes.NetworkSlice
125 requirements:
126 - network:
127 node: public_network
128 relationship: tosca.relationships.BelongsToOne
129 - slice:
130 node: {{ site_name }}_exampleservice
131 relationship: tosca.relationships.BelongsToOne
132
133 exampleservice_slice_exampleservice_network:
134 type: tosca.nodes.NetworkSlice
135 requirements:
136 - network:
137 node: exampleservice_network
138 relationship: tosca.relationships.BelongsToOne
139 - slice:
140 node: {{ site_name }}_exampleservice
141 relationship: tosca.relationships.BelongsToOne
142
143 exampleservice:
144 type: tosca.nodes.ExampleService
Zack Williams682450e2016-11-19 09:04:41 -0700145 properties:
Scott Bakerdfca35f2017-10-26 11:29:04 -0700146 name: exampleservice
147 public_key: {{ lookup('file', config_cord_profile_dir + '/key_import/exampleservice_rsa.pub') }}
Zack Williams682450e2016-11-19 09:04:41 -0700148 private_key_fn: /opt/xos/services/exampleservice/keys/exampleservice_rsa
149 service_message: hello
150 artifacts:
Scott Baker57196542017-04-11 15:48:17 -0700151 pubkey: /opt/cord_profile/key_import/exampleservice_rsa.pub
Zack Williams682450e2016-11-19 09:04:41 -0700152
Scott Bakerdfca35f2017-10-26 11:29:04 -0700153 exampletenant1:
154 type: tosca.nodes.ExampleServiceInstance
Zack Williams682450e2016-11-19 09:04:41 -0700155 properties:
Scott Bakerdfca35f2017-10-26 11:29:04 -0700156 name: exampletenant1
Zack Williams682450e2016-11-19 09:04:41 -0700157 tenant_message: world
158 requirements:
Scott Bakerdfca35f2017-10-26 11:29:04 -0700159 - owner:
160 node: exampleservice
161 relationship: tosca.relationships.BelongsToOne
Zack Williams682450e2016-11-19 09:04:41 -0700162