Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -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 | |
| 17 | |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 18 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 19 | |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 20 | imports: |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 21 | - 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 Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 28 | - custom_types/exampleservice.yaml |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 29 | - custom_types/exampleserviceinstance.yaml |
| 30 | |
| 31 | description: configure exampleservice |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 32 | |
| 33 | topology_template: |
| 34 | node_templates: |
| 35 | |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 36 | # site, image, fully created in deployment.yaml |
| 37 | {{ site_name }}: |
| 38 | type: tosca.nodes.Site |
| 39 | properties: |
| 40 | must-exist: true |
Matteo Scandolo | 1ed76b8 | 2017-12-05 13:58:22 -0800 | [diff] [blame] | 41 | name: {{ site_name }} |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 42 | |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 43 | m1.small: |
| 44 | type: tosca.nodes.Flavor |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 45 | properties: |
| 46 | name: m1.small |
| 47 | must-exist: true |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 48 | |
| 49 | trusty-server-multi-nic: |
| 50 | type: tosca.nodes.Image |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 51 | properties: |
| 52 | name: trusty-server-multi-nic |
| 53 | must-exist: true |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 54 | |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 55 | # private network template, fully created somewhere else |
| 56 | private: |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 57 | type: tosca.nodes.NetworkTemplate |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 58 | properties: |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 59 | must-exist: true |
| 60 | name: Private |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 61 | |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 62 | # management networks, fully created in management-net.yaml |
| 63 | management_network: |
| 64 | type: tosca.nodes.Network |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 65 | properties: |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 66 | must-exist: true |
| 67 | name: management |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 68 | |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 69 | # public network, fully created somewhere else |
| 70 | public_network: |
| 71 | type: tosca.nodes.Network |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 72 | properties: |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 73 | must-exist: true |
| 74 | name: public |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 75 | |
Srikanth Vavilapalli | 988b899 | 2017-01-20 05:10:21 +0000 | [diff] [blame] | 76 | exampleservice_network: |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 77 | type: tosca.nodes.Network |
Srikanth Vavilapalli | 988b899 | 2017-01-20 05:10:21 +0000 | [diff] [blame] | 78 | properties: |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 79 | name: exampleservice_network |
Srikanth Vavilapalli | 988b899 | 2017-01-20 05:10:21 +0000 | [diff] [blame] | 80 | labels: exampleservice_private_network |
| 81 | requirements: |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 82 | - template: |
| 83 | node: private |
| 84 | relationship: tosca.relationships.BelongsToOne |
Srikanth Vavilapalli | 988b899 | 2017-01-20 05:10:21 +0000 | [diff] [blame] | 85 | - owner: |
| 86 | node: {{ site_name }}_exampleservice |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 87 | relationship: tosca.relationships.BelongsToOne |
Srikanth Vavilapalli | 988b899 | 2017-01-20 05:10:21 +0000 | [diff] [blame] | 88 | |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 89 | # CORD Slices |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 90 | {{ site_name }}_exampleservice: |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 91 | description: Example Service Slice |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 92 | type: tosca.nodes.Slice |
| 93 | properties: |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 94 | name: {{ site_name }}_exampleservice |
| 95 | default_isolation: vm |
| 96 | network: noauto |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 97 | requirements: |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 98 | - 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 Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 110 | |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 111 | # CORD NetworkSlices |
| 112 | exampleservice_slice_management_network: |
| 113 | type: tosca.nodes.NetworkSlice |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 114 | requirements: |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 115 | - 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 Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 144 | properties: |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 145 | name: exampleservice |
Matteo Scandolo | 25b23e3 | 2017-12-11 17:01:36 -0800 | [diff] [blame] | 146 | public_key: {{ lookup('file', head_cord_profile_dir + '/key_import/exampleservice_rsa.pub') }} |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 147 | private_key_fn: /opt/xos/services/exampleservice/keys/exampleservice_rsa |
| 148 | service_message: hello |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 149 | |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 150 | exampletenant1: |
| 151 | type: tosca.nodes.ExampleServiceInstance |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 152 | properties: |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 153 | name: exampletenant1 |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 154 | tenant_message: world |
| 155 | requirements: |
Scott Baker | a14575f | 2017-10-26 11:29:04 -0700 | [diff] [blame] | 156 | - owner: |
| 157 | node: exampleservice |
| 158 | relationship: tosca.relationships.BelongsToOne |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 159 | |