Adding NTP to undercloud template
[apex-tripleo-heat-templates.git] / undercloud-source.yaml
1 Description: All-in-one baremetal OpenStack and all dependencies.
2 HeatTemplateFormatVersion: '2012-12-12'
3 Parameters:
4   AdminPassword:
5     Default: unset
6     Description: The password for the keystone admin account, used for monitoring, querying neutron etc.
7     Type: String
8     NoEcho: true
9   AdminToken:
10     Default: unset
11     Description: The keystone auth secret.
12     Type: String
13     NoEcho: true
14   BaremetalArch:
15     Default: i386
16     Description: The architecture to use in Nova-BM - i386 or amd64.
17     Type: String
18   Flavor:
19     Default: baremetal
20     Description: Flavor to request when deploying.
21     Type: String
22   GlancePassword:
23     Default: unset
24     Description: The password for the glance service account, used by the glance services.
25     Type: String
26     NoEcho: true
27   GlanceNotifierStrategy:
28     Description: Strategy to use for Glance notification queue
29     Type: String
30     Default: noop
31   GlanceLogFile:
32     Description: The filepath of the file to use for logging messages from Glance.
33     Type: String
34     Default: ''
35   KeyName:
36     Default: default
37     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
38     Type: String
39   HeatPassword:
40     Default: unset
41     Description: The password for the Heat service account, used by the Heat services.
42     Type: String
43     NoEcho: true
44   ImageUpdatePolicy:
45     Default: REPLACE
46     Description: What policy to use when reconstructing instances. REBUILD for rebuilds,
47       REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
48     Type: String
49   undercloudImage:
50     Default: undercloud
51     Type: String
52   NeutronPassword:
53     Default: unset
54     Description: The password for the neutron service account, used by neutron agents.
55     Type: String
56     NoEcho: true
57   NovaPassword:
58     Default: unset
59     Description: The password for the nova service account, used by nova-api.
60     Type: String
61     NoEcho: true
62   NtpServer:
63     Type: String
64     Default: ''
65   RabbitUserName:
66     Default: guest
67     Description: The username for RabbitMQ
68     Type: String
69   RabbitPassword:
70     Default: guest
71     Description: The password for RabbitMQ
72     Type: String
73     NoEcho: true
74   RabbitCookieSalt:
75     Type: String
76     Default: unset
77     Description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
78   HeatStackDomainAdminPassword:
79     Description: Password for heat_domain_admin user.
80     Type: String
81     Default: ''
82     NoEcho: true
83 Resources:
84   RabbitCookie:
85     Type: OS::Heat::RandomString
86     Properties:
87       length: 20
88       salt:
89         Ref: RabbitCookieSalt
90   AccessPolicy:
91     Properties:
92       AllowedResources:
93       - undercloudConfig
94     Type: OS::Heat::AccessPolicy
95   notCompute0Key:
96     Properties:
97       UserName:
98         Ref: User
99     Type: AWS::IAM::AccessKey
100   notCompute0CompletionCondition:
101     Type: AWS::CloudFormation::WaitCondition
102     DependsOn: undercloud
103     Properties:
104       Handle: {Ref: notCompute0CompletionHandle}
105       Count: '1'
106       Timeout: '1800'
107   notCompute0CompletionHandle:
108     Type: AWS::CloudFormation::WaitConditionHandle
109   User:
110     Properties:
111       Policies:
112       - Ref: AccessPolicy
113     Type: AWS::IAM::User
114   undercloudConfig:
115     Type: AWS::AutoScaling::LaunchConfiguration
116     Properties:
117       ImageId: '0'
118       InstanceType: foo
119     Metadata:
120       OpenStack::Role: undercloudConfig
121       OpenStack::Heat::Stack: {}
122       OpenStack::ImageBuilder::Elements: [ boot-stack, heat-cfntools, neutron-network-node ]
123       admin-password:
124         Ref: AdminPassword
125       admin-token: 
126         Ref: AdminToken
127       controller-address:
128         Fn::Select:
129           - 0
130           - Fn::Select:
131             - "ctlplane"
132             - Fn::GetAtt:
133               - undercloud
134               - networks
135       cinder:
136         db: mysql://cinder:unset@localhost/cinder
137         volume_size_mb: '5000'
138       completion-handle:
139         Ref: notCompute0CompletionHandle
140       db-password: unset
141       glance:
142         backend: file
143         db: mysql://glance:unset@localhost/glance
144         host: 127.0.0.1
145         service-password:
146           Ref: GlancePassword
147         notifier-strategy:
148           Ref: GlanceNotifierStrategy
149         log-file:
150           Ref: GlanceLogFile
151       heat:
152         admin_password:
153           Ref: HeatPassword
154         admin_tenant_name: service
155         admin_user: heat
156         auth_encryption_key: unset___________
157         db: mysql://heat:unset@localhost/heat
158         stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
159         watch_server_url:
160           Fn::Join:
161             - ''
162             - - http://
163               - Fn::Select:
164                   - 0
165                   - Fn::Select:
166                     - "ctlplane"
167                     - Fn::GetAtt:
168                       - undercloud
169                       - networks
170               - ":8003"
171         metadata_server_url:
172           Fn::Join:
173             - ''
174             - - http://
175               - Fn::Select:
176                   - 0
177                   - Fn::Select:
178                     - "ctlplane"
179                     - Fn::GetAtt:
180                       - undercloud
181                       - networks
182               - ":8000"
183         waitcondition_server_url:
184           Fn::Join:
185             - ''
186             - - http://
187               - Fn::Select:
188                   - 0
189                   - Fn::Select:
190                     - "ctlplane"
191                     - Fn::GetAtt:
192                       - undercloud
193                       - networks
194               - ":8000/v1/waitcondition"
195       os-collect-config:
196         cfn:
197           access_key_id:
198             Ref: notCompute0Key
199           path: undercloudConfig.Metadata
200           secret_access_key:
201             Fn::GetAtt:
202             - notCompute0Key
203             - SecretAccessKey
204           stack_name:
205             Ref: AWS::StackName
206       keystone:
207         db: mysql://keystone:unset@localhost/keystone
208         host: 127.0.0.1
209       neutron:
210         host: 127.0.0.1
211         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
212         ovs:
213           public_interface:
214             Ref: NeutronPublicInterface
215           physical_bridge: br-ctlplane
216           physical_network: ctlplane
217           network_vlan_ranges: ctlplane
218           bridge_mappings: ctlplane:br-ctlplane
219           tenant_network_type: vlan
220           enable_tunneling: 'False'
221         service-password:
222           Ref: NeutronPassword
223       ntp:
224         servers:
225             - {server: {Ref: NtpServer}, fudge: "stratum 0"}
226       rabbit:
227         host: 127.0.0.1
228         username:
229           Ref: RabbitUserName
230         password:
231           Ref: RabbitPassword
232         cookie:
233           Fn::GetAtt:
234           - RabbitCookie
235           - value
236   undercloud:
237     Type: OS::Nova::Server
238     Properties:
239       image:
240         Ref: undercloudImage
241       flavor:
242         Ref: Flavor
243       key_name:
244         Ref: KeyName
245       image_update_policy:
246         Ref: ImageUpdatePolicy
247     Metadata:
248       os-collect-config:
249         cfn:
250           access_key_id:
251             Ref: notCompute0Key
252           path: undercloudConfig.Metadata
253           secret_access_key:
254             Fn::GetAtt:
255             - notCompute0Key
256             - SecretAccessKey
257           stack_name:
258             Ref: AWS::StackName