Scott Baker | c4005d0 | 2015-08-06 17:21:34 -0700 | [diff] [blame] | 1 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 2 | |
| 3 | description: Template for deploying a single server with predefined properties. |
| 4 | |
| 5 | imports: |
| 6 | - custom_types/xos.yaml |
| 7 | |
| 8 | topology_template: |
| 9 | node_templates: |
| 10 | mysite: |
| 11 | type: tosca.nodes.Site |
| 12 | |
| 13 | Private: |
| 14 | type: tosca.nodes.NetworkTemplate |
| 15 | |
| 16 | producer_private_network: |
Scott Baker | 3793772 | 2015-08-14 12:41:18 -0700 | [diff] [blame^] | 17 | type: tosca.nodes.network.Network.XOS |
| 18 | properties: |
| 19 | ip_version: 4 |
Scott Baker | c4005d0 | 2015-08-06 17:21:34 -0700 | [diff] [blame] | 20 | requirements: |
| 21 | - network_template: |
| 22 | node: Private |
| 23 | relationship: tosca.relationships.UsesNetworkTemplate |
| 24 | - slice: |
| 25 | node: mysite_producer |
| 26 | relationship: tosca.relationships.MemberOfSlice |
Scott Baker | c4005d0 | 2015-08-06 17:21:34 -0700 | [diff] [blame] | 27 | |
| 28 | mysite_producer: |
| 29 | type: tosca.nodes.Slice |
| 30 | requirements: |
| 31 | - slice: |
| 32 | node: mysite |
| 33 | relationship: tosca.relationships.MemberOfSite |
| 34 | |
| 35 | mysite_consumer: |
| 36 | type: tosca.nodes.Slice |
| 37 | requirements: |
| 38 | - slice: |
| 39 | node: mysite |
| 40 | relationship: tosca.relationships.MemberOfSite |
| 41 | - network: |
| 42 | node: producer_private_network |
| 43 | relationship: tosca.relationships.ConnectsToNetwork |
| 44 | |
| 45 | producer_server: |
| 46 | type: tosca.nodes.Compute |
| 47 | capabilities: |
| 48 | # Host container properties |
| 49 | host: |
| 50 | properties: |
| 51 | num_cpus: 1 |
| 52 | disk_size: 10 GB |
| 53 | mem_size: 4 MB |
| 54 | # Guest Operating System properties |
| 55 | os: |
| 56 | properties: |
| 57 | # host Operating System image properties |
| 58 | architecture: x86_64 |
| 59 | type: linux |
| 60 | distribution: rhel |
| 61 | version: 6.5 |
| 62 | requirements: |
| 63 | - slice: |
| 64 | node: mysite_producer |
| 65 | relationship: tosca.relationships.MemberOfSlice |
| 66 | |
| 67 | consumer_server: |
| 68 | type: tosca.nodes.Compute |
| 69 | capabilities: |
| 70 | # Host container properties |
| 71 | host: |
| 72 | properties: |
| 73 | num_cpus: 1 |
| 74 | disk_size: 10 GB |
| 75 | mem_size: 4 MB |
| 76 | # Guest Operating System properties |
| 77 | os: |
| 78 | properties: |
| 79 | # host Operating System image properties |
| 80 | architecture: x86_64 |
| 81 | type: linux |
| 82 | distribution: rhel |
| 83 | version: 6.5 |
| 84 | requirements: |
| 85 | - slice: |
| 86 | node: mysite_consumer |
| 87 | relationship: tosca.relationships.MemberOfSlice |
| 88 | |
Scott Baker | 3793772 | 2015-08-14 12:41:18 -0700 | [diff] [blame^] | 89 | producer_pvt_net_port: |
| 90 | type: tosca.nodes.network.Port |
| 91 | requirements: |
| 92 | - link: |
| 93 | node: producer_private_network |
| 94 | relationship: tosca.relationships.network.LinksTo |
| 95 | - binding: |
| 96 | node: producer_server |
| 97 | relationship: tosca.relationships.network.BindsTo |
| 98 | |
| 99 | # consumer_pvt_net_port: |
| 100 | # type: tosca.nodes.network.Port |
| 101 | # requirements: |
| 102 | # - link: producer_private_network |
| 103 | # - binding: consumer_server |
| 104 | |
| 105 | |
| 106 | |