Merge "Configure NTP for overcloud compute"
[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       controller-address:
158         Fn::Select:
159           - 0
160           - Fn::Select:
161             - "ctlplane"
162             - Fn::GetAtt:
163               - undercloud
164               - networks
165       ceilometer:
166         db: mysql://ceilometer:unset@localhost/ceilometer
167         metering_secret: {Ref: CeilometerMeteringSecret}
168         snmpd_readonly_user_name:
169           Ref: SnmpdReadonlyUserName
170         snmpd_readonly_user_password:
171           Ref: SnmpdReadonlyUserPassword
172         service-password:
173           Ref: CeilometerPassword
174       cinder:
175         db: mysql://cinder:unset@localhost/cinder
176         volume_size_mb:
177           Ref: CinderLVMLoopDeviceSize
178       completion-handle:
179         Ref: controller0CompletionHandle
180       db-password: unset
181       glance:
182         backend: file
183         db: mysql://glance:unset@localhost/glance
184         host: 127.0.0.1
185         service-password:
186           Ref: GlancePassword
187         notifier-strategy:
188           Ref: GlanceNotifierStrategy
189         log-file:
190           Ref: GlanceLogFile
191       heat:
192         admin_password:
193           Ref: HeatPassword
194         admin_tenant_name: service
195         admin_user: heat
196         auth_encryption_key: unset___________
197         db: mysql://heat:unset@localhost/heat
198         stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
199         watch_server_url:
200           Fn::Join:
201             - ''
202             - - http://
203               - Fn::Select:
204                   - 0
205                   - Fn::Select:
206                     - "ctlplane"
207                     - Fn::GetAtt:
208                       - undercloud
209                       - networks
210               - ":8003"
211         metadata_server_url:
212           Fn::Join:
213             - ''
214             - - http://
215               - Fn::Select:
216                   - 0
217                   - Fn::Select:
218                     - "ctlplane"
219                     - Fn::GetAtt:
220                       - undercloud
221                       - networks
222               - ":8000"
223         waitcondition_server_url:
224           Fn::Join:
225             - ''
226             - - http://
227               - Fn::Select:
228                   - 0
229                   - Fn::Select:
230                     - "ctlplane"
231                     - Fn::GetAtt:
232                       - undercloud
233                       - networks
234               - ":8000/v1/waitcondition"
235       os-collect-config:
236         cfn:
237           access_key_id:
238             Ref: controller0Key
239           path: undercloudConfig.Metadata
240           secret_access_key:
241             Fn::GetAtt:
242             - controller0Key
243             - SecretAccessKey
244           stack_name:
245             Ref: AWS::StackName
246       keystone:
247         db: mysql://keystone:unset@localhost/keystone
248         host: 127.0.0.1
249       mysql:
250         innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
251       neutron:
252         host: 127.0.0.1
253         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
254         ovs:
255           public_interface:
256             Ref: NeutronPublicInterface
257           physical_bridge: br-ctlplane
258           physical_network: ctlplane
259           network_vlan_ranges: ctlplane
260           bridge_mappings: ctlplane:br-ctlplane
261           tenant_network_type: vlan
262           enable_tunneling: 'False'
263         service-password:
264           Ref: NeutronPassword
265       ntp:
266         servers:
267             - {server: {Ref: NtpServer}, fudge: "stratum 0"}
268       rabbit:
269         host: 127.0.0.1
270         username:
271           Ref: RabbitUserName
272         password:
273           Ref: RabbitPassword
274         cookie:
275           Fn::GetAtt:
276           - RabbitCookie
277           - value
278   undercloud:
279     Type: OS::Nova::Server
280     Properties:
281       image:
282         Ref: undercloudImage
283       flavor:
284         Ref: Flavor
285       key_name:
286         Ref: KeyName
287       image_update_policy:
288         Ref: ImageUpdatePolicy
289     Metadata:
290       os-collect-config:
291         cfn:
292           access_key_id:
293             Ref: controller0Key
294           path: undercloudConfig.Metadata
295           secret_access_key:
296             Fn::GetAtt:
297             - controller0Key
298             - SecretAccessKey
299           stack_name:
300             Ref: AWS::StackName