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