f18612c87b329303e51eea05509f06848116022b
[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   undercloudImage:
45     Default: undercloud
46     Type: String
47   NeutronPassword:
48     Default: unset
49     Description: The password for the neutron service account, used by neutron agents.
50     Type: String
51     NoEcho: true
52   NovaPassword:
53     Default: unset
54     Description: The password for the nova service account, used by nova-api.
55     Type: String
56     NoEcho: true
57   RabbitUserName:
58     Default: guest
59     Description: The username for RabbitMQ
60     Type: String
61   RabbitPassword:
62     Default: guest
63     Description: The password for RabbitMQ
64     Type: String
65     NoEcho: true
66   RabbitCookieSalt:
67     Type: String
68     Default: unset
69     Description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
70   HeatStackDomainAdminPassword:
71     Description: Password for heat_domain_admin user.
72     Type: String
73     Default: ''
74     NoEcho: true
75 Resources:
76   RabbitCookie:
77     Type: OS::Heat::RandomString
78     Properties:
79       length: 20
80       salt:
81         Ref: RabbitCookieSalt
82   AccessPolicy:
83     Properties:
84       AllowedResources:
85       - undercloudConfig
86     Type: OS::Heat::AccessPolicy
87   notCompute0Key:
88     Properties:
89       UserName:
90         Ref: User
91     Type: AWS::IAM::AccessKey
92   notCompute0CompletionCondition:
93     Type: AWS::CloudFormation::WaitCondition
94     DependsOn: undercloud
95     Properties:
96       Handle: {Ref: notCompute0CompletionHandle}
97       Count: '1'
98       Timeout: '1800'
99   notCompute0CompletionHandle:
100     Type: AWS::CloudFormation::WaitConditionHandle
101   User:
102     Properties:
103       Policies:
104       - Ref: AccessPolicy
105     Type: AWS::IAM::User
106   undercloudConfig:
107     Type: AWS::AutoScaling::LaunchConfiguration
108     Properties:
109       ImageId: '0'
110       InstanceType: foo
111     Metadata:
112       OpenStack::Role: undercloudConfig
113       OpenStack::Heat::Stack: {}
114       OpenStack::ImageBuilder::Elements: [ boot-stack, heat-cfntools, neutron-network-node ]
115       admin-password:
116         Ref: AdminPassword
117       admin-token: 
118         Ref: AdminToken
119       controller-address:
120         Fn::Select:
121           - 0
122           - Fn::Select:
123             - "ctlplane"
124             - Fn::GetAtt:
125               - undercloud
126               - networks
127       cinder:
128         db: mysql://cinder:unset@localhost/cinder
129         volume_size_mb: '5000'
130       completion-handle:
131         Ref: notCompute0CompletionHandle
132       db-password: unset
133       glance:
134         backend: file
135         db: mysql://glance:unset@localhost/glance
136         host: 127.0.0.1
137         service-password:
138           Ref: GlancePassword
139         notifier-strategy:
140           Ref: GlanceNotifierStrategy
141         log-file:
142           Ref: GlanceLogFile
143       heat:
144         admin_password:
145           Ref: HeatPassword
146         admin_tenant_name: service
147         admin_user: heat
148         auth_encryption_key: unset___________
149         db: mysql://heat:unset@localhost/heat
150         stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
151         watch_server_url:
152           Fn::Join:
153             - ''
154             - - http://
155               - Fn::Select:
156                   - 0
157                   - Fn::Select:
158                     - "ctlplane"
159                     - Fn::GetAtt:
160                       - undercloud
161                       - networks
162               - ":8003"
163         metadata_server_url:
164           Fn::Join:
165             - ''
166             - - http://
167               - Fn::Select:
168                   - 0
169                   - Fn::Select:
170                     - "ctlplane"
171                     - Fn::GetAtt:
172                       - undercloud
173                       - networks
174               - ":8000"
175         waitcondition_server_url:
176           Fn::Join:
177             - ''
178             - - http://
179               - Fn::Select:
180                   - 0
181                   - Fn::Select:
182                     - "ctlplane"
183                     - Fn::GetAtt:
184                       - undercloud
185                       - networks
186               - ":8000/v1/waitcondition"
187       os-collect-config:
188         cfn:
189           access_key_id:
190             Ref: notCompute0Key
191           path: undercloudConfig.Metadata
192           secret_access_key:
193             Fn::GetAtt:
194             - notCompute0Key
195             - SecretAccessKey
196           stack_name:
197             Ref: AWS::StackName
198       keystone:
199         db: mysql://keystone:unset@localhost/keystone
200         host: 127.0.0.1
201       neutron:
202         host: 127.0.0.1
203         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
204         ovs:
205           dnsmasq_range: [192.0.2.25, 192.0.2.44]
206           public_interface:
207             Ref: NeutronPublicInterface
208           physical_bridge: br-ctlplane
209           physical_network: ctlplane
210           network_vlan_ranges: ctlplane
211           bridge_mappings: ctlplane:br-ctlplane
212           tenant_network_type: vlan
213           enable_tunneling: 'False'
214         service-password:
215           Ref: NeutronPassword
216       rabbit:
217         host: 127.0.0.1
218         username:
219           Ref: RabbitUserName
220         password:
221           Ref: RabbitPassword
222         cookie:
223           Fn::GetAtt:
224           - RabbitCookie
225           - value
226   undercloud:
227     Type: OS::Nova::Server
228     Properties:
229       image:
230         Ref: undercloudImage
231       flavor:
232         Ref: Flavor
233       key_name:
234         Ref: KeyName
235     Metadata:
236       os-collect-config:
237         cfn:
238           access_key_id:
239             Ref: notCompute0Key
240           path: undercloudConfig.Metadata
241           secret_access_key:
242             Fn::GetAtt:
243             - notCompute0Key
244             - SecretAccessKey
245           stack_name:
246             Ref: AWS::StackName