Merge "Fixes to swift-storage-source.yaml"
[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   NtpServer:
86     Type: String
87     Default: ''
88   RabbitUserName:
89     Default: guest
90     Description: The username for RabbitMQ
91     Type: String
92   RabbitPassword:
93     Default: guest
94     Description: The password for RabbitMQ
95     Type: String
96     NoEcho: true
97   RabbitCookieSalt:
98     Type: String
99     Default: unset
100     Description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
101   HeatStackDomainAdminPassword:
102     Description: Password for heat_domain_admin user.
103     Type: String
104     Default: ''
105     NoEcho: true
106   MysqlInnodbBufferPoolSize:
107     Description: >
108         Specifies the size of the buffer pool in megabytes. Setting to
109         zero should be interpreted as "no value" and will defer to the
110         lower level default.
111     Type: Number
112     Default: 0
113 Resources:
114   RabbitCookie:
115     Type: OS::Heat::RandomString
116     Properties:
117       length: 20
118       salt:
119         Ref: RabbitCookieSalt
120   undercloudConfig:
121     Type: OS::Heat::StructuredConfig
122     Properties:
123       config:
124         completion-signal: {get_input: deploy_signal_id}
125         admin-password:
126           Ref: AdminPassword
127         admin-token:
128           Ref: AdminToken
129         bootstrap_host:
130           bootstrap_nodeid:
131             Fn::Select:
132             - 0
133             - Fn::Select:
134               - 0
135               - Merge::Map:
136                   undercloud:
137                   - Fn::Select:
138                     - name
139                     - Fn::GetAtt:
140                       - undercloud
141                       - show
142           nodeid: {get_input: bootstack_nodeid}
143         controller-address:
144           get_input: controller_host
145         ceilometer:
146           db: mysql://ceilometer:unset@localhost/ceilometer
147           metering_secret: {Ref: CeilometerMeteringSecret}
148           snmpd_readonly_user_name:
149             Ref: SnmpdReadonlyUserName
150           snmpd_readonly_user_password:
151             Ref: SnmpdReadonlyUserPassword
152           service-password:
153             Ref: CeilometerPassword
154         db-password: unset
155         glance:
156           backend: file
157           db: mysql://glance:unset@localhost/glance
158           host: 127.0.0.1
159           service-password:
160             Ref: GlancePassword
161           notifier-strategy:
162             Ref: GlanceNotifierStrategy
163           log-file:
164             Ref: GlanceLogFile
165         heat:
166           admin_password:
167             Ref: HeatPassword
168           admin_tenant_name: service
169           admin_user: heat
170           auth_encryption_key: unset___________
171           db: mysql://heat:unset@localhost/heat
172           stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
173           watch_server_url: {get_input: heat.watch_server_url}
174           metadata_server_url: {get_input: heat.metadata_server_url}
175           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
176         keystone:
177           db: mysql://keystone:unset@localhost/keystone
178           host: 127.0.0.1
179         mysql:
180           innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
181         neutron:
182           host: 127.0.0.1
183           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
184           ovs:
185             public_interface:
186               Ref: NeutronPublicInterface
187             physical_bridge: br-ctlplane
188             physical_network: ctlplane
189             network_vlan_ranges: ctlplane
190             bridge_mappings: ctlplane:br-ctlplane
191             tenant_network_type: vlan
192             enable_tunneling: 'False'
193           service-password:
194             Ref: NeutronPassword
195         rabbit:
196           host: 127.0.0.1
197           username:
198             Ref: RabbitUserName
199           password:
200             Ref: RabbitPassword
201           cookie:
202             Fn::GetAtt:
203             - RabbitCookie
204             - value
205         ntp:
206           servers:
207             - {server: {Ref: NtpServer}, fudge: "stratum 0"}
208   undercloud:
209     Type: OS::Nova::Server
210     Properties:
211       image:
212         Ref: undercloudImage
213       flavor:
214         Ref: Flavor
215       key_name:
216         Ref: KeyName
217       image_update_policy:
218         Ref: ImageUpdatePolicy
219       user_data_format: SOFTWARE_CONFIG
220   99_undercloudDeployment:
221     Type: OS::Heat::StructuredDeployment
222     Properties:
223       config: {Ref: undercloudConfig}
224       server: {Ref: undercloud}
225       input_values:
226         bootstack_nodeid:
227           Fn::Select:
228             - name
229             - Fn::GetAtt:
230               - undercloud
231               - show
232         controller_host:
233           Fn::Select:
234             - 0
235             - Fn::Select:
236               - ctlplane
237               - Fn::GetAtt:
238                 - undercloud
239                 - networks
240         heat.watch_server_url:
241           Fn::Join:
242             - ''
243             - - 'http://'
244               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ undercloud, networks ]}]]}
245               - ':8003'
246         heat.metadata_server_url:
247           Fn::Join:
248             - ''
249             - - 'http://'
250               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ undercloud, networks ]}]]}
251               - ':8000'
252         heat.waitcondition_server_url:
253           Fn::Join:
254             - ''
255             - - 'http://'
256               - {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ undercloud, networks ]}]]}
257               - ':8000/v1/waitcondition'