5fa40b76d3ba61ffe992239e6db504c7bfe15ac9
[multicloud/azure.git] / azure / aria / aria-extension-cloudify / src / aria / examples / tosca-simple-1.0 / use-cases / network-3 / network-3.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0
2
3 description: >-
4   TOSCA simple profile with 2 servers bound to the 1 network.
5
6 metadata:
7   template_name: network-3
8   template_author: TOSCA Simple Profile in YAML
9   template_version: '1.0'
10
11 topology_template:
12
13   inputs:
14     network_name:
15       type: string
16       description: Network name
17     network_cidr:
18       type: string
19       default: 10.0.0.0/24
20       description: CIDR for the network
21     network_start_ip:
22       type: string
23       default: 10.0.0.100
24       description: Start IP for the allocation pool
25     network_end_ip:
26       type: string
27       default: 10.0.0.150
28       description: End IP for the allocation pool
29
30   node_templates:
31
32     my_server:
33       type: tosca.nodes.Compute
34       capabilities:
35         host:
36           properties:
37             disk_size: 10 GB
38             num_cpus: 1
39             mem_size: 4096 MB
40         os:
41           properties:
42             architecture: x86_64
43             type: Linux
44             distribution: CirrOS
45             version: 0.3.2
46
47     my_server2:
48       type: tosca.nodes.Compute
49       capabilities:
50         host:
51           properties:
52             disk_size: 10 GB
53             num_cpus: 1
54             mem_size: 4096 MB
55         os:
56           properties:
57             architecture: x86_64
58             type: Linux
59             distribution: CirrOS
60             version: 0.3.2
61
62     my_network:
63       type: tosca.nodes.network.Network
64       properties:
65         ip_version: 4
66         cidr: { get_input: network_cidr }
67         network_name: { get_input: network_name }
68         start_ip: { get_input: network_start_ip }
69         end_ip: { get_input: network_end_ip }
70
71     my_port:
72       type: tosca.nodes.network.Port
73       requirements:
74         - binding: my_server
75         - link: my_network
76
77     my_port2:
78       type: tosca.nodes.network.Port
79       requirements:
80         - binding: my_server2
81         - link: my_network