Add custom public IP support to the undercloud.
[apex-tripleo-heat-templates.git] / undercloud-source.yaml
1 Description: All-in-one baremetal OpenStack and all dependencies.
2 HeatTemplateFormatVersion: '2012-12-12'
3 Parameters:
4   AdminPassword:
5     Default: unset
6     Description: The password for the keystone admin account, used for monitoring, querying neutron etc.
7     Type: String
8     NoEcho: true
9   AdminToken:
10     Default: unset
11     Description: The keystone auth secret.
12     Type: String
13     NoEcho: true
14   CinderLVMLoopDeviceSize:
15     Default: 5000
16     Description: The size of the loopback file used by the cinder LVM driver.
17     Type: Number
18   BaremetalArch:
19     Default: i386
20     Description: The architecture to use in Nova-BM - i386 or amd64.
21     Type: String
22   CeilometerMeteringSecret:
23     Default: unset
24     Description: Secret shared by the ceilometer services.
25     Type: String
26     NoEcho: true
27   CeilometerPassword:
28     Default: unset
29     Description: The password for the ceilometer service account.
30     Type: String
31     NoEcho: true
32   SnmpdReadonlyUserName:
33     Default: ro_snmp_user
34     Description: The user name for SNMPd with readonly rights running on all Overcloud nodes
35     Type: String
36   SnmpdReadonlyUserPassword:
37     Default: unset
38     Description: The user password for SNMPd with readonly rights running on all Overcloud nodes
39     Type: String
40     NoEcho: true
41   Flavor:
42     Default: baremetal
43     Description: Flavor to request when deploying.
44     Type: String
45   GlancePassword:
46     Default: unset
47     Description: The password for the glance service account, used by the glance services.
48     Type: String
49     NoEcho: true
50   GlanceNotifierStrategy:
51     Description: Strategy to use for Glance notification queue
52     Type: String
53     Default: noop
54   GlanceLogFile:
55     Description: The filepath of the file to use for logging messages from Glance.
56     Type: String
57     Default: ''
58   KeyName:
59     Default: default
60     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
61     Type: String
62   HeatPassword:
63     Default: unset
64     Description: The password for the Heat service account, used by the Heat services.
65     Type: String
66     NoEcho: true
67   ImageUpdatePolicy:
68     Default: REBUILD_PRESERVE_EPHEMERAL
69     Description: What policy to use when reconstructing instances. REBUILD for rebuilds,
70       REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
71     Type: String
72   undercloudImage:
73     Default: undercloud
74     Type: String
75   NeutronPassword:
76     Default: unset
77     Description: The password for the neutron service account, used by neutron agents.
78     Type: String
79     NoEcho: true
80   NovaPassword:
81     Default: unset
82     Description: The password for the nova service account, used by nova-api.
83     Type: String
84     NoEcho: true
85   NeutronPublicInterfaceDefaultRoute:
86     Default: ''
87     Description: A custom default route for the NeutronPublicInterface.
88     Type: String
89   NeutronPublicInterfaceIP:
90     Default: ''
91     Description: A custom IP address to put onto the NeutronPublicInterface.
92     Type: String
93   NeutronPublicInterfaceRawDevice:
94     Default: ''
95     Description: If set, the public interface is a vlan with this device as the raw device.
96     Type: String
97   NtpServer:
98     Type: String
99     Default: ''
100   RabbitUserName:
101     Default: guest
102     Description: The username for RabbitMQ
103     Type: String
104   RabbitPassword:
105     Default: guest
106     Description: The password for RabbitMQ
107     Type: String
108     NoEcho: true
109   RabbitCookieSalt:
110     Type: String
111     Default: unset
112     Description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
113   HeatStackDomainAdminPassword:
114     Description: Password for heat_domain_admin user.
115     Type: String
116     Default: ''
117     NoEcho: true
118   MysqlInnodbBufferPoolSize:
119     Description: >
120         Specifies the size of the buffer pool in megabytes. Setting to
121         zero should be interpreted as "no value" and will defer to the
122         lower level default.
123     Type: Number
124     Default: 0
125 Resources:
126   RabbitCookie:
127     Type: OS::Heat::RandomString
128     Properties:
129       length: 20
130       salt:
131         Ref: RabbitCookieSalt
132   undercloudConfig:
133     Type: OS::Heat::StructuredConfig
134     Properties:
135       config:
136         completion-signal: {get_input: deploy_signal_id}
137         admin-password:
138           Ref: AdminPassword
139         admin-token:
140           Ref: AdminToken
141         bootstrap_host:
142           bootstrap_nodeid:
143             Fn::Select:
144             - 0
145             - Fn::Select:
146               - 0
147               - Merge::Map:
148                   undercloud:
149                   - Fn::Select:
150                     - name
151                     - Fn::GetAtt:
152                       - undercloud
153                       - show
154           nodeid: {get_input: bootstack_nodeid}
155         bootstack:
156           public_interface_ip:
157             Ref: NeutronPublicInterfaceIP
158         controller-address:
159           get_input: controller_host
160         ceilometer:
161           db: mysql://ceilometer:unset@localhost/ceilometer
162           metering_secret: {Ref: CeilometerMeteringSecret}
163           snmpd_readonly_user_name:
164             Ref: SnmpdReadonlyUserName
165           snmpd_readonly_user_password:
166             Ref: SnmpdReadonlyUserPassword
167           service-password:
168             Ref: CeilometerPassword
169         db-password: unset
170         glance:
171           backend: file
172           db: mysql://glance:unset@localhost/glance
173           host: 127.0.0.1
174           service-password:
175             Ref: GlancePassword
176           notifier-strategy:
177             Ref: GlanceNotifierStrategy
178           log-file:
179             Ref: GlanceLogFile
180         heat:
181           admin_password:
182             Ref: HeatPassword
183           admin_tenant_name: service
184           admin_user: heat
185           auth_encryption_key: unset___________
186           db: mysql://heat:unset@localhost/heat
187           stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
188           watch_server_url: {get_input: heat.watch_server_url}
189           metadata_server_url: {get_input: heat.metadata_server_url}
190           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
191         keystone:
192           db: mysql://keystone:unset@localhost/keystone
193           host: 127.0.0.1
194         mysql:
195           innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
196         neutron:
197           host: 127.0.0.1
198           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
199           ovs:
200             public_interface:
201               Ref: NeutronPublicInterface
202             public_interface_raw_device:
203               Ref: NeutronPublicInterfaceRawDevice
204             public_interface_route:
205               Ref: NeutronPublicInterfaceDefaultRoute
206             physical_bridge: br-ctlplane
207             physical_network: ctlplane
208             network_vlan_ranges: ctlplane
209             bridge_mappings: ctlplane:br-ctlplane
210             tenant_network_type: vlan
211             enable_tunneling: 'False'
212           service-password:
213             Ref: NeutronPassword
214         rabbit:
215           host: 127.0.0.1
216           username:
217             Ref: RabbitUserName
218           password:
219             Ref: RabbitPassword
220           cookie:
221             Fn::GetAtt:
222             - RabbitCookie
223             - value
224         ntp:
225           servers:
226             - {server: {Ref: NtpServer}, fudge: "stratum 0"}
227   undercloud:
228     Type: OS::Nova::Server
229     Properties:
230       image:
231         Ref: undercloudImage
232       flavor:
233         Ref: Flavor
234       key_name:
235         Ref: KeyName
236       image_update_policy:
237         Ref: ImageUpdatePolicy
238       user_data_format: SOFTWARE_CONFIG
239   99_undercloudDeployment:
240     Type: OS::Heat::StructuredDeployment
241     Properties:
242       config: {Ref: undercloudConfig}
243       server: {Ref: undercloud}
244       input_values:
245         bootstack_nodeid:
246           Fn::Select:
247             - name
248             - Fn::GetAtt:
249               - undercloud
250               - show
251         controller_host:
252           Fn::Select:
253             - 0
254             - Fn::Select:
255               - ctlplane
256               - Fn::GetAtt:
257                 - undercloud
258                 - networks
259         heat.watch_server_url:
260           Fn::Join:
261             - ''
262             - - 'http://'
263               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ undercloud, networks ]}]]}
264               - ':8003'
265         heat.metadata_server_url:
266           Fn::Join:
267             - ''
268             - - 'http://'
269               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ undercloud, networks ]}]]}
270               - ':8000'
271         heat.waitcondition_server_url:
272           Fn::Join:
273             - ''
274             - - 'http://'
275               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ undercloud, networks ]}]]}
276               - ':8000/v1/waitcondition'