Merge "Make it possible to enable native neutron PXE."
[apex-tripleo-heat-templates.git] / undercloud-vm.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   BaremetalArch:
14     Default: i386
15     Description: The architecture to use in Nova-BM - i386 or amd64.
16     Type: String
17   Flavor:
18     Default: baremetal
19     Description: Flavor to request when deploying.
20     Type: String
21   GlancePassword:
22     Default: unset
23     Description: The password for the glance service account, used by the glance services.
24     Type: String
25     NoEcho: true
26   KeyName:
27     Default: default
28     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
29     Type: String
30   HeatPassword:
31     Default: unset
32     Description: The password for the Heat service account, used by the Heat services.
33     Type: String
34     NoEcho: true
35   Image:
36     Default: undercloud
37     Type: String
38   NeutronPassword:
39     Default: unset
40     Description: The password for the neutron service account, used by neutron agents.
41     Type: String
42     NoEcho: true
43   NeutronNativePXE:
44     Default: ''
45     Type: String
46     Description: Set truthy to enable Neutron native PXE.
47   NovaPassword:
48     Default: unset
49     Description: The password for the nova service account, used by nova-api.
50     Type: String
51     NoEcho: true
52   PowerUserName:
53     Default: stack
54     Description: What username to ssh to the virtual power host with.
55     Type: String
56 Resources:
57   AccessPolicy:
58     Properties:
59       AllowedResources:
60       - notcomputeConfig
61     Type: OS::Heat::AccessPolicy
62   Key:
63     Properties:
64       UserName:
65         Ref: User
66     Type: AWS::IAM::AccessKey
67   User:
68     Properties:
69       Policies:
70       - Ref: AccessPolicy
71     Type: AWS::IAM::User
72   notcomputeConfig:
73     Type: AWS::AutoScaling::LaunchConfiguration
74     Properties:
75       ImageId: '0'
76       InstanceType: foo
77     Metadata:
78       OpenStack::Heat::Stack: {}
79       Openstack::ImageBuilder::Elements: [ boot-stack, heat-cfntools, neutron-network-node ]
80       admin-password:
81         Ref: AdminPassword
82       admin-token: 
83         Ref: AdminToken
84       controller-address:
85         Fn::Select:
86           - 0
87           - Fn::Select:
88             - "ctlplane"
89             - Fn::GetAtt:
90               - notcompute
91               - networks
92       cinder:
93         db: mysql://cinder:unset@localhost/cinder
94         volume_size_mb: '5000'
95       db-password: unset
96       glance:
97         db: mysql://glance:unset@localhost/glance
98         host: 127.0.0.1
99         service-password:
100           Ref: GlancePassword
101       heat:
102         admin_password:
103           Ref: HeatPassword
104         admin_tenant_name: service
105         admin_user: heat
106         auth_encryption_key: unset___________
107         db: mysql://heat:unset@localhost/heat
108         heat_watch_server_url:
109           Fn::Join:
110             - ''
111             - - http://
112               - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ notcompute, networks ]} ]}]}
113               - ":8003"
114         metadata_server_url:
115           Fn::Join:
116             - ''
117             - - http://
118               - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ notcompute, networks ]} ]}]}
119               - ":8000"
120         waitcondition_server_url:
121           Fn::Join:
122             - ''
123             - - http://
124               - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ notcompute, networks ]} ]}]}
125               - ":8000/v1/waitcondition"
126       os-collect-config:
127         cfn:
128           access_key_id:
129             Ref: Key
130           path: notcomputeConfig.Metadata
131           secret_access_key:
132             Fn::GetAtt:
133             - Key
134             - SecretAccessKey
135           stack_name:
136             Ref: AWS::StackName
137       interfaces:
138         control: eth2
139       keystone:
140         db: mysql://keystone:unset@localhost/keystone
141         host: 127.0.0.1
142       nova:
143         compute_hostname: undercloud
144         compute_driver: baremetal.driver.BareMetalDriver
145         db: mysql://nova:unset@localhost/nova
146         host: 127.0.0.1
147         metadata-proxy: false
148         tuning:
149           ram_allocation_ratio: 1.0
150           reserved_host_memory_mb: 0
151         baremetal:
152           arch:
153             Ref: BaremetalArch
154           db: mysql://nova:unset@localhost/nova_bm
155           power_manager: nova.virt.baremetal.virtual_power_driver.VirtualPowerManager
156           pxe_deploy_timeout: 2400
157           virtual_power:
158             user:
159               Ref: PowerUserName
160             key: /opt/stack/boot-stack/virtual-power-key
161             ssh_host: 192.168.122.1
162             type: virsh
163         service-password:
164           Ref: NovaPassword
165       neutron:
166         host: 127.0.0.1
167         native_pxe:
168           Ref: NeutronNativePXE
169         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
170         ovs:
171           dnsmasq_range: [192.0.2.25, 192.0.2.44]
172           public_interface: eth0
173           physical_bridge: br-ctlplane
174           physical_network: ctlplane
175           network_vlan_ranges: ctlplane
176           bridge_mappings: ctlplane:br-ctlplane
177           tenant_network_type: vlan
178           enable_tunneling: 'False'
179         service-password:
180           Ref: NeutronPassword
181       rabbit:
182         host: 127.0.0.1
183         password: guest
184   notcompute:
185     Type: OS::Nova::Server
186     Properties:
187       image:
188         Ref: Image
189       flavor:
190         Ref: Flavor
191       key_name:
192         Ref: KeyName
193     Metadata:
194       os-collect-config:
195         cfn:
196           access_key_id:
197             Ref: Key
198           path: notcomputeConfig.Metadata
199           secret_access_key:
200             Fn::GetAtt:
201             - Key
202             - SecretAccessKey
203           stack_name:
204             Ref: AWS::StackName