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