Zack Williams | 2c1f859 | 2016-11-01 21:51:26 -0700 | [diff] [blame] | 1 | tosca_definitions_version: tosca_simple_yaml_1_0 |
| 2 | |
| 3 | description: Setup the ExampleService on the pod |
| 4 | |
| 5 | imports: |
| 6 | - custom_types/xos.yaml |
| 7 | - custom_types/exampleservice.yaml |
| 8 | |
| 9 | topology_template: |
| 10 | node_templates: |
| 11 | |
| 12 | m1.small: |
| 13 | type: tosca.nodes.Flavor |
| 14 | |
| 15 | Private: |
| 16 | type: tosca.nodes.NetworkTemplate |
| 17 | |
| 18 | management: |
| 19 | type: tosca.nodes.network.Network.XOS |
| 20 | properties: |
| 21 | no-create: true |
| 22 | no-delete: true |
| 23 | no-update: true |
| 24 | |
| 25 | template#private_wan: |
| 26 | type: tosca.nodes.NetworkTemplate |
| 27 | properties: |
| 28 | visibility: private |
| 29 | translation: none |
| 30 | vtn_kind: public |
| 31 | |
| 32 | exampleservice-public: |
| 33 | type: tosca.nodes.network.Network |
| 34 | properties: |
| 35 | ip_version: 4 |
| 36 | requirements: |
| 37 | - network_template: |
| 38 | node: template#private_wan |
| 39 | relationship: tosca.relationships.UsesNetworkTemplate |
| 40 | - owner: |
| 41 | node: mysite_exampleservice |
| 42 | relationship: tosca.relationships.MemberOfSlice |
| 43 | - connection: |
| 44 | node: mysite_exampleservice |
| 45 | relationship: tosca.relationships.ConnectsToSlice |
| 46 | |
| 47 | mysite: |
| 48 | type: tosca.nodes.Site |
| 49 | |
| 50 | trusty-server-multi-nic: |
| 51 | type: tosca.nodes.Image |
| 52 | |
| 53 | mysite_exampleservice: |
| 54 | description: This slice holds the ExampleService |
| 55 | type: tosca.nodes.Slice |
| 56 | properties: |
| 57 | network: noauto |
| 58 | requirements: |
| 59 | - site: |
| 60 | node: mysite |
| 61 | relationship: tosca.relationships.MemberOfSite |
| 62 | - management: |
| 63 | node: management |
| 64 | relationship: tosca.relationships.ConnectsToNetwork |
| 65 | - exmapleserver: |
| 66 | node: service#exampleservice |
| 67 | relationship: tosca.relationships.MemberOfService |
| 68 | - image: |
| 69 | node: trusty-server-multi-nic |
| 70 | relationship: tosca.relationships.DefaultImage |
| 71 | - default_flavor: |
| 72 | node: m1.small |
| 73 | relationship: tosca.relationships.DefaultFlavor |
| 74 | |
| 75 | service#exampleservice: |
| 76 | type: tosca.nodes.ExampleService |
| 77 | requirements: |
| 78 | - management: |
| 79 | node: management |
| 80 | relationship: tosca.relationships.UsesNetwork |
| 81 | properties: |
| 82 | view_url: /admin/exampleservice/exampleservice/$id$/ |
| 83 | kind: exampleservice |
| 84 | public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] } |
| 85 | private_key_fn: /opt/xos/services/exampleservice/keys/exampleservice_rsa |
| 86 | service_message: hello |
| 87 | artifacts: |
| 88 | pubkey: /opt/xos/services/exampleservice/keys/exampleservice_rsa.pub |
| 89 | |
| 90 | tenant#exampletenant1: |
| 91 | type: tosca.nodes.ExampleTenant |
| 92 | properties: |
| 93 | tenant_message: world |
| 94 | requirements: |
| 95 | - tenant: |
| 96 | node: service#exampleservice |
| 97 | relationship: tosca.relationships.TenantOfService |
| 98 | - dependency: |
| 99 | node: mysite_exampleservice |
| 100 | relationship: tosca.relationships.DependsOn |
| 101 | |