Add glance heat and keystone to notcompute
[apex-tripleo-heat-templates.git] / notcompute.yaml
1 Description: Dedicated RabbitMQ Server,Dedicated MySQL server,Nova API,Keystone,Heat
2   Engine and API,Glance
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   NovaAPiSize:
87     Default: 1
88     Type: Integer
89   NovaDSN:
90     Description: DSN for connecting to nova database
91     Type: String
92   NovaInterfaces:
93     Default: eth0
94     Type: String
95   RabbitHost:
96     Type: String
97   RabbitMQHost:
98     Description: Host for RabbitMQ
99     Type: String
100   RabbitMQPassword:
101     Description: Password for RabbitMQ
102     Type: String
103   RabbitPassword:
104     Type: String
105   ServicePassword:
106     Description: admin_password for setting up auth in nova.
107     Type: String
108   TemplateURL:
109     Default: https://raw.github.com/openstack-ops/templates/master/
110     Type: String
111   notcomputeImage:
112     Type: String
113 Resources:
114   AccessPolicy:
115     Properties:
116       AllowedResources:
117       - notcompute
118     Type: OS::Heat::AccessPolicy
119   ApiAccessPolicy:
120     Properties:
121       AllowedResources:
122       - notcompute
123     Type: OS::Heat::AccessPolicy
124   ApiKey:
125     Properties:
126       UserName:
127         Ref: ApiUser
128     Type: AWS::IAM::AccessKey
129   ApiUser:
130     Properties:
131       Policies:
132       - Ref: ApiAccessPolicy
133     Type: AWS::IAM::User
134   GlancePassword:
135     DependsOn: notcompute
136     Properties:
137       Handle:
138         Ref: GlancePasswordHandle
139       Timeout: 90
140     Type: AWS::CloudFormation::WaitCondition
141   GlancePasswordHandle:
142     Type: AWS::CloudFormation::WaitConditionHandle
143   HeatAccessPolicy:
144     Properties:
145       AllowedResources:
146       - notcompute
147     Type: OS::Heat::AccessPolicy
148   HeatKey:
149     Properties:
150       UserName:
151         Ref: HeatUser
152     Type: AWS::IAM::AccessKey
153   HeatPassword:
154     DependsOn: notcompute
155     Properties:
156       Handle:
157         Ref: HeatPasswordHandle
158       Timeout: 90
159     Type: AWS::CloudFormation::WaitCondition
160   HeatPasswordHandle:
161     Type: AWS::CloudFormation::WaitConditionHandle
162   HeatUser:
163     Properties:
164       Policies:
165       - Ref: HeatAccessPolicy
166     Type: AWS::IAM::User
167   Key:
168     Properties:
169       UserName:
170         Ref: User
171     Type: AWS::IAM::AccessKey
172   KeystonePassword:
173     DependsOn: notcompute
174     Properties:
175       Handle:
176         Ref: KeystonePasswordHandle
177       Timeout: 90
178     Type: AWS::CloudFormation::WaitCondition
179   KeystonePasswordHandle:
180     Type: AWS::CloudFormation::WaitConditionHandle
181   RabbitMQPassword:
182     DependsOn: notcompute
183     Properties:
184       Handle:
185         Ref: RabbitMQPasswordHandle
186       Timeout: 60
187     Type: AWS::CloudFormation::WaitCondition
188   RabbitMQPasswordHandle:
189     Type: AWS::CloudFormation::WaitConditionHandle
190   User:
191     Properties:
192       Policies:
193       - Ref: AccessPolicy
194     Type: AWS::IAM::User
195   notcompute:
196     Metadata:
197       OpenStack::ImageBuilder::Elements:
198       - rabbitmq-server
199       - mysql-migration
200       - nova-api
201       - keystone
202       - heat-api
203       - heat-engine
204       - glance
205       OpenStack::Role: stateful
206       admin-password:
207         Ref: ServicePassword
208       admin-token:
209         Ref: AdminToken
210       glance:
211         db:
212           Ref: GlanceDSN
213       heat:
214         access_key_id:
215           Ref: ApiKey
216         refresh:
217         - resource: MySQL
218         secret_key:
219           Fn::GetAtt:
220           - ApiKey
221           - SecretAccessKey
222         stack:
223           name:
224             Ref: AWS::StackName
225           region:
226             Ref: AWS::Region
227       interfaces:
228         control:
229           Ref: NovaInterfaces
230       keystone:
231         host:
232           Ref: KeystoneHost
233       mysql:
234         create-users:
235         - database: keystone
236           userhandle:
237             Ref: KeystonePasswordHandle
238           username:
239             Ref: KeystoneUser
240         - database: heat
241           userhandle:
242             Ref: HeatPasswordHandle
243           username:
244             Ref: HeatUser
245         - database: glance
246           userhandle:
247             Ref: GlancePasswordHandle
248           username:
249             Ref: GlanceUser
250       mysql-migration:
251         bootstrap_host:
252           Ref: BootstrapHost
253         slave_password:
254           Ref: BootstrapSlavePassword
255         slave_user:
256           Ref: BootstrapSlaveUser
257         users:
258           dump:
259             password:
260               Ref: BootstrapDumpPassword
261             username: dump
262           root:
263             password:
264               Ref: BootstrapRootPassword
265             username: root
266       nova:
267         db:
268           Ref: NovaDSN
269       quantum:
270         host:
271           Ref: QuantumHost
272       rabbit:
273         host:
274           Ref: RabbitHost
275         password:
276           Ref: RabbitPassword
277       rabbitmq:
278         password_handle:
279           Ref: RabbitMQPasswordHandle
280       service-password:
281         Ref: ServicePassword
282       swift:
283         store_key: ''
284         store_user: ''
285     Properties:
286       ImageId:
287         Ref: notcomputeImage
288       InstanceType:
289         Ref: InstanceType
290       KeyName:
291         Ref: KeyName
292     Type: AWS::EC2::Instance