blob: 08b98ee9a821b84a91d0e4769eb007c13f9224f8 [file] [log] [blame]
Zack Williams682450e2016-11-19 09:04:41 -07001tosca_definitions_version: tosca_simple_yaml_1_0
2
3description: Setup the ExampleService on the pod
4
5imports:
6 - custom_types/xos.yaml
7 - custom_types/exampleservice.yaml
8
9topology_template:
10 node_templates:
11
12# image/flavor are hardcoded - FIXME if/when they change
13 m1.small:
14 type: tosca.nodes.Flavor
15
16 trusty-server-multi-nic:
17 type: tosca.nodes.Image
18
19# private network template, created in fixtures.yml
20 Private:
21 type: tosca.nodes.NetworkTemplate
22
23# site, fully created in deployment.yaml
24 {{ site_name }}:
25 type: tosca.nodes.Site
26
27# management network, fully created in management-net.yaml
28 management:
29 type: tosca.nodes.network.Network.XOS
30 properties:
31 no-create: true
32 no-delete: true
33 no-update: true
34
35# public network, fully created in public-net.yaml
36 public:
37 type: tosca.nodes.network.Network.XOS
38 properties:
39 no-create: true
40 no-delete: true
41 no-update: true
42
43# vrouter service, fully created in cord-service.yaml
44 service#vrouter:
45 type: tosca.nodes.Service
46 properties:
47 no-create: true
48 no-delete: true
49 no-update: true
50
51# ExampleService/ExampleTenant
Srikanth Vavilapalli988b8992017-01-20 05:10:21 +000052 exampleservice_network:
53 type: tosca.nodes.network.Network.XOS
54 properties:
55 ip_version: 4
56 labels: exampleservice_private_network
57 requirements:
58 - network_template:
59 node: Private
60 relationship: tosca.relationships.UsesNetworkTemplate
61 - owner:
62 node: {{ site_name }}_exampleservice
63 relationship: tosca.relationships.MemberOfSlice
64 - connection:
65 node: {{ site_name }}_exampleservice
66 relationship: tosca.relationships.ConnectsToSlice
67
Zack Williams682450e2016-11-19 09:04:41 -070068
69 {{ site_name }}_exampleservice:
70 description: This slice holds the ExampleService
71 type: tosca.nodes.Slice
72 properties:
73 network: noauto
74 requirements:
75 - site:
76 node: {{ site_name }}
77 relationship: tosca.relationships.MemberOfSite
78 - management:
79 node: management
80 relationship: tosca.relationships.ConnectsToNetwork
81 - public:
82 node: public
83 relationship: tosca.relationships.ConnectsToNetwork
84 - exmapleserver:
85 node: service#exampleservice
86 relationship: tosca.relationships.MemberOfService
87 - image:
88 node: trusty-server-multi-nic
89 relationship: tosca.relationships.DefaultImage
90 - default_flavor:
91 node: m1.small
92 relationship: tosca.relationships.DefaultFlavor
93
94 service#exampleservice:
95 type: tosca.nodes.ExampleService
96 requirements:
97 - management:
98 node: management
99 relationship: tosca.relationships.UsesNetwork
100 properties:
101 view_url: /admin/exampleservice/exampleservice/$id$/
102 kind: exampleservice
103 public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
104 private_key_fn: /opt/xos/services/exampleservice/keys/exampleservice_rsa
105 service_message: hello
106 artifacts:
Scott Baker57196542017-04-11 15:48:17 -0700107 pubkey: /opt/cord_profile/key_import/exampleservice_rsa.pub
Zack Williams682450e2016-11-19 09:04:41 -0700108
109 tenant#exampletenant1:
110 type: tosca.nodes.ExampleTenant
111 properties:
112 tenant_message: world
113 requirements:
114 - tenant:
115 node: service#exampleservice
116 relationship: tosca.relationships.TenantOfService
117 - dependency:
118 node: {{ site_name }}_exampleservice
119 relationship: tosca.relationships.DependsOn
120