718022a05e2f497fa90cdcfd0f22aa3190bd982d
[sdc/sdc-distribution-client.git] /
1 tosca_definitions_version: tosca_simple_yaml_1_0
2
3 description: >
4     Template showing an example TOSCA type to demonstrate usage
5     of output in the substitution mappings.
6
7 node_types:
8   example.app:
9     derived_from: tosca.nodes.WebApplication
10     properties:
11       mq_server_ip:
12         type: string
13         required: False
14       receiver_port:
15         type: integer
16         required: False
17     attributes:
18       receiver_ip:
19         type: string
20       receiver_port:
21         type: integer
22
23 topology_template:
24   inputs:
25     mq_server_ip:
26       type: string
27       description: IP address of the message queuing server to receive messages from.
28       default: 127.0.0.1
29     receiver_port:
30       type: integer
31       description: Port to be used for receiving messages.
32       default: 8080
33     my_cpus:
34       type: integer
35       description: Number of CPUs for the server.
36       default: 2
37       constraints:
38         - valid_values: [ 1, 2, 4, 8 ]
39
40   substitution_mappings:
41     node_type: example.app
42
43   node_templates:
44     app:
45       type: example.app
46       properties:
47         mq_server_ip: { get_input: mq_server_ip }
48         receiver_port: { get_input: receiver_port }
49       requirements:
50         - host:
51             node: websrv
52     websrv:
53       type: tosca.nodes.WebServer
54       requirements:
55         - host:
56             node: server
57     server:
58       type: tosca.nodes.Compute
59       capabilities:
60         host:
61           properties:
62             disk_size: 10 GB
63             num_cpus: { get_input: my_cpus }
64             mem_size: 4096 MB
65         os:
66           properties:
67             architecture: x86_64
68             type: Linux
69             distribution: Ubuntu
70             version: 14.04