Migrate nova-compute-instance to split 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       - NovaCompute0Config
44     Type: OS::Heat::AccessPolicy
45   Key:
46     Properties:
47       UserName:
48         Ref: User
49     Type: AWS::IAM::AccessKey
50   ComputeKey:
51     Properties:
52       UserName:
53         Ref: ComputeUser
54     Type: AWS::IAM::AccessKey
55   ComputeUser:
56     Properties:
57       Policies:
58       - Ref: ComputeAccessPolicy
59     Type: AWS::IAM::User
60   NovaCompute0Config:
61     Type: FileInclude
62     Path: nova-compute-instance.yaml
63     SubKey: Resources.NovaCompute0Config
64     Parameters:
65         NovaApiHost: {"Fn::GetAtt": [notcompute, PrivateIp]}
66         KeystoneHost: {"Fn::GetAtt": [notcompute, PrivateIp]}
67         RabbitHost: {"Fn::GetAtt": [notcompute, PrivateIp]}
68         NeutronHost: {"Fn::GetAtt": [notcompute, PrivateIp]}
69         GlanceHost: {"Fn::GetAtt": [notcompute, PrivateIp]}
70         NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {"Fn::GetAtt": [notcompute, PrivateIp]}, '/nova']]}
71         NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {"Fn::GetAtt": [notcompute, PrivateIp]}, '/neutron']]}
72         NeutronNetworkType: "gre"
73         NeutronEnableTunnelling: "True"
74         NeutronNetworkVLANRanges: ""
75         NeutronBridgeMappings: ""
76         RabbitPassword: "guest"
77         ServicePassword: "unset"
78   NovaCompute0:
79     Type: FileInclude
80     Path: nova-compute-instance.yaml
81     SubKey: Resources.NovaCompute0
82   User:
83     Properties:
84       Policies:
85       - Ref: AccessPolicy
86     Type: AWS::IAM::User
87   notcomputeConfig:
88     Type: AWS::AutoScaling::LaunchConfiguration
89     Properties:
90       ImageId: '0'
91       InstanceType: '0'
92     Metadata:
93       OpenStack::Heat::Stack: {}
94       Openstack::ImageBuilder::Elements:
95       - boot-stack
96       - heat-cfntools
97       - heat-localip
98       - neutron-network-node
99       admin-password: unset
100       admin-token: unset
101       cinder:
102         db: mysql://cinder:unset@localhost/cinder
103         volume_size_mb: '5000'
104       controller-address:
105         Fn::GetAtt:
106           - notcompute
107           - PrivateIp
108       db-password: unset
109       glance:
110         db: mysql://glance:unset@localhost/glance
111         host:
112           Fn::GetAtt:
113             - notcompute
114             - PrivateIp
115       os-collect-config:
116         cfn:
117           access_key_id:
118             Ref: Key
119           path: notcomputeConfig.Metadata
120           secret_access_key:
121             Fn::GetAtt:
122             - Key
123             - SecretAccessKey
124           stack_name:
125             Ref: AWS::StackName
126       heat:
127         admin_password: unset
128         admin_tenant_name: service
129         admin_user: heat
130         auth_encryption_key: unset___________
131         db: mysql://heat:unset@localhost/heat
132         heat_watch_server_url:
133           Fn::Join:
134             - ''
135             - - 'http://'
136               - Fn::GetAtt:
137                   - notcompute
138                   - PrivateIp
139               - ':8003'
140         metadata_server_url:
141           Fn::Join:
142             - ''
143             - - 'http://'
144               - Fn::GetAtt:
145                   - notcompute
146                   - PrivateIp
147               - ':8000'
148         waitcondition_server_url:
149           Fn::Join:
150             - ''
151             - - 'http://'
152               - Fn::GetAtt:
153                   - notcompute
154                   - PrivateIp
155               - ':8000/v1/waitcondition'
156       interfaces:
157         control: eth0
158       keystone:
159         db: mysql://keystone:unset@localhost/keystone
160         host:
161           Fn::GetAtt:
162             - notcompute
163             - PrivateIp
164       nova:
165         compute_driver: libvirt.LibvirtDriver
166         db: mysql://nova:unset@localhost/nova
167         host:
168           Fn::GetAtt:
169             - notcompute
170             - PrivateIp
171         metadata-proxy: true
172       neutron:
173         host:
174           Fn::GetAtt:
175             - notcompute
176             - PrivateIp
177         metadata_proxy_shared_secret: unset
178         ovs:
179           enable_tunneling: 'True'
180           local_ip:
181             Fn::GetAtt:
182               - notcompute
183               - PrivateIp
184           public_interface: eth0
185           physical_bridge: br-ex
186           tenant_network_type: gre
187         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
188       rabbit:
189         host:
190           Fn::GetAtt:
191             - notcompute
192             - PrivateIp
193         password: guest
194       service-password: unset
195   notcompute:
196     Type: AWS::EC2::Instance
197     Properties:
198       ImageId:
199         Ref: notcomputeImage
200       InstanceType:
201         Ref: InstanceType
202       KeyName:
203         Ref: KeyName
204     Metadata:
205       os-collect-config:
206         cfn:
207           access_key_id:
208             Ref: Key
209           path: notcomputeConfig.Metadata
210           secret_access_key:
211             Fn::GetAtt:
212             - Key
213             - SecretAccessKey
214           stack_name:
215             Ref: AWS::StackName