f7a8633ec9541243ca4dc64a89d30b7e39818f1d
[apex-tripleo-heat-templates.git] / controller.yaml
1 Description: Nova API,Keystone,Heat Engine and API,Glance,Neutron,Dedicated MySQL
2   server,Dedicated RabbitMQ Server
3 HeatTemplateFormatVersion: '2012-12-12'
4 Parameters:
5   AdminToken:
6     Type: String
7   BootstrapDumpPassword:
8     Default: ''
9     Description: Password to use for mysqldump from Bootstrap Host
10     Type: String
11     NoEcho: true
12   BootstrapHost:
13     Default: ''
14     Description: Load mysqldump from this Host
15     Type: String
16   BootstrapRootPassword:
17     Default: ''
18     Description: Root password for localhost access after bootstrap
19     Type: String
20     NoEcho: true
21   BootstrapSlavePassword:
22     Default: ''
23     Description: Password to use with BootstrapSlaveUser
24     Type: String
25     NoEcho: true
26   BootstrapSlaveUser:
27     Default: ''
28     Description: User to use for replication from bootstrap host
29     Type: String
30   GlanceDBPassword:
31     Description: Password for connecting to glance database
32     Type: String
33     NoEcho: true
34   GlanceNotifierStrategy:
35     Description: Strategy to use for Glance notification queue
36     Type: String
37     Default: noop
38   GlanceLogFile:
39     Description: The filepath of the file to use for logging messages from Glance.
40     Type: String
41     Default: ''
42   HeatDBPassword:
43     Description: Password for accessing Heat database.
44     Type: String
45     NoEcho: true
46   InstanceType:
47     Default: baremetal
48     Description: Use this flavor
49     Type: String
50   KeyName:
51     Default: default
52     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
53     Type: String
54   KeystoneDBPassword:
55     Description: Password for connecting to keystone
56     Type: String
57     NoEcho: true
58   NovaDBPassword:
59     Description: Password for connecting to nova database
60     Type: String
61     NoEcho: true
62   NovaInterfaces:
63     Default: eth0
64     Type: String
65   NeutronDBPassword:
66     Description: Password for connecting to neutron database
67     Type: String
68     NoEcho: true
69   NeutronInterfaces:
70     Default: eth0
71     Type: String
72   RabbitMQPassword:
73     Description: Password for RabbitMQ
74     Type: String
75     NoEcho: true
76   RabbitUserName:
77     Type: String
78   RabbitPassword:
79     Type: String
80     NoEcho: true
81   ServicePassword:
82     Description: admin_password for setting up auth in nova.
83     Type: String
84     NoEcho: true
85   controllerImage:
86     Type: String
87   HeatStackDomainAdminPassword:
88     Description: Password for heat_domain_admin user.
89     Type: String
90     Default: ''
91     NoEcho: true
92 Resources:
93   AccessPolicy:
94     Properties:
95       AllowedResources:
96       - controller0
97     Type: OS::Heat::AccessPolicy
98   controller0Key:
99     Properties:
100       UserName:
101         Ref: User
102     Type: AWS::IAM::AccessKey
103   User:
104     Properties:
105       Policies:
106       - Ref: AccessPolicy
107     Type: AWS::IAM::User
108   controller0:
109     Metadata:
110       admin-password:
111         Ref: ServicePassword
112       admin-token:
113         Ref: AdminToken
114       mysql:
115         create-users:
116           - database: keystone
117             username: keystone
118             password: {Ref: KeystoneDBPassword}
119           - database: heat
120             username: heat
121             password: {Ref: HeatDBPassword}
122           - database: glance
123             username: glance
124             password: {Ref: GlanceDBPassword}
125           - database: nova
126             username: nova
127             password: {Ref: NovaDBPassword}
128           - database: neutron
129             username: neutron
130             password: {Ref: NeutronDBPassword}
131       glance:
132         db:
133           Fn::Join:
134             - ''
135             - - 'mysql://glance:'
136               - {Ref: GlanceDBPassword}
137               - '@127.0.0.1/glance'
138           notifier-strategy:
139             Ref: GlanceNotifierStrategy
140           log-file:
141             Ref: GlanceLogFile
142       heat:
143         db:
144           Fn::Join:
145             - ''
146             - - 'mysql://heat:'
147               - {Ref: HeatDBPassword}
148               - '@127.0.0.1/heat'
149         access_key_id:
150           Ref: controller0Key
151         refresh:
152         - resource: controller0
153         secret_key:
154           Fn::GetAtt:
155           - controller0Key
156           - SecretAccessKey
157         stack:
158           name:
159             Ref: AWS::StackName
160           region:
161             Ref: AWS::Region
162         auth_encryption_key: unset
163         stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
164       interfaces:
165         control:
166           Ref: NovaInterfaces
167       keystone:
168         host:
169           '127.0.0.1'
170         db:
171           Fn::Join:
172             - ''
173             - - 'mysql://keystone:'
174               - {Ref: KeystoneDBPassword}
175               - '@127.0.0.1/keystone'
176       nova:
177         db:
178           Fn::Join:
179             - ''
180             - - 'mysql://nova:'
181               - {Ref: NovaDBPassword}
182               - '@127.0.0.1/nova'
183       neutron:
184         host:
185           '127.0.0.1'
186         ovs_db:
187           Fn::Join:
188             - ''
189             - - 'mysql://neutron:'
190               - {Ref: NeutronDBPassword}
191               - '@127.0.0.1/ovs_neutron'
192       rabbit:
193         host:
194           '127.0.0.1'
195         username:
196           Ref: RabbitUserName
197         password:
198           Ref: RabbitPassword
199         users:
200           username:
201             Ref: RabbitUserName
202           password:
203             Ref: RabbitPassword
204         cookie:
205           Fn::GetAtt:
206           - RabbitCookie
207           - value
208       service-password:
209         Ref: ServicePassword
210     Properties:
211       ImageId:
212         Ref: controllerImage
213       InstanceType:
214         Ref: InstanceType
215       KeyName:
216         Ref: KeyName
217     Type: AWS::EC2::Instance