Restore rabbit.host and add an haproxy rabbit listener
[apex-tripleo-heat-templates.git] / nova-compute-instance.yaml
1 heat_template_version: 2014-10-16
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": "compute_manager",
31                   "value": "ironic.nova.compute.manager.ClusterComputeManager"
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   NeutronDSN:
140     type: string
141   NeutronBridgeMappings:
142     type: string
143   NeutronNetworkVLANRanges:
144     type: string
145   NeutronNetworkType:
146     type: string
147   NeutronEnableTunnelling:
148     type: string
149   AllNodesConfig:
150     type: string
151     description: OS::Heat::Config to use for all nodes deployment
152   LiveUpdateUserName:
153     type: string
154     description: The live-update username for the undercloud Glance API.
155     default: ''
156   LiveUpdateTenantName:
157     type: string
158     description: The live-update tenant name for the undercloud Glance API.
159     default: ''
160   LiveUpdateHost:
161     type: string
162     description: The IP address for the undercloud Glance API.
163     default: ''
164   LiveUpdatePassword:
165     type: string
166     default: ''
167     description: The live-update password for the undercloud Glance API.
168     hidden: true
169   LiveUpdateComputeImage:
170     type: string
171     description: The image ID for live-updates to the overcloud compute nodes.
172     default: ''
173 resources:
174   NovaCompute0:
175     type: OS::Nova::Server
176     properties:
177       image:
178         {get_param: NovaImage}
179       image_update_policy:
180         get_param: ImageUpdatePolicy
181       flavor: {get_param: OvercloudComputeFlavor}
182       key_name: {get_param: KeyName}
183       networks:
184         - network: ctlplane
185       user_data_format: SOFTWARE_CONFIG
186   NovaCompute0Deploy:
187     depends_on: [controller0AllNodes]
188     type: OS::Heat::StructuredDeployment
189     properties:
190       signal_transport: NO_SIGNAL
191       config: {get_resource: NovaComputeConfig}
192       server: {get_resource: NovaCompute0}
193       input_values:
194         nova_compute_driver: {get_param: NovaComputeDriver}
195         nova_compute_libvirt_type: {get_param: NovaComputeLibvirtType}
196         nova_dsn: {get_param: NovaDSN}
197         nova_api_host: {get_param: NovaApiHost}
198         nova_password: {get_param: NovaPassword}
199         ceilometer_dsn: {get_param: CeilometerDSN}
200         ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
201         ceilometer_password: {get_param: CeilometerPassword}
202         ceilometer_compute_agent: {get_param: CeilometerComputeAgent}
203         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
204         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
205         glance_host: {get_param: GlanceHost}
206         glance_port: {get_param: GlancePort}
207         glance_protocol: {get_param: GlanceProtocol}
208         keystone_host: {get_param: KeystoneHost}
209         neutron_flat_networks: {get_param: NeutronFlatNetworks}
210         neutron_host: {get_param: NeutronHost}
211         neutron_dsn: {get_param: NeutronDSN}
212         neutron_local_ip: {get_attr: [NovaCompute0, networks, ctlplane, 0]}
213         neutron_tenant_network_type: {get_param: NeutronNetworkType}
214         neutron_network_vlan_ranges: {get_param: NeutronNetworkVLANRanges}
215         neutron_bridge_mappings: {get_param: NeutronBridgeMappings}
216         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
217         neutron_physical_bridge: {get_param: NeutronPhysicalBridge}
218         neutron_public_interface: {get_param: NeutronPublicInterface}
219         neutron_password: {get_param: NeutronPassword}
220         admin_password: {get_param: AdminPassword}
221         rabbit_host: {get_param: RabbitHost}
222         rabbit_username: {get_param: RabbitUserName}
223         rabbit_password: {get_param: RabbitPassword}
224         live_update_host: {get_param: LiveUpdateHost}
225         live_update_username: {get_param: LiveUpdateUserName}
226         live_update_password: {get_param: LiveUpdatePassword}
227         live_update_tenant_name: {get_param: LiveUpdateTenantName}
228         nova_image: {get_param: NovaImage}
229         live_update_image_id: {get_param: LiveUpdateComputeImage}
230         ntp_server: {get_param: NtpServer}
231   NovaCompute0AllNodesDeploy:
232     depends_on: [NovaCompute0Passthrough]
233     type: OS::Heat::StructuredDeployment
234     properties:
235       config: {get_param: AllNodesConfig}
236       server: {get_resource: NovaCompute0}
237   NovaCompute0Passthrough:
238     depends_on: [NovaCompute0Deploy]
239     type: OS::Heat::StructuredDeployment
240     properties:
241       config: {get_resource: NovaComputePassthrough}
242       server: {get_resource: NovaCompute0}
243       signal_transport: NO_SIGNAL
244       input_values:
245         passthrough_config: {get_param: ExtraConfig}