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