Add specific pass-through config for each role
[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": "compute_manager",
32                   "value": "ironic.nova.compute.manager.ClusterComputeManager"
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   RabbitHost:
88     type: string
89   RabbitUserName:
90     type: string
91   RabbitPassword:
92     type: string
93     hidden: true
94   CeilometerComputeAgent:
95     description: Indicates whether the Compute agent is present and expects nova-compute to be configured accordingly
96     type: string
97     default: ''
98     constraints:
99     - allowed_values: ['', Present]
100   CeilometerMeteringSecret:
101     default: unset
102     description: Secret shared by the ceilometer services.
103     type: string
104     hidden: true
105   CeilometerPassword:
106     default: unset
107     description: The password for the ceilometer service account.
108     type: string
109     hidden: true
110   SnmpdReadonlyUserName:
111     default: ro_snmp_user
112     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
113     type: string
114   SnmpdReadonlyUserPassword:
115     default: unset
116     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
117     type: string
118     hidden: true
119   NovaComputeDriver:
120     type: string
121     default: libvirt.LibvirtDriver
122   NovaComputeLibvirtType:
123     type: string
124     default: ''
125   NovaApiHost:
126     type: string
127   NovaPassword:
128     default: unset
129     description: The password for the nova service account, used by nova-api.
130     type: string
131     hidden: true
132   GlanceHost:
133     type: string
134   GlancePort:
135     default: 9292
136     description: Glance port.
137     type: string
138   GlanceProtocol:
139     default: http
140     description: Protocol to use when connecting to glance, set to https for SSL.
141     type: string
142   CeilometerDSN:
143     type: string
144   NovaDSN:
145     type: string
146   NeutronDSN:
147     type: string
148   NeutronBridgeMappings:
149     type: string
150   NeutronNetworkVLANRanges:
151     type: string
152   NeutronNetworkType:
153     type: string
154   NeutronEnableTunnelling:
155     type: string
156   AllNodesConfig:
157     type: string
158     description: OS::Heat::Config to use for all nodes deployment
159   LiveUpdateUserName:
160     type: string
161     description: The live-update username for the undercloud Glance API.
162     default: ''
163   LiveUpdateTenantName:
164     type: string
165     description: The live-update tenant name for the undercloud Glance API.
166     default: ''
167   LiveUpdateHost:
168     type: string
169     description: The IP address for the undercloud Glance API.
170     default: ''
171   LiveUpdatePassword:
172     type: string
173     default: ''
174     description: The live-update password for the undercloud Glance API.
175     hidden: true
176   LiveUpdateComputeImage:
177     type: string
178     description: The image ID for live-updates to the overcloud compute nodes.
179     default: ''
180 resources:
181   NovaCompute0:
182     type: OS::Nova::Server
183     properties:
184       image:
185         {get_param: NovaImage}
186       image_update_policy:
187         get_param: ImageUpdatePolicy
188       flavor: {get_param: OvercloudComputeFlavor}
189       key_name: {get_param: KeyName}
190       networks:
191         - network: ctlplane
192       user_data_format: SOFTWARE_CONFIG
193   NovaCompute0Deployment:
194     depends_on: [controller0AllNodesDeployment]
195     type: OS::Heat::StructuredDeployment
196     properties:
197       signal_transport: NO_SIGNAL
198       config: {get_resource: NovaComputeConfig}
199       server: {get_resource: NovaCompute0}
200       input_values:
201         nova_compute_driver: {get_param: NovaComputeDriver}
202         nova_compute_libvirt_type: {get_param: NovaComputeLibvirtType}
203         nova_dsn: {get_param: NovaDSN}
204         nova_api_host: {get_param: NovaApiHost}
205         nova_password: {get_param: NovaPassword}
206         ceilometer_dsn: {get_param: CeilometerDSN}
207         ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
208         ceilometer_password: {get_param: CeilometerPassword}
209         ceilometer_compute_agent: {get_param: CeilometerComputeAgent}
210         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
211         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
212         glance_host: {get_param: GlanceHost}
213         glance_port: {get_param: GlancePort}
214         glance_protocol: {get_param: GlanceProtocol}
215         keystone_host: {get_param: KeystoneHost}
216         neutron_flat_networks: {get_param: NeutronFlatNetworks}
217         neutron_host: {get_param: NeutronHost}
218         neutron_dsn: {get_param: NeutronDSN}
219         neutron_local_ip: {get_attr: [NovaCompute0, networks, ctlplane, 0]}
220         neutron_tenant_network_type: {get_param: NeutronNetworkType}
221         neutron_network_vlan_ranges: {get_param: NeutronNetworkVLANRanges}
222         neutron_bridge_mappings: {get_param: NeutronBridgeMappings}
223         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
224         neutron_physical_bridge: {get_param: NeutronPhysicalBridge}
225         neutron_public_interface: {get_param: NeutronPublicInterface}
226         neutron_password: {get_param: NeutronPassword}
227         admin_password: {get_param: AdminPassword}
228         rabbit_host: {get_param: RabbitHost}
229         rabbit_username: {get_param: RabbitUserName}
230         rabbit_password: {get_param: RabbitPassword}
231         live_update_host: {get_param: LiveUpdateHost}
232         live_update_username: {get_param: LiveUpdateUserName}
233         live_update_password: {get_param: LiveUpdatePassword}
234         live_update_tenant_name: {get_param: LiveUpdateTenantName}
235         nova_image: {get_param: NovaImage}
236         live_update_image_id: {get_param: LiveUpdateComputeImage}
237         ntp_server: {get_param: NtpServer}
238   NovaCompute0AllNodesDeployment:
239     depends_on: [NovaCompute0Passthrough]
240     type: OS::Heat::StructuredDeployment
241     properties:
242       config: {get_param: AllNodesConfig}
243       server: {get_resource: NovaCompute0}
244   NovaCompute0Passthrough:
245     depends_on: [NovaCompute0Deployment]
246     type: OS::Heat::StructuredDeployment
247     properties:
248       config: {get_resource: NovaComputePassthrough}
249       server: {get_resource: NovaCompute0}
250       signal_transport: NO_SIGNAL
251       input_values:
252         passthrough_config: {get_param: ExtraConfig}
253   NovaCompute0PassthroughSpecific:
254     depends_on: [NovaCompute0Passthrough]
255     type: OS::Heat::StructuredDeployment
256     properties:
257       config: {get_resource: NovaComputePassthroughSpecific}
258       server: {get_resource: NovaCompute0}
259       signal_transport: NO_SIGNAL
260       input_values:
261         passthrough_config_specific: {get_param: NovaComputeExtraConfig}