blob: 53c2173d6b4a5053e3a11ba97b12f4b983d300ab [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
52
53 {{ site_name }}_exampleservice:
54 description: This slice holds the ExampleService
55 type: tosca.nodes.Slice
56 properties:
57 network: noauto
58 requirements:
59 - site:
60 node: {{ site_name }}
61 relationship: tosca.relationships.MemberOfSite
62 - management:
63 node: management
64 relationship: tosca.relationships.ConnectsToNetwork
65 - public:
66 node: public
67 relationship: tosca.relationships.ConnectsToNetwork
68 - exmapleserver:
69 node: service#exampleservice
70 relationship: tosca.relationships.MemberOfService
71 - image:
72 node: trusty-server-multi-nic
73 relationship: tosca.relationships.DefaultImage
74 - default_flavor:
75 node: m1.small
76 relationship: tosca.relationships.DefaultFlavor
77
78 service#exampleservice:
79 type: tosca.nodes.ExampleService
80 requirements:
81 - management:
82 node: management
83 relationship: tosca.relationships.UsesNetwork
84 properties:
85 view_url: /admin/exampleservice/exampleservice/$id$/
86 kind: exampleservice
87 public_key: { get_artifact: [ SELF, pubkey, LOCAL_FILE] }
88 private_key_fn: /opt/xos/services/exampleservice/keys/exampleservice_rsa
89 service_message: hello
90 artifacts:
91 pubkey: /opt/xos/services/exampleservice/keys/exampleservice_rsa.pub
92
93 tenant#exampletenant1:
94 type: tosca.nodes.ExampleTenant
95 properties:
96 tenant_message: world
97 requirements:
98 - tenant:
99 node: service#exampleservice
100 relationship: tosca.relationships.TenantOfService
101 - dependency:
102 node: {{ site_name }}_exampleservice
103 relationship: tosca.relationships.DependsOn
104