Set default network interfaces to nic1
[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   NeutronBridgeMappings:
95     type: string
96   NeutronDSN:
97     type: string
98   NeutronEnableTunnelling:
99     type: string
100   NeutronFlatNetworks:
101     type: string
102     default: ''
103     description: If set, flat networks to configure in neutron plugins.
104   NeutronHost:
105     type: string
106   NeutronNetworkType:
107     default: 'gre'
108     description: The tenant network type for Neutron, either gre or vxlan.
109     type: string
110   NeutronNetworkVLANRanges:
111     type: string
112   NeutronPhysicalBridge:
113     default: ''
114     description: An OVS bridge to create for accessing external networks.
115     type: string
116   NeutronPublicInterface:
117     default: ''
118     description: A port to add to the NeutronPhysicalBridge.
119     type: string
120   NeutronTunnelTypes:
121     default: 'gre'
122     description: |
123         The tunnel types for the Neutron tenant network. To specify multiple
124         values, use a comma separated string, like so: 'gre,vxlan'
125     type: string
126   NeutronPublicInterfaceRawDevice:
127     default: ''
128     type: string
129   NeutronDVR:
130     default: 'False'
131     type: string
132   NeutronMechanismDrivers:
133     default: 'openvswitch'
134     description: |
135         The mechanism drivers for the Neutron tenant network. To specify multiple
136         values, use a comma separated string, like so: 'openvswitch,l2_population'
137     type: string
138   NeutronAllowL3AgentFailover:
139     default: 'True'
140     description: Allow automatic l3-agent failover
141     type: string
142   NovaApiHost:
143     type: string
144   NovaComputeDriver:
145     type: string
146     default: libvirt.LibvirtDriver
147   NovaComputeExtraConfig:
148     default: {}
149     description: |
150       NovaCompute specific configuration to inject into the cluster. Same
151       structure as ExtraConfig.
152     type: json
153   NovaComputeLibvirtType:
154     type: string
155     default: ''
156   NovaDSN:
157     type: string
158   NovaImage:
159     type: string
160     default: overcloud-compute
161   NovaPassword:
162     default: unset
163     description: The password for the nova service account, used by nova-api.
164     type: string
165     hidden: true
166   NovaPublicIP:
167     type: string
168   NtpServer:
169     type: string
170     default: ''
171   OvercloudComputeFlavor:
172     description: Use this flavor
173     type: string
174     default: baremetal
175   RabbitHost:
176     type: string
177   RabbitUserName:
178     type: string
179   RabbitPassword:
180     type: string
181     hidden: true
182   SnmpdReadonlyUserName:
183     default: ro_snmp_user
184     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
185     type: string
186   SnmpdReadonlyUserPassword:
187     default: unset
188     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
189     type: string
190     hidden: true
191 resources:
192   NovaCompute0:
193     type: OS::Nova::Server
194     properties:
195       image:
196         {get_param: NovaImage}
197       image_update_policy:
198         get_param: ImageUpdatePolicy
199       flavor: {get_param: OvercloudComputeFlavor}
200       key_name: {get_param: KeyName}
201       networks:
202         - network: ctlplane
203       user_data_format: SOFTWARE_CONFIG
204   NovaCompute0Deployment:
205     type: OS::Heat::StructuredDeployment
206     properties:
207       signal_transport: NO_SIGNAL
208       config: {get_resource: NovaComputeConfig}
209       server: {get_resource: NovaCompute0}
210       input_values:
211         nova_compute_driver: {get_param: NovaComputeDriver}
212         nova_compute_libvirt_type: {get_param: NovaComputeLibvirtType}
213         nova_dsn: {get_param: NovaDSN}
214         nova_public_ip: {get_param: NovaPublicIP}
215         nova_api_host: {get_param: NovaApiHost}
216         nova_password: {get_param: NovaPassword}
217         ceilometer_dsn: {get_param: CeilometerDSN}
218         ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
219         ceilometer_password: {get_param: CeilometerPassword}
220         ceilometer_compute_agent: {get_param: CeilometerComputeAgent}
221         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
222         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
223         glance_host: {get_param: GlanceHost}
224         glance_port: {get_param: GlancePort}
225         glance_protocol: {get_param: GlanceProtocol}
226         keystone_host: {get_param: KeystoneHost}
227         neutron_flat_networks: {get_param: NeutronFlatNetworks}
228         neutron_host: {get_param: NeutronHost}
229         neutron_dsn: {get_param: NeutronDSN}
230         neutron_local_ip: {get_attr: [NovaCompute0, networks, ctlplane, 0]}
231         neutron_tenant_network_type: {get_param: NeutronNetworkType}
232         neutron_tunnel_types: {get_param: NeutronTunnelTypes}
233         neutron_network_vlan_ranges: {get_param: NeutronNetworkVLANRanges}
234         neutron_bridge_mappings: {get_param: NeutronBridgeMappings}
235         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
236         neutron_physical_bridge: {get_param: NeutronPhysicalBridge}
237         neutron_public_interface: {get_param: NeutronPublicInterface}
238         neutron_public_interface_raw_device: {get_param: NeutronPublicInterfaceRawDevice}
239         neutron_password: {get_param: NeutronPassword}
240         neutron_agent_mode: {get_param: NeutronComputeAgentMode}
241         neutron_router_distributed: {get_param: NeutronDVR}
242         neutron_metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
243         neutron_mechanism_drivers: {get_param: NeutronMechanismDrivers}
244         neutron_allow_l3agent_failover: {get_param: NeutronAllowL3AgentFailover}
245         admin_password: {get_param: AdminPassword}
246         rabbit_host: {get_param: RabbitHost}
247         rabbit_username: {get_param: RabbitUserName}
248         rabbit_password: {get_param: RabbitPassword}
249         ntp_server: {get_param: NtpServer}
250   NovaCompute0AllNodesDeployment:
251     depends_on:
252       - controller0AllNodesDeployment
253       - NovaCompute0Deployment
254       - NovaCompute0PassthroughSpecific
255     type: OS::Heat::StructuredDeployment
256     properties:
257       signal_transport: {get_param: DefaultSignalTransport}
258       config: {get_param: AllNodesConfig}
259       server: {get_resource: NovaCompute0}
260   NovaCompute0Passthrough:
261     type: OS::Heat::StructuredDeployment
262     properties:
263       config: {get_resource: NovaComputePassthrough}
264       server: {get_resource: NovaCompute0}
265       signal_transport: NO_SIGNAL
266       input_values:
267         passthrough_config: {get_param: ExtraConfig}
268   NovaCompute0PassthroughSpecific:
269     depends_on: [NovaCompute0Passthrough]
270     type: OS::Heat::StructuredDeployment
271     properties:
272       config: {get_resource: NovaComputePassthroughSpecific}
273       server: {get_resource: NovaCompute0}
274       signal_transport: NO_SIGNAL
275       input_values:
276         passthrough_config_specific: {get_param: NovaComputeExtraConfig}