Merge "Add a bare metal undercloud template."
[apex-tripleo-heat-templates.git] / undercloud-bm.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 Resources:
53   AccessPolicy:
54     Properties:
55       AllowedResources:
56       - notcomputeConfig
57     Type: OS::Heat::AccessPolicy
58   Key:
59     Properties:
60       UserName:
61         Ref: User
62     Type: AWS::IAM::AccessKey
63   User:
64     Properties:
65       Policies:
66       - Ref: AccessPolicy
67     Type: AWS::IAM::User
68   notcomputeConfig:
69     Type: AWS::AutoScaling::LaunchConfiguration
70     Properties:
71       ImageId: '0'
72       InstanceType: foo
73     Metadata:
74       OpenStack::Heat::Stack: {}
75       Openstack::ImageBuilder::Elements: [ boot-stack, heat-cfntools, neutron-network-node ]
76       admin-password:
77         Ref: AdminPassword
78       admin-token: 
79         Ref: AdminToken
80       controller-address:
81         Fn::Select:
82           - 0
83           - Fn::Select:
84             - "ctlplane"
85             - Fn::GetAtt:
86               - notcompute
87               - networks
88       cinder:
89         db: mysql://cinder:unset@localhost/cinder
90         volume_size_mb: '5000'
91       db-password: unset
92       glance:
93         db: mysql://glance:unset@localhost/glance
94         host: 127.0.0.1
95         service-password:
96           Ref: GlancePassword
97       heat:
98         admin_password:
99           Ref: HeatPassword
100         admin_tenant_name: service
101         admin_user: heat
102         auth_encryption_key: unset___________
103         db: mysql://heat:unset@localhost/heat
104         heat_watch_server_url:
105           Fn::Join:
106             - ''
107             - - http://
108               - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ notcompute, networks ]} ]}]}
109               - ":8003"
110         metadata_server_url:
111           Fn::Join:
112             - ''
113             - - http://
114               - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ notcompute, networks ]} ]}]}
115               - ":8000"
116         waitcondition_server_url:
117           Fn::Join:
118             - ''
119             - - http://
120               - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ notcompute, networks ]} ]}]}
121               - ":8000/v1/waitcondition"
122       os-collect-config:
123         cfn:
124           access_key_id:
125             Ref: Key
126           path: notcomputeConfig.Metadata
127           secret_access_key:
128             Fn::GetAtt:
129             - Key
130             - SecretAccessKey
131           stack_name:
132             Ref: AWS::StackName
133       interfaces:
134         control: eth2
135       keystone:
136         db: mysql://keystone:unset@localhost/keystone
137         host: 127.0.0.1
138       nova:
139         compute_hostname: undercloud
140         compute_driver: baremetal.driver.BareMetalDriver
141         db: mysql://nova:unset@localhost/nova
142         host: 127.0.0.1
143         metadata-proxy: false
144         tuning:
145           ram_allocation_ratio: 1.0
146           reserved_host_memory_mb: 0
147         baremetal:
148           arch:
149             Ref: BaremetalArch
150           db: mysql://nova:unset@localhost/nova_bm
151           power_manager: nova.virt.baremetal.ipmi.IPMI
152           pxe_deploy_timeout: 2400
153         service-password:
154           Ref: NovaPassword
155       neutron:
156         host: 127.0.0.1
157         native_pxe:
158           Ref: NeutronNativePXE
159         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
160         ovs:
161           dnsmasq_range: [192.0.2.25, 192.0.2.44]
162           public_interface: eth2
163           physical_bridge: br-ctlplane
164           physical_network: ctlplane
165           network_vlan_ranges: ctlplane
166           bridge_mappings: ctlplane:br-ctlplane
167           tenant_network_type: vlan
168           enable_tunneling: 'False'
169         service-password:
170           Ref: NeutronPassword
171       rabbit:
172         host: 127.0.0.1
173         password: guest
174   notcompute:
175     Type: OS::Nova::Server
176     Properties:
177       image:
178         Ref: Image
179       flavor:
180         Ref: Flavor
181       key_name:
182         Ref: KeyName
183     Metadata:
184       os-collect-config:
185         cfn:
186           access_key_id:
187             Ref: Key
188           path: notcomputeConfig.Metadata
189           secret_access_key:
190             Fn::GetAtt:
191             - Key
192             - SecretAccessKey
193           stack_name:
194             Ref: AWS::StackName