21157bb54121bf24c9a13299fbdaae10aa8e3848
[parser.git] /
1 heat_template_version: 2013-05-23
2
3 description: >
4   TOSCA simple profile with 2 servers bound to the 1 network
5
6 parameters:
7   network_name:
8     type: string
9     description: Network name
10     default: my_private_net
11   network_cidr:
12     type: string
13     description: CIDR for the network
14     default: 10.0.0.0/24
15   network_start_ip:
16     type: string
17     description: Start IP for the allocation pool
18     default: 10.0.0.100
19   network_end_ip:
20     type: string
21     description: End IP for the allocation pool
22     default: 10.0.0.150
23
24 resources:
25   my_server:
26     type: OS::Nova::Server
27     properties:
28       flavor: m1.small
29       image: cirros-0.3.2-x86_64-uec
30       networks:
31       - port: { get_resource: my_port }
32       user_data_format: SOFTWARE_CONFIG
33
34   my_server2:
35     type: OS::Nova::Server
36     properties:
37       flavor: m1.small
38       image: cirros-0.3.2-x86_64-uec
39       networks:
40       - port: { get_resource: my_port2 }
41       user_data_format: SOFTWARE_CONFIG
42
43   my_network:
44     type: OS::Neutron::Net
45     properties:
46       name:
47         get_param: network_name
48
49   my_network_subnet:
50     type: OS::Neutron::Subnet
51     properties:
52       allocation_pools:
53       - end:
54           get_param: network_end_ip
55         start:
56           get_param: network_start_ip
57       cidr:
58         get_param: network_cidr
59       ip_version: 4
60       network: { get_resource: my_network }
61
62   my_port:
63     type: OS::Neutron::Port
64     properties:
65       network: { get_resource: my_network }
66
67   my_port2:
68     type: OS::Neutron::Port
69     properties:
70       network: { get_resource: my_network }
71
72 outputs: {}