Merge "Sequence deploys - compute after control plane."
[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   AccessPolicy:
121     Properties:
122       AllowedResources:
123       - undercloudConfig
124     Type: OS::Heat::AccessPolicy
125   controller0Key:
126     Properties:
127       UserName:
128         Ref: User
129     Type: AWS::IAM::AccessKey
130   controller0CompletionCondition:
131     Type: AWS::CloudFormation::WaitCondition
132     DependsOn: undercloud
133     Properties:
134       Handle: {Ref: controller0CompletionHandle}
135       Count: '1'
136       Timeout: '1800'
137   controller0CompletionHandle:
138     Type: AWS::CloudFormation::WaitConditionHandle
139   User:
140     Properties:
141       Policies:
142       - Ref: AccessPolicy
143     Type: AWS::IAM::User
144   undercloudConfig:
145     Type: AWS::AutoScaling::LaunchConfiguration
146     Properties:
147       ImageId: '0'
148       InstanceType: foo
149     Metadata:
150       OpenStack::Role: undercloudConfig
151       OpenStack::Heat::Stack: {}
152       OpenStack::ImageBuilder::Elements: [ boot-stack, heat-cfntools, neutron-network-node ]
153       admin-password:
154         Ref: AdminPassword
155       admin-token:
156         Ref: AdminToken
157       bootstrap_host:
158         bootstrap_nodeid:
159           Fn::Select:
160           - 0
161           - Fn::Select:
162             - 0
163             - Merge::Map:
164                 undercloud:
165                 - Fn::Select:
166                   - name
167                   - Fn::GetAtt:
168                     - undercloud
169                     - show
170         nodeid:
171           Fn::Select:
172           - name
173           - Fn::GetAtt:
174             - undercloud
175             - show
176       controller-address:
177         Fn::Select:
178           - 0
179           - Fn::Select:
180             - "ctlplane"
181             - Fn::GetAtt:
182               - undercloud
183               - networks
184       ceilometer:
185         db: mysql://ceilometer:unset@localhost/ceilometer
186         metering_secret: {Ref: CeilometerMeteringSecret}
187         snmpd_readonly_user_name:
188           Ref: SnmpdReadonlyUserName
189         snmpd_readonly_user_password:
190           Ref: SnmpdReadonlyUserPassword
191         service-password:
192           Ref: CeilometerPassword
193       cinder:
194         db: mysql://cinder:unset@localhost/cinder
195         volume_size_mb:
196           Ref: CinderLVMLoopDeviceSize
197       completion-handle:
198         Ref: controller0CompletionHandle
199       db-password: unset
200       glance:
201         backend: file
202         db: mysql://glance:unset@localhost/glance
203         host: 127.0.0.1
204         service-password:
205           Ref: GlancePassword
206         notifier-strategy:
207           Ref: GlanceNotifierStrategy
208         log-file:
209           Ref: GlanceLogFile
210       heat:
211         admin_password:
212           Ref: HeatPassword
213         admin_tenant_name: service
214         admin_user: heat
215         auth_encryption_key: unset___________
216         db: mysql://heat:unset@localhost/heat
217         stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
218         watch_server_url:
219           Fn::Join:
220             - ''
221             - - http://
222               - Fn::Select:
223                   - 0
224                   - Fn::Select:
225                     - "ctlplane"
226                     - Fn::GetAtt:
227                       - undercloud
228                       - networks
229               - ":8003"
230         metadata_server_url:
231           Fn::Join:
232             - ''
233             - - http://
234               - Fn::Select:
235                   - 0
236                   - Fn::Select:
237                     - "ctlplane"
238                     - Fn::GetAtt:
239                       - undercloud
240                       - networks
241               - ":8000"
242         waitcondition_server_url:
243           Fn::Join:
244             - ''
245             - - http://
246               - Fn::Select:
247                   - 0
248                   - Fn::Select:
249                     - "ctlplane"
250                     - Fn::GetAtt:
251                       - undercloud
252                       - networks
253               - ":8000/v1/waitcondition"
254       os-collect-config:
255         cfn:
256           access_key_id:
257             Ref: controller0Key
258           path: undercloudConfig.Metadata
259           secret_access_key:
260             Fn::GetAtt:
261             - controller0Key
262             - SecretAccessKey
263           stack_name:
264             Ref: AWS::StackName
265       keystone:
266         db: mysql://keystone:unset@localhost/keystone
267         host: 127.0.0.1
268       mysql:
269         innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
270       neutron:
271         host: 127.0.0.1
272         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
273         ovs:
274           public_interface:
275             Ref: NeutronPublicInterface
276           physical_bridge: br-ctlplane
277           physical_network: ctlplane
278           network_vlan_ranges: ctlplane
279           bridge_mappings: ctlplane:br-ctlplane
280           tenant_network_type: vlan
281           enable_tunneling: 'False'
282         service-password:
283           Ref: NeutronPassword
284       ntp:
285         servers:
286             - {server: {Ref: NtpServer}, fudge: "stratum 0"}
287       rabbit:
288         host: 127.0.0.1
289         username:
290           Ref: RabbitUserName
291         password:
292           Ref: RabbitPassword
293         cookie:
294           Fn::GetAtt:
295           - RabbitCookie
296           - value
297   undercloud:
298     Type: OS::Nova::Server
299     Properties:
300       image:
301         Ref: undercloudImage
302       flavor:
303         Ref: Flavor
304       key_name:
305         Ref: KeyName
306       image_update_policy:
307         Ref: ImageUpdatePolicy
308     Metadata:
309       os-collect-config:
310         cfn:
311           access_key_id:
312             Ref: controller0Key
313           path: undercloudConfig.Metadata
314           secret_access_key:
315             Fn::GetAtt:
316             - controller0Key
317             - SecretAccessKey
318           stack_name:
319             Ref: AWS::StackName