c64a6ad34e976ba78b5545df3ea2bb1cd1cbf40c
[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: >
99         Specifies the size of the buffer pool in megabytes. Setting to
100         zero should be interpreted as "no value" and will defer to the
101         lower level default.
102     Type: Number
103     Default: 0
104 Resources:
105   RabbitCookie:
106     Type: OS::Heat::RandomString
107     Properties:
108       length: 20
109       salt:
110         Ref: RabbitCookieSalt
111   AccessPolicy:
112     Properties:
113       AllowedResources:
114       - undercloudConfig
115     Type: OS::Heat::AccessPolicy
116   controller0Key:
117     Properties:
118       UserName:
119         Ref: User
120     Type: AWS::IAM::AccessKey
121   controller0CompletionCondition:
122     Type: AWS::CloudFormation::WaitCondition
123     DependsOn: undercloud
124     Properties:
125       Handle: {Ref: controller0CompletionHandle}
126       Count: '1'
127       Timeout: '1800'
128   controller0CompletionHandle:
129     Type: AWS::CloudFormation::WaitConditionHandle
130   User:
131     Properties:
132       Policies:
133       - Ref: AccessPolicy
134     Type: AWS::IAM::User
135   undercloudConfig:
136     Type: AWS::AutoScaling::LaunchConfiguration
137     Properties:
138       ImageId: '0'
139       InstanceType: foo
140     Metadata:
141       OpenStack::Role: undercloudConfig
142       OpenStack::Heat::Stack: {}
143       OpenStack::ImageBuilder::Elements: [ boot-stack, heat-cfntools, neutron-network-node ]
144       admin-password:
145         Ref: AdminPassword
146       admin-token:
147         Ref: AdminToken
148       controller-address:
149         Fn::Select:
150           - 0
151           - Fn::Select:
152             - "ctlplane"
153             - Fn::GetAtt:
154               - undercloud
155               - networks
156       ceilometer:
157         db: mysql://ceilometer:unset@localhost/ceilometer
158         metering_secret: {Ref: CeilometerMeteringSecret}
159         service-password:
160           Ref: CeilometerPassword
161       cinder:
162         db: mysql://cinder:unset@localhost/cinder
163         volume_size_mb:
164           Ref: CinderLVMLoopDeviceSize
165       completion-handle:
166         Ref: controller0CompletionHandle
167       db-password: unset
168       glance:
169         backend: file
170         db: mysql://glance:unset@localhost/glance
171         host: 127.0.0.1
172         service-password:
173           Ref: GlancePassword
174         notifier-strategy:
175           Ref: GlanceNotifierStrategy
176         log-file:
177           Ref: GlanceLogFile
178       heat:
179         admin_password:
180           Ref: HeatPassword
181         admin_tenant_name: service
182         admin_user: heat
183         auth_encryption_key: unset___________
184         db: mysql://heat:unset@localhost/heat
185         stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
186         watch_server_url:
187           Fn::Join:
188             - ''
189             - - http://
190               - Fn::Select:
191                   - 0
192                   - Fn::Select:
193                     - "ctlplane"
194                     - Fn::GetAtt:
195                       - undercloud
196                       - networks
197               - ":8003"
198         metadata_server_url:
199           Fn::Join:
200             - ''
201             - - http://
202               - Fn::Select:
203                   - 0
204                   - Fn::Select:
205                     - "ctlplane"
206                     - Fn::GetAtt:
207                       - undercloud
208                       - networks
209               - ":8000"
210         waitcondition_server_url:
211           Fn::Join:
212             - ''
213             - - http://
214               - Fn::Select:
215                   - 0
216                   - Fn::Select:
217                     - "ctlplane"
218                     - Fn::GetAtt:
219                       - undercloud
220                       - networks
221               - ":8000/v1/waitcondition"
222       os-collect-config:
223         cfn:
224           access_key_id:
225             Ref: controller0Key
226           path: undercloudConfig.Metadata
227           secret_access_key:
228             Fn::GetAtt:
229             - controller0Key
230             - SecretAccessKey
231           stack_name:
232             Ref: AWS::StackName
233       keystone:
234         db: mysql://keystone:unset@localhost/keystone
235         host: 127.0.0.1
236       mysql:
237         innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
238       neutron:
239         host: 127.0.0.1
240         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
241         ovs:
242           public_interface:
243             Ref: NeutronPublicInterface
244           physical_bridge: br-ctlplane
245           physical_network: ctlplane
246           network_vlan_ranges: ctlplane
247           bridge_mappings: ctlplane:br-ctlplane
248           tenant_network_type: vlan
249           enable_tunneling: 'False'
250         service-password:
251           Ref: NeutronPassword
252       ntp:
253         servers:
254             - {server: {Ref: NtpServer}, fudge: "stratum 0"}
255       rabbit:
256         host: 127.0.0.1
257         username:
258           Ref: RabbitUserName
259         password:
260           Ref: RabbitPassword
261         cookie:
262           Fn::GetAtt:
263           - RabbitCookie
264           - value
265   undercloud:
266     Type: OS::Nova::Server
267     Properties:
268       image:
269         Ref: undercloudImage
270       flavor:
271         Ref: Flavor
272       key_name:
273         Ref: KeyName
274       image_update_policy:
275         Ref: ImageUpdatePolicy
276     Metadata:
277       os-collect-config:
278         cfn:
279           access_key_id:
280             Ref: controller0Key
281           path: undercloudConfig.Metadata
282           secret_access_key:
283             Fn::GetAtt:
284             - controller0Key
285             - SecretAccessKey
286           stack_name:
287             Ref: AWS::StackName