Merge "Add rabbit.cookie attribute"
[apex-tripleo-heat-templates.git] / notcompute.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   notcomputeImage:
86     Type: String
87 Resources:
88   AccessPolicy:
89     Properties:
90       AllowedResources:
91       - notCompute0
92     Type: OS::Heat::AccessPolicy
93   notCompute0Key:
94     Properties:
95       UserName:
96         Ref: User
97     Type: AWS::IAM::AccessKey
98   User:
99     Properties:
100       Policies:
101       - Ref: AccessPolicy
102     Type: AWS::IAM::User
103   notCompute0:
104     Metadata:
105       OpenStack::ImageBuilder::Elements:
106       - nova-api
107       - keystone
108       - heat-api
109       - heat-engine
110       - glance
111       - mysql-migration
112       - rabbitmq-server
113       admin-password:
114         Ref: ServicePassword
115       admin-token:
116         Ref: AdminToken
117       mysql:
118         create-users:
119           - database: keystone
120             username: keystone
121             password: {Ref: KeystoneDBPassword}
122           - database: heat
123             username: heat
124             password: {Ref: HeatDBPassword}
125           - database: glance
126             username: glance
127             password: {Ref: GlanceDBPassword}
128           - database: nova
129             username: nova
130             password: {Ref: NovaDBPassword}
131           - database: neutron
132             username: neutron
133             password: {Ref: NeutronDBPassword}
134       glance:
135         db:
136           Fn::Join:
137             - ''
138             - - 'mysql://glance:'
139               - {Ref: GlanceDBPassword}
140               - '@127.0.0.1/glance'
141           notifier-strategy:
142             Ref: GlanceNotifierStrategy
143           log-file:
144             Ref: GlanceLogFile
145       heat:
146         db:
147           Fn::Join:
148             - ''
149             - - 'mysql://heat:'
150               - {Ref: HeatDBPassword}
151               - '@127.0.0.1/heat'
152         access_key_id:
153           Ref: notCompute0Key
154         refresh:
155         - resource: notCompute0
156         secret_key:
157           Fn::GetAtt:
158           - notCompute0Key
159           - SecretAccessKey
160         stack:
161           name:
162             Ref: AWS::StackName
163           region:
164             Ref: AWS::Region
165         auth_encryption_key: unset
166       interfaces:
167         control:
168           Ref: NovaInterfaces
169       keystone:
170         host:
171           '127.0.0.1'
172         db:
173           Fn::Join:
174             - ''
175             - - 'mysql://keystone:'
176               - {Ref: KeystoneDBPassword}
177               - '@127.0.0.1/keystone'
178       nova:
179         db:
180           Fn::Join:
181             - ''
182             - - 'mysql://nova:'
183               - {Ref: NovaDBPassword}
184               - '@127.0.0.1/nova'
185       neutron:
186         host:
187           '127.0.0.1'
188         ovs_db:
189           Fn::Join:
190             - ''
191             - - 'mysql://neutron:'
192               - {Ref: NeutronDBPassword}
193               - '@127.0.0.1/ovs_neutron'
194       rabbit:
195         host:
196           '127.0.0.1'
197         username:
198           Ref: RabbitUserName
199         password:
200           Ref: RabbitPassword
201         users:
202           username:
203             Ref: RabbitUserName
204           password:
205             Ref: RabbitPassword
206         cookie:
207           Fn::GetAtt:
208           - RabbitCookie
209           - value
210       service-password:
211         Ref: ServicePassword
212     Properties:
213       ImageId:
214         Ref: notcomputeImage
215       InstanceType:
216         Ref: InstanceType
217       KeyName:
218         Ref: KeyName
219     Type: AWS::EC2::Instance