Merge "Sequence deploys - compute after control plane."
[apex-tripleo-heat-templates.git] / nova-compute-instance.yaml
1 HeatTemplateFormatVersion: '2012-12-12'
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     NoEcho: 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     NoEcho: 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     AllowedValues: ['', Present]
92   CeilometerMeteringSecret:
93     Default: unset
94     Description: Secret shared by the ceilometer services.
95     Type: String
96     NoEcho: true
97   CeilometerPassword:
98     Default: unset
99     Description: The password for the ceilometer service account.
100     Type: String
101     NoEcho: true
102   SnmpdReadonlyUserName:
103     Default: ro_snmp_user
104     Description: The user name for SNMPd with readonly rights running on all Overcloud nodes
105     Type: String
106   SnmpdReadonlyUserPassword:
107     Default: unset
108     Description: The user password for SNMPd with readonly rights running on all Overcloud nodes
109     Type: String
110     NoEcho: true
111   NovaComputeDriver:
112     Type: String
113     Default: libvirt.LibvirtDriver
114   NovaComputeLibvirtType:
115     Type: String
116     Default: ''
117   NovaApiHost:
118     Type: String
119   NovaPassword:
120     Default: unset
121     Description: The password for the nova service account, used by nova-api.
122     Type: String
123     NoEcho: true
124   GlanceHost:
125     Type: String
126   CeilometerDSN:
127     Type: String
128   NovaDSN:
129     Type: String
130   NeutronDSN:
131     Type: String
132   NeutronBridgeMappings:
133     Type: String
134   NeutronNetworkVLANRanges:
135     Type: String
136   NeutronNetworkType:
137     Type: String
138   NeutronEnableTunnelling:
139     Type: String
140   StaticHosts:
141     Default: ''
142     Description: Static content to append to /etc/hosts
143     Type: String
144   LiveUpdateUserName:
145     Type: String
146     Description: The live-update username for the undercloud Glance API.
147     Default: ''
148   LiveUpdateTenantName:
149     Type: String
150     Description: The live-update tenant name for the undercloud Glance API.
151     Default: ''
152   LiveUpdateHost:
153     Type: String
154     Description: The IP address for the undercloud Glance API.
155     Default: ''
156   LiveUpdatePassword:
157     Type: String
158     Default: ''
159     Description: The live-update password for the undercloud Glance API.
160     NoEcho: true
161   LiveUpdateComputeImage:
162     Type: String
163     Description: The image ID for live-updates to the overcloud compute nodes.
164     Default: ''
165 Resources:
166   NovaCompute0:
167     Type: OS::Nova::Server
168     Properties:
169       image:
170         {Ref: NovaImage}
171       image_update_policy:
172         Ref: ImageUpdatePolicy
173       flavor: {Ref: OvercloudComputeFlavor}
174       key_name: {Ref: KeyName}
175       user_data_format: SOFTWARE_CONFIG
176   NovaCompute0Deploy:
177     DependsOn: [controller0Deployment]
178     Type: OS::Heat::StructuredDeployment
179     Properties:
180       config: {Ref: NovaComputeConfig}
181       server: {Ref: NovaCompute0}
182       input_values:
183         nova_compute_driver: {Ref: NovaComputeDriver}
184         nova_compute_libvirt_type: {Ref: NovaComputeLibvirtType}
185         nova_dsn: {Ref: NovaDSN}
186         nova_api_host: {Ref: NovaApiHost}
187         nova_password: {Ref: NovaPassword}
188         ceilometer_dsn: {Ref: CeilometerDSN}
189         ceilometer_metering_secret: {Ref: CeilometerMeteringSecret}
190         ceilometer_password: {Ref: CeilometerPassword}
191         ceilometer_compute_agent: {Ref: CeilometerComputeAgent}
192         snmpd_readonly_user_name: {Ref: SnmpdReadonlyUserName}
193         snmpd_readonly_user_password: {Ref: SnmpdReadonlyUserPassword}
194         glance_host: {Ref: GlanceHost}
195         static_hosts: {Ref: StaticHosts}
196         keystone_host: {Ref: KeystoneHost}
197         neutron_flat_networks: {Ref: NeutronFlatNetworks}
198         neutron_host: {Ref: NeutronHost}
199         neutron_dsn: {Ref: NeutronDSN}
200         neutron_local_ip: {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ NovaCompute0, networks ]}]]}
201         neutron_tenant_network_type: {Ref: NeutronNetworkType}
202         neutron_network_vlan_ranges: {Ref: NeutronNetworkVLANRanges}
203         neutron_bridge_mappings: {Ref: NeutronBridgeMappings}
204         neutron_enable_tunneling: {Ref: NeutronEnableTunnelling}
205         neutron_physical_bridge: {Ref: NeutronPhysicalBridge}
206         neutron_public_interface: {Ref: NeutronPublicInterface}
207         neutron_password: {Ref: NeutronPassword}
208         admin_password: {Ref: AdminPassword}
209         rabbit_host: {Ref: RabbitHost}
210         rabbit_username: {Ref: RabbitUserName}
211         rabbit_password: {Ref: RabbitPassword}
212         live_update_host: {Ref: LiveUpdateHost}
213         live_update_username: {Ref: LiveUpdateUserName}
214         live_update_password: {Ref: LiveUpdatePassword}
215         live_update_tenant_name: {Ref: LiveUpdateTenantName}
216         nova_image: {Ref: NovaImage}
217         live_update_image_id: {Ref: LiveUpdateComputeImage}
218         ntp_server: {Ref: NtpServer}
219   NovaCompute0Passthrough:
220     Type: OS::Heat::StructuredDeployment
221     Properties:
222       config: {Ref: NovaComputePassthrough}
223       server: {Ref: NovaCompute0}
224       signal_transport: NO_SIGNAL
225       input_values:
226         passthrough_config: {Ref: ExtraConfig}