Merge "Use HAProxy httpchk for openstack services"
[apex-tripleo-heat-templates.git] / nova-compute-instance.yaml
1 heat_template_version: 2013-05-23
2 description: 'Nova Compute'
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     hidden: true
9   AllNodesConfig:
10     type: string
11     description: OS::Heat::Config to use for all nodes deployment
12   CeilometerComputeAgent:
13     description: Indicates whether the Compute agent is present and expects nova-compute to be configured accordingly
14     type: string
15     default: ''
16     constraints:
17     - allowed_values: ['', Present]
18   CeilometerDSN:
19     type: string
20   CeilometerMeteringSecret:
21     default: unset
22     description: Secret shared by the ceilometer services.
23     type: string
24     hidden: true
25   CeilometerPassword:
26     default: unset
27     description: The password for the ceilometer service account.
28     type: string
29     hidden: true
30   DefaultSignalTransport:
31     default: CFN_SIGNAL
32     description: Transport to use for software-config signals.
33     type: string
34     constraints:
35       - allowed_values: [ CFN_SIGNAL, HEAT_SIGNAL, NO_SIGNAL ]
36   ExtraConfig:
37     default: {}
38     description: |
39       Additional configuration to inject into the cluster. The JSON should have
40       the following structure:
41         {"FILEKEY":
42           {"config":
43             [{"section": "SECTIONNAME",
44               "values":
45                 [{"option": "OPTIONNAME",
46                   "value": "VALUENAME"
47                  }
48                 ]
49              }
50             ]
51           }
52         }
53       For instance:
54         {"nova":
55           {"config":
56             [{"section": "default",
57               "values":
58                 [{"option": "force_config_drive",
59                   "value": "always"
60                  }
61                 ]
62              },
63              {"section": "cells",
64               "values":
65                 [{"option": "driver",
66                   "value": "nova.cells.rpc_driver.CellsRPCDriver"
67                  }
68                 ]
69              }
70             ]
71           }
72         }
73     type: json
74   GlanceHost:
75     type: string
76   GlancePort:
77     default: 9292
78     description: Glance port.
79     type: string
80   GlanceProtocol:
81     default: http
82     description: Protocol to use when connecting to glance, set to https for SSL.
83     type: string
84   ImageUpdatePolicy:
85     default: 'REBUILD_PRESERVE_EPHEMERAL'
86     description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
87     type: string
88   KeyName:
89     description: Name of an existing EC2 KeyPair to enable SSH access to the instances
90     type: string
91     default: default
92   KeystoneHost:
93     type: string
94   LiveUpdateComputeImage:
95     type: string
96     description: The image ID for live-updates to the overcloud compute nodes.
97     default: ''
98   LiveUpdateHost:
99     type: string
100     description: The IP address for the undercloud Glance API.
101     default: ''
102   LiveUpdatePassword:
103     type: string
104     default: ''
105     description: The live-update password for the undercloud Glance API.
106     hidden: true
107   LiveUpdateTenantName:
108     type: string
109     description: The live-update tenant name for the undercloud Glance API.
110     default: ''
111   LiveUpdateUserName:
112     type: string
113     description: The live-update username for the undercloud Glance API.
114     default: ''
115   NeutronBridgeMappings:
116     type: string
117   NeutronDSN:
118     type: string
119   NeutronEnableTunnelling:
120     type: string
121   NeutronFlatNetworks:
122     type: string
123     default: ''
124     description: If set, flat networks to configure in neutron plugins.
125   NeutronHost:
126     type: string
127   NeutronNetworkType:
128     default: 'gre'
129     description: The tenant network type for Neutron, either gre or vxlan.
130     type: string
131   NeutronNetworkVLANRanges:
132     type: string
133   NeutronPhysicalBridge:
134     default: ''
135     description: An OVS bridge to create for accessing external networks.
136     type: string
137   NeutronPublicInterface:
138     default: ''
139     description: A port to add to the NeutronPhysicalBridge.
140     type: string
141   NeutronTunnelTypes:
142     default: 'gre'
143     description: |
144         The tunnel types for the Neutron tenant network. To specify multiple
145         values, use a comma separated string, like so: 'gre,vxlan'
146     type: string
147   NeutronPublicInterfaceRawDevice:
148     default: ''
149     type: string
150   NeutronDVR:
151     default: 'False'
152     type: string
153   NeutronMechanismDrivers:
154     default: 'openvswitch'
155     description: |
156         The mechanism drivers for the Neutron tenant network. To specify multiple
157         values, use a comma separated string, like so: 'openvswitch,l2_population'
158     type: string
159   NeutronAllowL3AgentFailover:
160     default: 'True'
161     description: Allow automatic l3-agent failover
162     type: string
163   NovaApiHost:
164     type: string
165   NovaComputeDriver:
166     type: string
167     default: libvirt.LibvirtDriver
168   NovaComputeExtraConfig:
169     default: {}
170     description: |
171       NovaCompute specific configuration to inject into the cluster. Same
172       structure as ExtraConfig.
173     type: json
174   NovaComputeLibvirtType:
175     type: string
176     default: ''
177   NovaDSN:
178     type: string
179   NovaImage:
180     type: string
181     default: overcloud-compute
182   NovaPassword:
183     default: unset
184     description: The password for the nova service account, used by nova-api.
185     type: string
186     hidden: true
187   NovaPublicIP:
188     type: string
189   NtpServer:
190     type: string
191     default: ''
192   OvercloudComputeFlavor:
193     description: Use this flavor
194     type: string
195     default: baremetal
196   RabbitHost:
197     type: string
198   RabbitUserName:
199     type: string
200   RabbitPassword:
201     type: string
202     hidden: true
203   SnmpdReadonlyUserName:
204     default: ro_snmp_user
205     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
206     type: string
207   SnmpdReadonlyUserPassword:
208     default: unset
209     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
210     type: string
211     hidden: true
212 resources:
213   NovaCompute0:
214     type: OS::Nova::Server
215     properties:
216       image:
217         {get_param: NovaImage}
218       image_update_policy:
219         get_param: ImageUpdatePolicy
220       flavor: {get_param: OvercloudComputeFlavor}
221       key_name: {get_param: KeyName}
222       networks:
223         - network: ctlplane
224       user_data_format: SOFTWARE_CONFIG
225   NovaCompute0Deployment:
226     type: OS::Heat::StructuredDeployment
227     properties:
228       signal_transport: NO_SIGNAL
229       config: {get_resource: NovaComputeConfig}
230       server: {get_resource: NovaCompute0}
231       input_values:
232         nova_compute_driver: {get_param: NovaComputeDriver}
233         nova_compute_libvirt_type: {get_param: NovaComputeLibvirtType}
234         nova_dsn: {get_param: NovaDSN}
235         nova_public_ip: {get_param: NovaPublicIP}
236         nova_api_host: {get_param: NovaApiHost}
237         nova_password: {get_param: NovaPassword}
238         ceilometer_dsn: {get_param: CeilometerDSN}
239         ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
240         ceilometer_password: {get_param: CeilometerPassword}
241         ceilometer_compute_agent: {get_param: CeilometerComputeAgent}
242         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
243         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
244         glance_host: {get_param: GlanceHost}
245         glance_port: {get_param: GlancePort}
246         glance_protocol: {get_param: GlanceProtocol}
247         keystone_host: {get_param: KeystoneHost}
248         neutron_flat_networks: {get_param: NeutronFlatNetworks}
249         neutron_host: {get_param: NeutronHost}
250         neutron_dsn: {get_param: NeutronDSN}
251         neutron_local_ip: {get_attr: [NovaCompute0, networks, ctlplane, 0]}
252         neutron_tenant_network_type: {get_param: NeutronNetworkType}
253         neutron_tunnel_types: {get_param: NeutronTunnelTypes}
254         neutron_network_vlan_ranges: {get_param: NeutronNetworkVLANRanges}
255         neutron_bridge_mappings: {get_param: NeutronBridgeMappings}
256         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
257         neutron_physical_bridge: {get_param: NeutronPhysicalBridge}
258         neutron_public_interface: {get_param: NeutronPublicInterface}
259         neutron_public_interface_raw_device: {get_param: NeutronPublicInterfaceRawDevice}
260         neutron_password: {get_param: NeutronPassword}
261         neutron_agent_mode: {get_param: NeutronComputeAgentMode}
262         neutron_router_distributed: {get_param: NeutronDVR}
263         neutron_metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
264         neutron_mechanism_drivers: {get_param: NeutronMechanismDrivers}
265         neutron_allow_l3agent_failover: {get_param: NeutronAllowL3AgentFailover}
266         admin_password: {get_param: AdminPassword}
267         rabbit_host: {get_param: RabbitHost}
268         rabbit_username: {get_param: RabbitUserName}
269         rabbit_password: {get_param: RabbitPassword}
270         live_update_host: {get_param: LiveUpdateHost}
271         live_update_username: {get_param: LiveUpdateUserName}
272         live_update_password: {get_param: LiveUpdatePassword}
273         live_update_tenant_name: {get_param: LiveUpdateTenantName}
274         nova_image: {get_param: NovaImage}
275         live_update_image_id: {get_param: LiveUpdateComputeImage}
276         ntp_server: {get_param: NtpServer}
277   NovaCompute0AllNodesDeployment:
278     depends_on:
279       - controller0AllNodesDeployment
280       - NovaCompute0Deployment
281       - NovaCompute0PassthroughSpecific
282     type: OS::Heat::StructuredDeployment
283     properties:
284       signal_transport: {get_param: DefaultSignalTransport}
285       config: {get_param: AllNodesConfig}
286       server: {get_resource: NovaCompute0}
287   NovaCompute0Passthrough:
288     type: OS::Heat::StructuredDeployment
289     properties:
290       config: {get_resource: NovaComputePassthrough}
291       server: {get_resource: NovaCompute0}
292       signal_transport: NO_SIGNAL
293       input_values:
294         passthrough_config: {get_param: ExtraConfig}
295   NovaCompute0PassthroughSpecific:
296     depends_on: [NovaCompute0Passthrough]
297     type: OS::Heat::StructuredDeployment
298     properties:
299       config: {get_resource: NovaComputePassthroughSpecific}
300       server: {get_resource: NovaCompute0}
301       signal_transport: NO_SIGNAL
302       input_values:
303         passthrough_config_specific: {get_param: NovaComputeExtraConfig}