91bdfa2e451d4491689c25922f6ebf2ac4813a6e
[apex-tripleo-heat-templates.git] / notcompute.yaml
1 Description: HEAT Template - Dedicated MySQL server,HEAT Template - Dedicated MySQL
2   server,HEAT Template - Nova API
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   BootstrapDumpPassword:
37     Default: ''
38     Description: Password to use for mysqldump from Bootstrap Host
39     Type: String
40   BootstrapHost:
41     Default: ''
42     Description: Load mysqldump from this Host
43     Type: String
44   BootstrapRootPassword:
45     Default: ''
46     Description: Root password for localhost access after bootstrap
47     Type: String
48   BootstrapSlavePassword:
49     Default: ''
50     Description: Password to use with BootstrapSlaveUser
51     Type: String
52   BootstrapSlaveUser:
53     Default: ''
54     Description: User to use for replication from bootstrap host
55     Type: String
56   GlanceUser:
57     Default: heat
58     Description: Glance database username.
59     Type: String
60   HeatUser:
61     Default: heat
62     Description: Heat database username.
63     Type: String
64   InstanceType:
65     Default: bm.small
66     Description: Use this flavor
67     Type: String
68   KeyName:
69     Default: default
70     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
71     Type: String
72   KeystoneHost:
73     Type: String
74   KeystoneUser:
75     Default: keystone
76     Description: Keystone database username.
77     Type: String
78   NovaAPiSize:
79     Default: 1
80     Type: Integer
81   NovaDSN:
82     Description: DSN for connecting to nova database
83     Type: String
84   NovaInterfaces:
85     Default: eth0
86     Type: String
87   RabbitHost:
88     Type: String
89   RabbitPassword:
90     Type: String
91   ServicePassword:
92     Description: admin_password for setting up auth in nova.
93     Type: String
94   TemplateURL:
95     Default: https://raw.github.com/openstack-ops/templates/master/
96     Type: String
97   notcomputeImage:
98     Type: String
99 Resources:
100   AccessPolicy:
101     Properties:
102       AllowedResources:
103       - notcompute
104     Type: OS::Heat::AccessPolicy
105   ApiAccessPolicy:
106     Properties:
107       AllowedResources:
108       - notcompute
109     Type: OS::Heat::AccessPolicy
110   ApiKey:
111     Properties:
112       UserName:
113         Ref: ApiUser
114     Type: AWS::IAM::AccessKey
115   ApiUser:
116     Properties:
117       Policies:
118       - Ref: ApiAccessPolicy
119     Type: AWS::IAM::User
120   GlancePassword:
121     DependsOn: notcompute
122     Properties:
123       Handle:
124         Ref: GlancePasswordHandle
125       Timeout: 90
126     Type: AWS::CloudFormation::WaitCondition
127   GlancePasswordHandle:
128     Type: AWS::CloudFormation::WaitConditionHandle
129   HeatPassword:
130     DependsOn: notcompute
131     Properties:
132       Handle:
133         Ref: HeatPasswordHandle
134       Timeout: 90
135     Type: AWS::CloudFormation::WaitCondition
136   HeatPasswordHandle:
137     Type: AWS::CloudFormation::WaitConditionHandle
138   Key:
139     Properties:
140       UserName:
141         Ref: User
142     Type: AWS::IAM::AccessKey
143   KeystonePassword:
144     DependsOn: notcompute
145     Properties:
146       Handle:
147         Ref: KeystonePasswordHandle
148       Timeout: 90
149     Type: AWS::CloudFormation::WaitCondition
150   KeystonePasswordHandle:
151     Type: AWS::CloudFormation::WaitConditionHandle
152   RabbitMQPassword:
153     DependsOn: notcompute
154     Properties:
155       Handle:
156         Ref: RabbitMQPasswordHandle
157       Timeout: 60
158     Type: AWS::CloudFormation::WaitCondition
159   RabbitMQPasswordHandle:
160     Type: AWS::CloudFormation::WaitConditionHandle
161   User:
162     Properties:
163       Policies:
164       - Ref: AccessPolicy
165     Type: AWS::IAM::User
166   notcompute:
167     Metadata:
168       OpenStack::ImageBuilder::Elements:
169       - rabbitmq-server
170       - mysql-migration
171       - nova-api
172       OpenStack::Role: stateful
173       admin-password:
174         Ref: ServicePassword
175       heat:
176         access_key_id:
177           Ref: ApiKey
178         refresh:
179         - resource: MySQL
180         secret_key:
181           Fn::GetAtt:
182           - ApiKey
183           - SecretAccessKey
184         stack:
185           name:
186             Ref: AWS::StackName
187           region:
188             Ref: AWS::Region
189       interfaces:
190         control:
191           Ref: NovaInterfaces
192       keystone:
193         host:
194           Ref: KeystoneHost
195       mysql:
196         create-users:
197         - database: keystone
198           userhandle:
199             Ref: KeystonePasswordHandle
200           username:
201             Ref: KeystoneUser
202         - database: heat
203           userhandle:
204             Ref: HeatPasswordHandle
205           username:
206             Ref: HeatUser
207         - database: glance
208           userhandle:
209             Ref: GlancePasswordHandle
210           username:
211             Ref: GlanceUser
212       mysql-migration:
213         bootstrap_host:
214           Ref: BootstrapHost
215         slave_password:
216           Ref: BootstrapSlavePassword
217         slave_user:
218           Ref: BootstrapSlaveUser
219         users:
220           dump:
221             password:
222               Ref: BootstrapDumpPassword
223             username: dump
224           root:
225             password:
226               Ref: BootstrapRootPassword
227             username: root
228       nova:
229         db:
230           Ref: NovaDSN
231       quantum:
232         host:
233           Ref: QuantumHost
234       rabbit:
235         host:
236           Ref: RabbitHost
237         password:
238           Ref: RabbitPassword
239       rabbitmq:
240         password_handle:
241           Ref: RabbitMQPasswordHandle
242       service-password:
243         Ref: ServicePassword
244       swift:
245         store_key: ''
246         store_user: ''
247     Properties:
248       ImageId:
249         Ref: notcomputeImage
250       InstanceType:
251         Ref: InstanceType
252       KeyName:
253         Ref: KeyName
254     Type: AWS::EC2::Instance