15224eab552d380c7319680cd48ddecb7783dda9
[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       key_name: userkey
31       networks:
32       - port: { get_resource: my_port }
33       user_data_format: SOFTWARE_CONFIG
34
35   my_server2:
36     type: OS::Nova::Server
37     properties:
38       flavor: m1.small
39       image: cirros-0.3.2-x86_64-uec
40       key_name: userkey
41       networks:
42       - port: { get_resource: my_port2 }
43       user_data_format: SOFTWARE_CONFIG
44
45   my_network:
46     type: OS::Neutron::Net
47     properties:
48       name:
49         get_param: network_name
50
51   my_network_subnet:
52     type: OS::Neutron::Subnet
53     properties:
54       allocation_pools:
55       - end:
56           get_param: network_end_ip
57         start:
58           get_param: network_start_ip
59       cidr:
60         get_param: network_cidr
61       ip_version: 4
62       network: { get_resource: my_network }
63
64   my_port:
65     type: OS::Neutron::Port
66     properties:
67       network: { get_resource: my_network }
68
69   my_port2:
70     type: OS::Neutron::Port
71     properties:
72       network: { get_resource: my_network }
73
74 outputs: {}