Matteo Scandolo | 3896c47 | 2017-08-01 13:31:42 -0700 | [diff] [blame] | 1 | |
| 2 | {# |
| 3 | Copyright 2017-present Open Networking Foundation |
| 4 | |
| 5 | Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | you may not use this file except in compliance with the License. |
| 7 | You may obtain a copy of the License at |
| 8 | |
| 9 | http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | |
| 11 | Unless required by applicable law or agreed to in writing, software |
| 12 | distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | See the License for the specific language governing permissions and |
| 15 | limitations under the License. |
| 16 | #} |
| 17 | |
| 18 | |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 19 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 20 | |
| 21 | description: Setup the ExampleService on the pod |
| 22 | |
| 23 | imports: |
| 24 | - custom_types/xos.yaml |
| 25 | - custom_types/exampleservice.yaml |
| 26 | |
| 27 | topology_template: |
| 28 | node_templates: |
| 29 | |
| 30 | # image/flavor are hardcoded - FIXME if/when they change |
| 31 | m1.small: |
| 32 | type: tosca.nodes.Flavor |
| 33 | |
| 34 | trusty-server-multi-nic: |
| 35 | type: tosca.nodes.Image |
| 36 | |
| 37 | # private network template, created in fixtures.yml |
| 38 | Private: |
| 39 | type: tosca.nodes.NetworkTemplate |
| 40 | |
| 41 | # site, fully created in deployment.yaml |
| 42 | {{ site_name }}: |
| 43 | type: tosca.nodes.Site |
| 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 | # public network, fully created in public-net.yaml |
| 54 | public: |
| 55 | type: tosca.nodes.network.Network.XOS |
| 56 | properties: |
| 57 | no-create: true |
| 58 | no-delete: true |
| 59 | no-update: true |
| 60 | |
| 61 | # vrouter service, fully created in cord-service.yaml |
| 62 | service#vrouter: |
| 63 | type: tosca.nodes.Service |
| 64 | properties: |
| 65 | no-create: true |
| 66 | no-delete: true |
| 67 | no-update: true |
| 68 | |
| 69 | # ExampleService/ExampleTenant |
Srikanth Vavilapalli | 988b899 | 2017-01-20 05:10:21 +0000 | [diff] [blame] | 70 | exampleservice_network: |
| 71 | type: tosca.nodes.network.Network.XOS |
| 72 | properties: |
| 73 | ip_version: 4 |
| 74 | labels: exampleservice_private_network |
| 75 | requirements: |
| 76 | - network_template: |
| 77 | node: Private |
| 78 | relationship: tosca.relationships.UsesNetworkTemplate |
| 79 | - owner: |
| 80 | node: {{ site_name }}_exampleservice |
| 81 | relationship: tosca.relationships.MemberOfSlice |
| 82 | - connection: |
| 83 | node: {{ site_name }}_exampleservice |
| 84 | relationship: tosca.relationships.ConnectsToSlice |
| 85 | |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 86 | |
| 87 | {{ site_name }}_exampleservice: |
| 88 | description: This slice holds the ExampleService |
| 89 | type: tosca.nodes.Slice |
| 90 | properties: |
| 91 | network: noauto |
| 92 | requirements: |
| 93 | - site: |
| 94 | node: {{ site_name }} |
| 95 | relationship: tosca.relationships.MemberOfSite |
| 96 | - management: |
| 97 | node: management |
| 98 | relationship: tosca.relationships.ConnectsToNetwork |
| 99 | - public: |
| 100 | node: public |
| 101 | relationship: tosca.relationships.ConnectsToNetwork |
| 102 | - exmapleserver: |
| 103 | node: service#exampleservice |
| 104 | relationship: tosca.relationships.MemberOfService |
| 105 | - image: |
| 106 | node: trusty-server-multi-nic |
| 107 | relationship: tosca.relationships.DefaultImage |
| 108 | - default_flavor: |
| 109 | node: m1.small |
| 110 | relationship: tosca.relationships.DefaultFlavor |
| 111 | |
| 112 | service#exampleservice: |
| 113 | type: tosca.nodes.ExampleService |
| 114 | requirements: |
| 115 | - management: |
| 116 | node: management |
| 117 | relationship: tosca.relationships.UsesNetwork |
| 118 | properties: |
| 119 | view_url: /admin/exampleservice/exampleservice/$id$/ |
| 120 | kind: exampleservice |
| 121 | public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] } |
| 122 | private_key_fn: /opt/xos/services/exampleservice/keys/exampleservice_rsa |
| 123 | service_message: hello |
| 124 | artifacts: |
Scott Baker | 5719654 | 2017-04-11 15:48:17 -0700 | [diff] [blame] | 125 | pubkey: /opt/cord_profile/key_import/exampleservice_rsa.pub |
Zack Williams | 682450e | 2016-11-19 09:04:41 -0700 | [diff] [blame] | 126 | |
| 127 | tenant#exampletenant1: |
| 128 | type: tosca.nodes.ExampleTenant |
| 129 | properties: |
| 130 | tenant_message: world |
| 131 | requirements: |
| 132 | - tenant: |
| 133 | node: service#exampleservice |
| 134 | relationship: tosca.relationships.TenantOfService |
| 135 | - dependency: |
| 136 | node: {{ site_name }}_exampleservice |
| 137 | relationship: tosca.relationships.DependsOn |
| 138 | |