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