71e47ccc47206bdff4c9801ec22f179cbfa32f67
[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   KeystoneHost:
62     Type: String
63   NeutronFlatNetworks:
64     Type: String
65     Default: ''
66     Description: If set, flat networks to configure in neutron plugins.
67   NeutronHost:
68     Type: String
69   NeutronPhysicalBridge:
70     Default: ''
71     Description: An OVS bridge to create for accessing external networks.
72     Type: String
73   NeutronPublicInterface:
74     Default: ''
75     Description: A port to add to the NeutronPhysicalBridge.
76     Type: String
77   RabbitHost:
78     Type: String
79   RabbitUserName:
80     Type: String
81   RabbitPassword:
82     Type: String
83     NoEcho: true
84   CeilometerComputeAgent:
85     Description: Indicates whether the Compute agent is present and expects nova-compute to be configured accordingly
86     Type: String
87     Default: ''
88     AllowedValues: ['', Present]
89   CeilometerMeteringSecret:
90     Default: unset
91     Description: Secret shared by the ceilometer services.
92     Type: String
93     NoEcho: true
94   CeilometerPassword:
95     Default: unset
96     Description: The password for the ceilometer service account.
97     Type: String
98     NoEcho: true
99   NovaComputeDriver:
100     Type: String
101     Default: libvirt.LibvirtDriver
102   NovaComputeLibvirtType:
103     Type: String
104     Default: ''
105   NovaApiHost:
106     Type: String
107   NovaPassword:
108     Default: unset
109     Description: The password for the nova service account, used by nova-api.
110     Type: String
111     NoEcho: true
112   GlanceHost:
113     Type: String
114   CeilometerDSN:
115     Type: String
116   NovaDSN:
117     Type: String
118   NeutronDSN:
119     Type: String
120   NeutronBridgeMappings:
121     Type: String
122   NeutronNetworkVLANRanges:
123     Type: String
124   NeutronNetworkType:
125     Type: String
126   NeutronEnableTunnelling:
127     Type: String
128   StaticHosts:
129     Default: ''
130     Description: Static content to append to /etc/hosts
131     Type: String
132   LiveUpdateUserName:
133     Type: String
134     Description: The live-update username for the undercloud Glance API.
135     Default: ''
136   LiveUpdateTenantName:
137     Type: String
138     Description: The live-update tenant name for the undercloud Glance API.
139     Default: ''
140   LiveUpdateHost:
141     Type: String
142     Description: The IP address for the undercloud Glance API.
143     Default: ''
144   LiveUpdatePassword:
145     Type: String
146     Default: ''
147     Description: The live-update password for the undercloud Glance API.
148     NoEcho: true
149   LiveUpdateComputeImage:
150     Type: String
151     Description: The image ID for live-updates to the overcloud compute nodes.
152     Default: ''
153 Resources:
154   NovaCompute0:
155     Type: OS::Nova::Server
156     Properties:
157       image:
158         {Ref: NovaImage}
159       image_update_policy:
160         Ref: ImageUpdatePolicy
161       flavor: {Ref: OvercloudComputeFlavor}
162       key_name: {Ref: KeyName}
163       user_data_format: SOFTWARE_CONFIG
164   NovaCompute0Deploy:
165     Type: OS::Heat::StructuredDeployment
166     Properties:
167       config: {Ref: NovaComputeConfig}
168       server: {Ref: NovaCompute0}
169       input_values:
170         nova_compute_driver: {Ref: NovaComputeDriver}
171         nova_compute_libvirt_type: {Ref: NovaComputeLibvirtType}
172         nova_dsn: {Ref: NovaDSN}
173         nova_api_host: {Ref: NovaApiHost}
174         nova_password: {Ref: NovaPassword}
175         ceilometer_dsn: {Ref: CeilometerDSN}
176         ceilometer_metering_secret: {Ref: CeilometerMeteringSecret}
177         ceilometer_password: {Ref: CeilometerPassword}
178         ceilometer_compute_agent: {Ref: CeilometerComputeAgent}
179         glance_host: {Ref: GlanceHost}
180         static_hosts: {Ref: StaticHosts}
181         keystone_host: {Ref: KeystoneHost}
182         neutron_flat_networks: {Ref: NeutronFlatNetworks}
183         neutron_host: {Ref: NeutronHost}
184         neutron_dsn: {Ref: NeutronDSN}
185         neutron_local_ip: {"Fn::Select": [ 0, "Fn::Select": [ ctlplane, { "Fn::GetAtt": [ NovaCompute0, networks ]}]]}
186         neutron_tenant_network_type: {Ref: NeutronNetworkType}
187         neutron_network_vlan_ranges: {Ref: NeutronNetworkVLANRanges}
188         neutron_bridge_mappings: {Ref: NeutronBridgeMappings}
189         neutron_enable_tunneling: {Ref: NeutronEnableTunnelling}
190         neutron_physical_bridge: {Ref: NeutronPhysicalBridge}
191         neutron_public_interface: {Ref: NeutronPublicInterface}
192         neutron_password: {Ref: NeutronPassword}
193         admin_password: {Ref: AdminPassword}
194         rabbit_host: {Ref: RabbitHost}
195         rabbit_username: {Ref: RabbitUserName}
196         rabbit_password: {Ref: RabbitPassword}
197         live_update_host: {Ref: LiveUpdateHost}
198         live_update_username: {Ref: LiveUpdateUserName}
199         live_update_password: {Ref: LiveUpdatePassword}
200         live_update_tenant_name: {Ref: LiveUpdateTenantName}
201         nova_image: {Ref: NovaImage}
202         live_update_image_id: {Ref: LiveUpdateComputeImage}
203   NovaCompute0Passthrough:
204     Type: OS::Heat::StructuredDeployment
205     Properties:
206       config: {Ref: NovaComputePassthrough}
207       server: {Ref: NovaCompute0}
208       signal_transport: NO_SIGNAL
209       input_values:
210         passthrough_config: {Ref: ExtraConfig}