Make size of loop device used by cinder LVM configurable
[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   Flavor:
33     Default: baremetal
34     Description: Flavor to request when deploying.
35     Type: String
36   GlancePassword:
37     Default: unset
38     Description: The password for the glance service account, used by the glance services.
39     Type: String
40     NoEcho: true
41   GlanceNotifierStrategy:
42     Description: Strategy to use for Glance notification queue
43     Type: String
44     Default: noop
45   GlanceLogFile:
46     Description: The filepath of the file to use for logging messages from Glance.
47     Type: String
48     Default: ''
49   KeyName:
50     Default: default
51     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
52     Type: String
53   HeatPassword:
54     Default: unset
55     Description: The password for the Heat service account, used by the Heat services.
56     Type: String
57     NoEcho: true
58   ImageUpdatePolicy:
59     Default: REBUILD_PRESERVE_EPHEMERAL
60     Description: What policy to use when reconstructing instances. REBUILD for rebuilds,
61       REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
62     Type: String
63   undercloudImage:
64     Default: undercloud
65     Type: String
66   NeutronPassword:
67     Default: unset
68     Description: The password for the neutron service account, used by neutron agents.
69     Type: String
70     NoEcho: true
71   NovaPassword:
72     Default: unset
73     Description: The password for the nova service account, used by nova-api.
74     Type: String
75     NoEcho: true
76   NtpServer:
77     Type: String
78     Default: ''
79   RabbitUserName:
80     Default: guest
81     Description: The username for RabbitMQ
82     Type: String
83   RabbitPassword:
84     Default: guest
85     Description: The password for RabbitMQ
86     Type: String
87     NoEcho: true
88   RabbitCookieSalt:
89     Type: String
90     Default: unset
91     Description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
92   HeatStackDomainAdminPassword:
93     Description: Password for heat_domain_admin user.
94     Type: String
95     Default: ''
96     NoEcho: true
97   MysqlInnodbBufferPoolSize:
98     Description: Specifies the size of the buffer pool in megabytes.
99     Type: Number
100     Default: 100
101 Resources:
102   RabbitCookie:
103     Type: OS::Heat::RandomString
104     Properties:
105       length: 20
106       salt:
107         Ref: RabbitCookieSalt
108   AccessPolicy:
109     Properties:
110       AllowedResources:
111       - undercloudConfig
112     Type: OS::Heat::AccessPolicy
113   controller0Key:
114     Properties:
115       UserName:
116         Ref: User
117     Type: AWS::IAM::AccessKey
118   controller0CompletionCondition:
119     Type: AWS::CloudFormation::WaitCondition
120     DependsOn: undercloud
121     Properties:
122       Handle: {Ref: controller0CompletionHandle}
123       Count: '1'
124       Timeout: '1800'
125   controller0CompletionHandle:
126     Type: AWS::CloudFormation::WaitConditionHandle
127   User:
128     Properties:
129       Policies:
130       - Ref: AccessPolicy
131     Type: AWS::IAM::User
132   undercloudConfig:
133     Type: AWS::AutoScaling::LaunchConfiguration
134     Properties:
135       ImageId: '0'
136       InstanceType: foo
137     Metadata:
138       OpenStack::Role: undercloudConfig
139       OpenStack::Heat::Stack: {}
140       OpenStack::ImageBuilder::Elements: [ boot-stack, heat-cfntools, neutron-network-node ]
141       admin-password:
142         Ref: AdminPassword
143       admin-token:
144         Ref: AdminToken
145       controller-address:
146         Fn::Select:
147           - 0
148           - Fn::Select:
149             - "ctlplane"
150             - Fn::GetAtt:
151               - undercloud
152               - networks
153       ceilometer:
154         db: mysql://ceilometer:unset@localhost/ceilometer
155         metering_secret: {Ref: CeilometerMeteringSecret}
156         service-password:
157           Ref: CeilometerPassword
158       cinder:
159         db: mysql://cinder:unset@localhost/cinder
160         volume_size_mb:
161           Ref: CinderLVMLoopDeviceSize
162       completion-handle:
163         Ref: controller0CompletionHandle
164       db-password: unset
165       glance:
166         backend: file
167         db: mysql://glance:unset@localhost/glance
168         host: 127.0.0.1
169         service-password:
170           Ref: GlancePassword
171         notifier-strategy:
172           Ref: GlanceNotifierStrategy
173         log-file:
174           Ref: GlanceLogFile
175       heat:
176         admin_password:
177           Ref: HeatPassword
178         admin_tenant_name: service
179         admin_user: heat
180         auth_encryption_key: unset___________
181         db: mysql://heat:unset@localhost/heat
182         stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
183         watch_server_url:
184           Fn::Join:
185             - ''
186             - - http://
187               - Fn::Select:
188                   - 0
189                   - Fn::Select:
190                     - "ctlplane"
191                     - Fn::GetAtt:
192                       - undercloud
193                       - networks
194               - ":8003"
195         metadata_server_url:
196           Fn::Join:
197             - ''
198             - - http://
199               - Fn::Select:
200                   - 0
201                   - Fn::Select:
202                     - "ctlplane"
203                     - Fn::GetAtt:
204                       - undercloud
205                       - networks
206               - ":8000"
207         waitcondition_server_url:
208           Fn::Join:
209             - ''
210             - - http://
211               - Fn::Select:
212                   - 0
213                   - Fn::Select:
214                     - "ctlplane"
215                     - Fn::GetAtt:
216                       - undercloud
217                       - networks
218               - ":8000/v1/waitcondition"
219       os-collect-config:
220         cfn:
221           access_key_id:
222             Ref: controller0Key
223           path: undercloudConfig.Metadata
224           secret_access_key:
225             Fn::GetAtt:
226             - controller0Key
227             - SecretAccessKey
228           stack_name:
229             Ref: AWS::StackName
230       keystone:
231         db: mysql://keystone:unset@localhost/keystone
232         host: 127.0.0.1
233       mysql:
234         innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
235       neutron:
236         host: 127.0.0.1
237         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
238         ovs:
239           public_interface:
240             Ref: NeutronPublicInterface
241           physical_bridge: br-ctlplane
242           physical_network: ctlplane
243           network_vlan_ranges: ctlplane
244           bridge_mappings: ctlplane:br-ctlplane
245           tenant_network_type: vlan
246           enable_tunneling: 'False'
247         service-password:
248           Ref: NeutronPassword
249       ntp:
250         servers:
251             - {server: {Ref: NtpServer}, fudge: "stratum 0"}
252       rabbit:
253         host: 127.0.0.1
254         username:
255           Ref: RabbitUserName
256         password:
257           Ref: RabbitPassword
258         cookie:
259           Fn::GetAtt:
260           - RabbitCookie
261           - value
262   undercloud:
263     Type: OS::Nova::Server
264     Properties:
265       image:
266         Ref: undercloudImage
267       flavor:
268         Ref: Flavor
269       key_name:
270         Ref: KeyName
271       image_update_policy:
272         Ref: ImageUpdatePolicy
273     Metadata:
274       os-collect-config:
275         cfn:
276           access_key_id:
277             Ref: controller0Key
278           path: undercloudConfig.Metadata
279           secret_access_key:
280             Fn::GetAtt:
281             - controller0Key
282             - SecretAccessKey
283           stack_name:
284             Ref: AWS::StackName