blob: 9165e682c8d9b2398bfb44f0e4e94d1328666c7d [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:
Scott Bakera14575f2017-10-26 11:29:04 -070021 - custom_types/slice.yaml
22 - custom_types/site.yaml
23 - custom_types/image.yaml
24 - custom_types/flavor.yaml
25 - custom_types/network.yaml
26 - custom_types/networktemplate.yaml
27 - custom_types/networkslice.yaml
Zack Williams682450e2016-11-19 09:04:41 -070028 - custom_types/exampleservice.yaml
Scott Bakera14575f2017-10-26 11:29:04 -070029 - custom_types/exampleserviceinstance.yaml
30
31description: configure exampleservice
Zack Williams682450e2016-11-19 09:04:41 -070032
33topology_template:
34 node_templates:
35
Scott Bakera14575f2017-10-26 11:29:04 -070036# site, image, fully created in deployment.yaml
37 {{ site_name }}:
38 type: tosca.nodes.Site
39 properties:
40 must-exist: true
Matteo Scandolo1ed76b82017-12-05 13:58:22 -080041 name: {{ site_name }}
Scott Bakera14575f2017-10-26 11:29:04 -070042
Zack Williams682450e2016-11-19 09:04:41 -070043 m1.small:
44 type: tosca.nodes.Flavor
Scott Bakera14575f2017-10-26 11:29:04 -070045 properties:
46 name: m1.small
47 must-exist: true
Zack Williams682450e2016-11-19 09:04:41 -070048
49 trusty-server-multi-nic:
50 type: tosca.nodes.Image
Scott Bakera14575f2017-10-26 11:29:04 -070051 properties:
52 name: trusty-server-multi-nic
53 must-exist: true
Zack Williams682450e2016-11-19 09:04:41 -070054
Scott Bakera14575f2017-10-26 11:29:04 -070055# private network template, fully created somewhere else
56 private:
Zack Williams682450e2016-11-19 09:04:41 -070057 type: tosca.nodes.NetworkTemplate
Zack Williams682450e2016-11-19 09:04:41 -070058 properties:
Scott Bakera14575f2017-10-26 11:29:04 -070059 must-exist: true
60 name: Private
Zack Williams682450e2016-11-19 09:04:41 -070061
Scott Bakera14575f2017-10-26 11:29:04 -070062# management networks, fully created in management-net.yaml
63 management_network:
64 type: tosca.nodes.Network
Zack Williams682450e2016-11-19 09:04:41 -070065 properties:
Scott Bakera14575f2017-10-26 11:29:04 -070066 must-exist: true
67 name: management
Zack Williams682450e2016-11-19 09:04:41 -070068
Scott Bakera14575f2017-10-26 11:29:04 -070069# public network, fully created somewhere else
70 public_network:
71 type: tosca.nodes.Network
Zack Williams682450e2016-11-19 09:04:41 -070072 properties:
Scott Bakera14575f2017-10-26 11:29:04 -070073 must-exist: true
74 name: public
Zack Williams682450e2016-11-19 09:04:41 -070075
Srikanth Vavilapalli988b8992017-01-20 05:10:21 +000076 exampleservice_network:
Scott Bakera14575f2017-10-26 11:29:04 -070077 type: tosca.nodes.Network
Srikanth Vavilapalli988b8992017-01-20 05:10:21 +000078 properties:
Scott Bakera14575f2017-10-26 11:29:04 -070079 name: exampleservice_network
Srikanth Vavilapalli988b8992017-01-20 05:10:21 +000080 labels: exampleservice_private_network
81 requirements:
Scott Bakera14575f2017-10-26 11:29:04 -070082 - template:
83 node: private
84 relationship: tosca.relationships.BelongsToOne
Srikanth Vavilapalli988b8992017-01-20 05:10:21 +000085 - owner:
86 node: {{ site_name }}_exampleservice
Scott Bakera14575f2017-10-26 11:29:04 -070087 relationship: tosca.relationships.BelongsToOne
Srikanth Vavilapalli988b8992017-01-20 05:10:21 +000088
Scott Bakera14575f2017-10-26 11:29:04 -070089# CORD Slices
Zack Williams682450e2016-11-19 09:04:41 -070090 {{ site_name }}_exampleservice:
Scott Bakera14575f2017-10-26 11:29:04 -070091 description: Example Service Slice
Zack Williams682450e2016-11-19 09:04:41 -070092 type: tosca.nodes.Slice
93 properties:
Scott Bakera14575f2017-10-26 11:29:04 -070094 name: {{ site_name }}_exampleservice
95 default_isolation: vm
96 network: noauto
Zack Williams682450e2016-11-19 09:04:41 -070097 requirements:
Scott Bakera14575f2017-10-26 11:29:04 -070098 - site:
99 node: mysite
100 relationship: tosca.relationships.BelongsToOne
101 - service:
102 node: exampleservice
103 relationship: tosca.relationships.BelongsToOne
104 - default_image:
105 node: trusty-server-multi-nic
106 relationship: tosca.relationships.BelongsToOne
107 - default_flavor:
108 node: m1.small
109 relationship: tosca.relationships.BelongsToOne
Zack Williams682450e2016-11-19 09:04:41 -0700110
Scott Bakera14575f2017-10-26 11:29:04 -0700111# CORD NetworkSlices
112 exampleservice_slice_management_network:
113 type: tosca.nodes.NetworkSlice
Zack Williams682450e2016-11-19 09:04:41 -0700114 requirements:
Scott Bakera14575f2017-10-26 11:29:04 -0700115 - network:
116 node: management_network
117 relationship: tosca.relationships.BelongsToOne
118 - slice:
119 node: {{ site_name }}_exampleservice
120 relationship: tosca.relationships.BelongsToOne
121
122 exampleservice_slice_public_network:
123 type: tosca.nodes.NetworkSlice
124 requirements:
125 - network:
126 node: public_network
127 relationship: tosca.relationships.BelongsToOne
128 - slice:
129 node: {{ site_name }}_exampleservice
130 relationship: tosca.relationships.BelongsToOne
131
132 exampleservice_slice_exampleservice_network:
133 type: tosca.nodes.NetworkSlice
134 requirements:
135 - network:
136 node: exampleservice_network
137 relationship: tosca.relationships.BelongsToOne
138 - slice:
139 node: {{ site_name }}_exampleservice
140 relationship: tosca.relationships.BelongsToOne
141
142 exampleservice:
143 type: tosca.nodes.ExampleService
Zack Williams682450e2016-11-19 09:04:41 -0700144 properties:
Scott Bakera14575f2017-10-26 11:29:04 -0700145 name: exampleservice
Matteo Scandolo25b23e32017-12-11 17:01:36 -0800146 public_key: {{ lookup('file', head_cord_profile_dir + '/key_import/exampleservice_rsa.pub') }}
Zack Williams682450e2016-11-19 09:04:41 -0700147 private_key_fn: /opt/xos/services/exampleservice/keys/exampleservice_rsa
148 service_message: hello
Zack Williams682450e2016-11-19 09:04:41 -0700149
Scott Bakera14575f2017-10-26 11:29:04 -0700150 exampletenant1:
151 type: tosca.nodes.ExampleServiceInstance
Zack Williams682450e2016-11-19 09:04:41 -0700152 properties:
Scott Bakera14575f2017-10-26 11:29:04 -0700153 name: exampletenant1
Zack Williams682450e2016-11-19 09:04:41 -0700154 tenant_message: world
155 requirements:
Scott Bakera14575f2017-10-26 11:29:04 -0700156 - owner:
157 node: exampleservice
158 relationship: tosca.relationships.BelongsToOne
Zack Williams682450e2016-11-19 09:04:41 -0700159