Add parameters for setting up keystone keys/certs in undercloud
[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       OpenStack::ImageBuilder::Elements:
111       - nova-api
112       - keystone
113       - heat-api
114       - heat-engine
115       - glance
116       - mysql-migration
117       - rabbitmq-server
118       admin-password:
119         Ref: ServicePassword
120       admin-token:
121         Ref: AdminToken
122       mysql:
123         create-users:
124           - database: keystone
125             username: keystone
126             password: {Ref: KeystoneDBPassword}
127           - database: heat
128             username: heat
129             password: {Ref: HeatDBPassword}
130           - database: glance
131             username: glance
132             password: {Ref: GlanceDBPassword}
133           - database: nova
134             username: nova
135             password: {Ref: NovaDBPassword}
136           - database: neutron
137             username: neutron
138             password: {Ref: NeutronDBPassword}
139       glance:
140         db:
141           Fn::Join:
142             - ''
143             - - 'mysql://glance:'
144               - {Ref: GlanceDBPassword}
145               - '@127.0.0.1/glance'
146           notifier-strategy:
147             Ref: GlanceNotifierStrategy
148           log-file:
149             Ref: GlanceLogFile
150       heat:
151         db:
152           Fn::Join:
153             - ''
154             - - 'mysql://heat:'
155               - {Ref: HeatDBPassword}
156               - '@127.0.0.1/heat'
157         access_key_id:
158           Ref: controller0Key
159         refresh:
160         - resource: controller0
161         secret_key:
162           Fn::GetAtt:
163           - controller0Key
164           - SecretAccessKey
165         stack:
166           name:
167             Ref: AWS::StackName
168           region:
169             Ref: AWS::Region
170         auth_encryption_key: unset
171         stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
172       interfaces:
173         control:
174           Ref: NovaInterfaces
175       keystone:
176         host:
177           '127.0.0.1'
178         db:
179           Fn::Join:
180             - ''
181             - - 'mysql://keystone:'
182               - {Ref: KeystoneDBPassword}
183               - '@127.0.0.1/keystone'
184       nova:
185         db:
186           Fn::Join:
187             - ''
188             - - 'mysql://nova:'
189               - {Ref: NovaDBPassword}
190               - '@127.0.0.1/nova'
191       neutron:
192         host:
193           '127.0.0.1'
194         ovs_db:
195           Fn::Join:
196             - ''
197             - - 'mysql://neutron:'
198               - {Ref: NeutronDBPassword}
199               - '@127.0.0.1/ovs_neutron'
200       rabbit:
201         host:
202           '127.0.0.1'
203         username:
204           Ref: RabbitUserName
205         password:
206           Ref: RabbitPassword
207         users:
208           username:
209             Ref: RabbitUserName
210           password:
211             Ref: RabbitPassword
212         cookie:
213           Fn::GetAtt:
214           - RabbitCookie
215           - value
216       service-password:
217         Ref: ServicePassword
218     Properties:
219       ImageId:
220         Ref: controllerImage
221       InstanceType:
222         Ref: InstanceType
223       KeyName:
224         Ref: KeyName
225     Type: AWS::EC2::Instance