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