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