Load local IP using separate post-boot Metadata.
[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   InstanceType:
6     Default: baremetal
7     Description: Flavor to request when deploying.
8     Type: String
9   KeyName:
10     Default: default
11     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
12     Type: String
13   NovaComputeDriver:
14     Default: libvirt.LibvirtDriver
15     Type: String
16   NovaComputeLibvirtType:
17     Default: ''
18     Type: String
19   NovaImage:
20     Type: String
21     Default: overcloud-compute
22   NovaInterfaces:
23     Default: eth0
24     Type: String
25   PowerUserName:
26     Default: stack
27     Description: What username to ssh to the virtual power host with.
28     Type: String
29   notcomputeImage:
30     Type: String
31     Default: overcloud-control
32 Resources:
33   AccessPolicy:
34     Properties:
35       AllowedResources:
36       - notcompute
37       - notcomputeConfig
38     Type: OS::Heat::AccessPolicy
39   ComputeAccessPolicy:
40     Properties:
41       AllowedResources:
42       - NovaCompute0
43     Type: OS::Heat::AccessPolicy
44   Key:
45     Properties:
46       UserName:
47         Ref: User
48     Type: AWS::IAM::AccessKey
49   ComputeKey:
50     Properties:
51       UserName:
52         Ref: ComputeUser
53     Type: AWS::IAM::AccessKey
54   ComputeUser:
55     Properties:
56       Policies:
57       - Ref: ComputeAccessPolicy
58     Type: AWS::IAM::User
59   NovaCompute0:
60     Type: FileInclude
61     Path: nova-compute-instance.yaml
62     SubKey: Resources.NovaCompute0
63     Parameters:
64         NovaApiHost: {"Fn::GetAtt": [notcompute, PrivateIp]}
65         KeystoneHost: {"Fn::GetAtt": [notcompute, PrivateIp]}
66         RabbitHost: {"Fn::GetAtt": [notcompute, PrivateIp]}
67         NeutronHost: {"Fn::GetAtt": [notcompute, PrivateIp]}
68         GlanceHost: {"Fn::GetAtt": [notcompute, PrivateIp]}
69         NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {"Fn::GetAtt": [notcompute, PrivateIp]}, '/nova']]}
70         NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {"Fn::GetAtt": [notcompute, PrivateIp]}, '/neutron']]}
71         NeutronNetworkType: "gre"
72         NeutronEnableTunnelling: "True"
73         NeutronNetworkVLANRanges: ""
74         NeutronBridgeMappings: ""
75         RabbitPassword: "guest"
76         ServicePassword: "unset"
77   User:
78     Properties:
79       Policies:
80       - Ref: AccessPolicy
81     Type: AWS::IAM::User
82   notcomputeConfig:
83     Type: AWS::AutoScaling::LaunchConfiguration
84     Properties:
85       ImageId: '0'
86       InstanceType: '0'
87     Metadata:
88       OpenStack::Heat::Stack: {}
89       Openstack::ImageBuilder::Elements:
90       - boot-stack
91       - heat-cfntools
92       - heat-localip
93       - neutron-network-node
94       admin-password: unset
95       admin-token: unset
96       cinder:
97         db: mysql://cinder:unset@localhost/cinder
98         volume_size_mb: '5000'
99       controller-address:
100         Fn::GetAtt:
101           - notcompute
102           - PrivateIp
103       db-password: unset
104       glance:
105         db: mysql://glance:unset@localhost/glance
106         host:
107           Fn::GetAtt:
108             - notcompute
109             - PrivateIp
110       os-collect-config:
111         cfn:
112           access_key_id:
113             Ref: Key
114           path: notcomputeConfig.Metadata
115           secret_access_key:
116             Fn::GetAtt:
117             - Key
118             - SecretAccessKey
119           stack_name:
120             Ref: AWS::StackName
121       heat:
122         admin_password: unset
123         admin_tenant_name: service
124         admin_user: heat
125         auth_encryption_key: unset___________
126         db: mysql://heat:unset@localhost/heat
127         heat_watch_server_url:
128           Fn::Join:
129             - ''
130             - - 'http://'
131               - Fn::GetAtt:
132                   - notcompute
133                   - PrivateIp
134               - ':8003'
135         metadata_server_url:
136           Fn::Join:
137             - ''
138             - - 'http://'
139               - Fn::GetAtt:
140                   - notcompute
141                   - PrivateIp
142               - ':8000'
143         waitcondition_server_url:
144           Fn::Join:
145             - ''
146             - - 'http://'
147               - Fn::GetAtt:
148                   - notcompute
149                   - PrivateIp
150               - ':8000/v1/waitcondition'
151       interfaces:
152         control: eth0
153       keystone:
154         db: mysql://keystone:unset@localhost/keystone
155         host:
156           Fn::GetAtt:
157             - notcompute
158             - PrivateIp
159       nova:
160         compute_driver: libvirt.LibvirtDriver
161         db: mysql://nova:unset@localhost/nova
162         host:
163           Fn::GetAtt:
164             - notcompute
165             - PrivateIp
166         metadata-proxy: true
167       neutron:
168         host:
169           Fn::GetAtt:
170             - notcompute
171             - PrivateIp
172         metadata_proxy_shared_secret: unset
173         ovs:
174           enable_tunneling: 'True'
175           local_ip:
176             Fn::GetAtt:
177               - notcompute
178               - PrivateIp
179           public_interface: eth0
180           physical_bridge: br-ex
181           tenant_network_type: gre
182         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
183       rabbit:
184         host:
185           Fn::GetAtt:
186             - notcompute
187             - PrivateIp
188         password: guest
189       service-password: unset
190   notcompute:
191     Type: AWS::EC2::Instance
192     Properties:
193       ImageId:
194         Ref: notcomputeImage
195       InstanceType:
196         Ref: InstanceType
197       KeyName:
198         Ref: KeyName
199     Metadata:
200       os-collect-config:
201         cfn:
202           access_key_id:
203             Ref: Key
204           path: notcomputeConfig.Metadata
205           secret_access_key:
206             Fn::GetAtt:
207             - Key
208             - SecretAccessKey
209           stack_name:
210             Ref: AWS::StackName