Permit setting overcloud image update policies.
[apex-tripleo-heat-templates.git] / overcloud-source.yaml
1 Description: Nova API,Keystone,Heat Engine and API,Glance,Neutron,Dedicated MySQL
2   server,Dedicated RabbitMQ Server,Group of Nova Computes
3 HeatTemplateFormatVersion: '2012-12-12'
4 Parameters:
5   AdminPassword:
6     Default: unset
7     Description: The password for the keystone admin account, used for monitoring, querying neutron etc.
8     Type: String
9     NoEcho: true
10   AdminToken:
11     Default: unset
12     Description: The keystone auth secret.
13     Type: String
14     NoEcho: true
15   CinderPassword:
16     Default: unset
17     Description: The password for the cinder service account, used by cinder-api.
18     Type: String
19     NoEcho: true
20   Flavor:
21     Default: baremetal
22     Description: Flavor to request when deploying.
23     Type: String
24   GlancePassword:
25     Default: unset
26     Description: The password for the glance service account, used by the glance services.
27     Type: String
28     NoEcho: true
29   HeatPassword:
30     Default: unset
31     Description: The password for the Heat service account, used by the Heat services.
32     Type: String
33     NoEcho: true
34   ImageUpdatePolicy:
35     Default: 'REPLACE'
36     Description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
37     Type: String
38   KeyName:
39     Default: default
40     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
41     Type: String
42   NeutronPassword:
43     Default: unset
44     Description: The password for the neutron service account, used by neutron agents.
45     Type: String
46     NoEcho: true
47   NovaComputeDriver:
48     Default: libvirt.LibvirtDriver
49     Type: String
50   NovaComputeLibvirtType:
51     Default: ''
52     Type: String
53   NovaImage:
54     Type: String
55     Default: overcloud-compute
56   NovaPassword:
57     Default: unset
58     Description: The password for the nova service account, used by nova-api.
59     Type: String
60     NoEcho: true
61   PowerUserName:
62     Default: stack
63     Description: What username to ssh to the virtual power host with.
64     Type: String
65   NeutronPublicInterface:
66     Default: eth0
67     Description: What interface to bridge onto br-ex for network nodes.
68     Type: String
69   NeutronPublicInterfaceDefaultRoute:
70     Default: ''
71     Description: A custom default route for the NeutronPublicInterface.
72     Type: String
73   NeutronPublicInterfaceIP:
74     Default: ''
75     Description: A custom IP address to put onto the NeutronPublicInterface.
76     Type: String
77   NeutronPublicInterfaceRawDevice:
78     Default: ''
79     Description: If set, the public interface is a vlan with this device as the raw device.
80     Type: String
81   notcomputeImage:
82     Type: String
83     Default: overcloud-control
84 Resources:
85   AccessPolicy:
86     Properties:
87       AllowedResources:
88       - notcompute
89       - notcomputeConfig
90     Type: OS::Heat::AccessPolicy
91   ComputeAccessPolicy:
92     Properties:
93       AllowedResources:
94       - NovaCompute0
95       - NovaCompute0Config
96     Type: OS::Heat::AccessPolicy
97   Key:
98     Properties:
99       UserName:
100         Ref: User
101     Type: AWS::IAM::AccessKey
102   CompletionCondition:
103     Type: AWS::CloudFormation::WaitCondition
104     DependsOn: notcompute
105     Properties:
106       Handle: {Ref: CompletionHandle}
107       Count: '2'
108       Timeout: '1800'
109   CompletionHandle:
110     Type: AWS::CloudFormation::WaitConditionHandle
111   ComputeKey:
112     Properties:
113       UserName:
114         Ref: ComputeUser
115     Type: AWS::IAM::AccessKey
116   ComputeUser:
117     Properties:
118       Policies:
119       - Ref: ComputeAccessPolicy
120     Type: AWS::IAM::User
121   NovaCompute0Config:
122     Type: FileInclude
123     Path: nova-compute-instance.yaml
124     SubKey: Resources.NovaCompute0Config
125     Parameters:
126         NovaApiHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
127         KeystoneHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
128         RabbitHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
129         NeutronHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
130         GlanceHost: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ] }
131         NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ]}, '/nova']]}
132         NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [notcompute, networks]} ]} ]}, '/neutron']]}
133         NeutronNetworkType: "gre"
134         NeutronEnableTunnelling: "True"
135         NeutronNetworkVLANRanges: ""
136         NeutronBridgeMappings: ""
137         RabbitPassword: "guest"
138   NovaCompute0:
139     Type: FileInclude
140     Path: nova-compute-instance.yaml
141     SubKey: Resources.NovaCompute0
142   User:
143     Properties:
144       Policies:
145       - Ref: AccessPolicy
146     Type: AWS::IAM::User
147   notcomputeConfig:
148     Type: AWS::AutoScaling::LaunchConfiguration
149     Properties:
150       ImageId: '0'
151       InstanceType: '0'
152     Metadata:
153       OpenStack::Heat::Stack: {}
154       OpenStack::ImageBuilder::Elements:
155       - boot-stack
156       - heat-cfntools
157       - heat-localip
158       - neutron-network-node
159       admin-password:
160         Ref: AdminPassword
161       admin-token:
162         Ref: AdminToken
163       bootstack:
164         public_interface_ip:
165           Ref: NeutronPublicInterfaceIP
166       cinder:
167         db: mysql://cinder:unset@localhost/cinder
168         volume_size_mb: '5000'
169         service-password:
170           Ref: CinderPassword
171       completion-handle:
172         Ref: CompletionHandle
173       controller-address:
174         Fn::Select:
175          - 0
176          - Fn::Select:
177              - 'ctlplane'
178              - Fn::GetAtt:
179                - notcompute
180                - networks
181       db-password: unset
182       glance:
183         backend: swift
184         db: mysql://glance:unset@localhost/glance
185         host:
186           Fn::Select:
187            - 0
188            - Fn::Select:
189                - 'ctlplane'
190                - Fn::GetAtt:
191                  - notcompute
192                  - networks
193         service-password:
194           Ref: GlancePassword
195         swift-store-user: service:glance
196         swift-store-key:
197           Ref: GlancePassword
198       heat:
199         admin_password:
200           Ref: HeatPassword
201         admin_tenant_name: service
202         admin_user: heat
203         auth_encryption_key: unset___________
204         db: mysql://heat:unset@localhost/heat
205         watch_server_url:
206           Fn::Join:
207             - ''
208             - - 'http://'
209               - Fn::Select:
210                 - 0
211                 - Fn::Select:
212                   - 'ctlplane'
213                   - Fn::GetAtt:
214                     - notcompute
215                     - networks
216               - ':8003'
217         metadata_server_url:
218           Fn::Join:
219             - ''
220             - - 'http://'
221               - Fn::Select:
222                 - 0
223                 - Fn::Select:
224                   - 'ctlplane'
225                   - Fn::GetAtt:
226                     - notcompute
227                     - networks
228               - ':8000'
229         waitcondition_server_url:
230           Fn::Join:
231             - ''
232             - - 'http://'
233               - Fn::Select:
234                 - 0
235                 - Fn::Select:
236                   - 'ctlplane'
237                   - Fn::GetAtt:
238                     - notcompute
239                     - networks
240               - ':8000/v1/waitcondition'
241       keystone:
242         db: mysql://keystone:unset@localhost/keystone
243         host:
244           Fn::Select:
245             - 0
246             - Fn::Select:
247               - 'ctlplane'
248               - Fn::GetAtt:
249                 - notcompute
250                 - networks
251       neutron:
252         host:
253           Fn::Select:
254             - 0
255             - Fn::Select:
256               - ctlplane
257               - Fn::GetAtt:
258                 - notcompute
259                 - networks
260         metadata_proxy_shared_secret: unset
261         ovs:
262           enable_tunneling: 'True'
263           local_ip:
264             Fn::Select:
265               - 0
266               - Fn::Select:
267                 - ctlplane
268                 - Fn::GetAtt:
269                   - notcompute
270                   - networks
271           public_interface:
272             Ref: NeutronPublicInterface
273           public_interface_raw_device:
274             Ref: NeutronPublicInterfaceRawDevice
275           public_interface_route:
276             Ref: NeutronPublicInterfaceDefaultRoute
277           physical_bridge: br-ex
278           tenant_network_type: gre
279         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
280         service-password:
281           Ref: NeutronPassword
282       nova:
283         compute_driver: libvirt.LibvirtDriver
284         db: mysql://nova:unset@localhost/nova
285         default_floating_pool:
286           ext-net
287         host:
288           Fn::Select:
289             - 0
290             - Fn::Select:
291               - 'ctlplane'
292               - Fn::GetAtt:
293                 - notcompute
294                 - networks
295         metadata-proxy: true
296         service-password:
297           Ref: NovaPassword
298       os-collect-config:
299         cfn:
300           access_key_id:
301             Ref: Key
302           path: notcomputeConfig.Metadata
303           secret_access_key:
304             Fn::GetAtt:
305             - Key
306             - SecretAccessKey
307           stack_name:
308             Ref: AWS::StackName
309       rabbit:
310         host:
311           Fn::Select:
312             - 0
313             - Fn::Select:
314               - ctlplane
315               - Fn::GetAtt:
316                 - notcompute
317                 - networks
318         password: guest
319   notcompute:
320     Type: OS::Nova::Server
321     Properties:
322       image:
323         Ref: notcomputeImage
324       image_update_policy:
325         Ref: ImageUpdatePolicy
326       flavor:
327         Ref: Flavor
328       key_name:
329         Ref: KeyName
330     Metadata:
331       os-collect-config:
332         cfn:
333           access_key_id:
334             Ref: Key
335           path: notcomputeConfig.Metadata
336           secret_access_key:
337             Fn::GetAtt:
338             - Key
339             - SecretAccessKey
340           stack_name:
341             Ref: AWS::StackName
342 Outputs:
343   KeystoneURL:
344     Description: URL for the Overcloud Keystone service
345     Value:
346       Fn::Join:
347       - ''
348       - - http://
349         - Fn::Select:
350           - 0
351           - Fn::Select:
352             - ctlplane
353             - Fn::GetAtt:
354               - notcompute
355               - networks
356         - :5000/v2.0/