Hand modified notcompute.yaml to work properly.
[apex-tripleo-heat-templates.git] / notcompute.yaml
1 Description: Nova API,Keystone,Heat Engine and API,Glance,Quantum,Dedicated MySQL
2   server,Dedicated RabbitMQ Server
3 HeatTemplateFormatVersion: '2012-12-12'
4 Outputs:
5   GlancePassword:
6     Fn::GetAtt:
7     - GlancePassword
8     - Data
9   GlanceUser:
10     Ref: GlanceUser
11   HeatPassword:
12     Fn::GetAtt:
13     - HeatPassword
14     - Data
15   HeatUser:
16     Ref: HeatUser
17   KeystonePassword:
18     Fn::GetAtt:
19     - KeystonePassword
20     - Data
21   KeystoneUser:
22     Ref: KeystoneUser
23   MySQLHost:
24     Fn::GetAtt:
25     - notcompute
26     - PrivateIp
27   RabbitMQHost:
28     Fn::GetAtt:
29     - notcompute
30     - PrivateIp
31   RabbitMQPassword:
32     Fn::GetAtt:
33     - RabbitMQPassword
34     - Data
35 Parameters:
36   AdminToken:
37     Type: String
38   BootstrapDumpPassword:
39     Default: ''
40     Description: Password to use for mysqldump from Bootstrap Host
41     Type: String
42   BootstrapHost:
43     Default: ''
44     Description: Load mysqldump from this Host
45     Type: String
46   BootstrapRootPassword:
47     Default: ''
48     Description: Root password for localhost access after bootstrap
49     Type: String
50   BootstrapSlavePassword:
51     Default: ''
52     Description: Password to use with BootstrapSlaveUser
53     Type: String
54   BootstrapSlaveUser:
55     Default: ''
56     Description: User to use for replication from bootstrap host
57     Type: String
58   GlanceDSN:
59     Description: DSN for connecting to glance database
60     Type: String
61   GlanceUser:
62     Default: heat
63     Description: Glance database username.
64     Type: String
65   HeatUser:
66     Default: heat
67     Description: Heat database username.
68     Type: String
69   InstanceType:
70     Default: bm.small
71     Description: Use this flavor
72     Type: String
73   KeyName:
74     Default: default
75     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
76     Type: String
77   KeystoneDSN:
78     Description: DSN for connecting to keystone
79     Type: String
80   KeystoneHost:
81     Type: String
82   KeystoneUser:
83     Default: keystone
84     Description: Keystone database username.
85     Type: String
86   NovaDSN:
87     Description: DSN for connecting to nova database
88     Type: String
89   NovaInterfaces:
90     Default: eth0
91     Type: String
92   QuantumDSN:
93     Description: DSN for connecting to quantum database
94     Type: String
95   QuantumInterfaces:
96     Default: eth0
97     Type: String
98   RabbitHost:
99     Type: String
100   RabbitMQHost:
101     Description: Host for RabbitMQ
102     Type: String
103   RabbitMQPassword:
104     Description: Password for RabbitMQ
105     Type: String
106   RabbitPassword:
107     Type: String
108   ServicePassword:
109     Description: admin_password for setting up auth in nova.
110     Type: String
111   networkingImage:
112     Type: String
113   notcomputeImage:
114     Type: String
115 Resources:
116   AccessPolicy:
117     Properties:
118       AllowedResources:
119       - notcompute
120     Type: OS::Heat::AccessPolicy
121   ApiAccessPolicy:
122     Properties:
123       AllowedResources:
124       - KeystoneLaunch
125       - notcompute
126     Type: OS::Heat::AccessPolicy
127   ApiKey:
128     Properties:
129       UserName:
130         Ref: ApiUser
131     Type: AWS::IAM::AccessKey
132   ApiUser:
133     Properties:
134       Policies:
135       - Ref: ApiAccessPolicy
136     Type: AWS::IAM::User
137   GlancePassword:
138     DependsOn: notcompute
139     Properties:
140       Handle:
141         Ref: GlancePasswordHandle
142       Timeout: 90
143     Type: AWS::CloudFormation::WaitCondition
144   GlancePasswordHandle:
145     Type: AWS::CloudFormation::WaitConditionHandle
146   HeatAccessPolicy:
147     Properties:
148       AllowedResources:
149       - notcompute
150     Type: OS::Heat::AccessPolicy
151   HeatKey:
152     Properties:
153       UserName:
154         Ref: HeatUser
155     Type: AWS::IAM::AccessKey
156   HeatPassword:
157     DependsOn: notcompute
158     Properties:
159       Handle:
160         Ref: HeatPasswordHandle
161       Timeout: 90
162     Type: AWS::CloudFormation::WaitCondition
163   HeatPasswordHandle:
164     Type: AWS::CloudFormation::WaitConditionHandle
165   HeatUser:
166     Properties:
167       Policies:
168       - Ref: HeatAccessPolicy
169     Type: AWS::IAM::User
170   Key:
171     Properties:
172       UserName:
173         Ref: User
174     Type: AWS::IAM::AccessKey
175   KeystonePassword:
176     DependsOn: notcompute
177     Properties:
178       Handle:
179         Ref: KeystonePasswordHandle
180       Timeout: 90
181     Type: AWS::CloudFormation::WaitCondition
182   KeystonePasswordHandle:
183     Type: AWS::CloudFormation::WaitConditionHandle
184   RabbitMQPassword:
185     DependsOn: notcompute
186     Properties:
187       Handle:
188         Ref: RabbitMQPasswordHandle
189       Timeout: 60
190     Type: AWS::CloudFormation::WaitCondition
191   RabbitMQPasswordHandle:
192     Type: AWS::CloudFormation::WaitConditionHandle
193   User:
194     Properties:
195       Policies:
196       - Ref: AccessPolicy
197     Type: AWS::IAM::User
198   networking:
199     Metadata:
200       OpenStack::ImageBuilder::Elements:
201       - quantum
202       OpenStack::Role: networking
203       admin-password:
204         Ref: ServicePassword
205       heat:
206         access_key_id:
207           Ref: Key
208         refresh:
209         - resource: Quantum
210         secret_key:
211           Fn::GetAtt:
212           - Key
213           - SecretAccessKey
214         stack:
215           name:
216             Ref: AWS::StackName
217           region:
218             Ref: AWS::Region
219       interfaces:
220         control:
221           Ref: QuantumInterfaces
222       keystone:
223         host:
224           Ref: KeystoneHost
225       quantum:
226         ovs_db:
227           Ref: QuantumDSN
228       rabbit:
229         host:
230           Ref: RabbitHost
231         password:
232           Ref: RabbitPassword
233       service-password:
234         Ref: ServicePassword
235       swift:
236         store_key: ''
237         store_user: ''
238     Properties:
239       ImageId:
240         Ref: networkingImage
241       InstanceType:
242         Ref: InstanceType
243       KeyName:
244         Ref: KeyName
245     Type: AWS::EC2::Instance
246   notcompute:
247     Metadata:
248       OpenStack::ImageBuilder::Elements:
249       - nova-api
250       - keystone
251       - heat-api
252       - heat-engine
253       - glance
254       - mysql-migration
255       - rabbitmq-server
256       OpenStack::Role: stateless
257       admin-password:
258         Ref: ServicePassword
259       admin-token:
260         Ref: AdminToken
261       glance:
262         db:
263           Ref: GlanceDSN
264       heat:
265         access_key_id:
266           Ref: Key
267         refresh:
268         - resource: NovaApi
269         secret_key:
270           Fn::GetAtt:
271           - Key
272           - SecretAccessKey
273         stack:
274           name:
275             Ref: AWS::StackName
276           region:
277             Ref: AWS::Region
278       interfaces:
279         control:
280           Ref: NovaInterfaces
281       keystone:
282         host:
283           Ref: KeystoneHost
284       mysql:
285         create-users:
286         - database: keystone
287           userhandle:
288             Ref: KeystonePasswordHandle
289           username:
290             Ref: KeystoneUser
291         - database: heat
292           userhandle:
293             Ref: HeatPasswordHandle
294           username:
295             Ref: HeatUser
296         - database: glance
297           userhandle:
298             Ref: GlancePasswordHandle
299           username:
300             Ref: GlanceUser
301       mysql-migration:
302         bootstrap_host:
303           Ref: BootstrapHost
304         slave_password:
305           Ref: BootstrapSlavePassword
306         slave_user:
307           Ref: BootstrapSlaveUser
308         users:
309           dump:
310             password:
311               Ref: BootstrapDumpPassword
312             username: dump
313           root:
314             password:
315               Ref: BootstrapRootPassword
316             username: root
317       nova:
318         db:
319           Ref: NovaDSN
320       quantum:
321         host:
322           Ref: QuantumHost
323       rabbit:
324         host:
325           Ref: RabbitHost
326         password:
327           Ref: RabbitPassword
328       rabbitmq:
329         password_handle:
330           Ref: RabbitMQPasswordHandle
331       service-password:
332         Ref: ServicePassword
333       swift:
334         store_key: ''
335         store_user: ''
336     Properties:
337       ImageId:
338         Ref: notcomputeImage
339       InstanceType:
340         Ref: InstanceType
341       KeyName:
342         Ref: KeyName
343     Type: AWS::EC2::Instance