/
ironic.conf.j2
254 lines (226 loc) · 7.85 KB
/
ironic.conf.j2
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
# {{ ansible_managed }}
[DEFAULT]
debug = {{ ironic_debug | bool }}
# NOTE(TheJulia): Until Bifrost supports neutron or some other network
# configuration besides a flat network where bifrost orchestrates the
# control instead of ironic, noop is the only available network driver.
enabled_network_interfaces = noop
default_deploy_interface = {{ default_deploy_interface }}
{% if enable_inspector | bool == true %}
enabled_inspect_interfaces = no-inspect,inspector,agent
default_inspect_interface = inspector
{% else %}
enabled_inspect_interfaces = no-inspect,agent
default_inspect_interface = agent
{% endif %}
enabled_bios_interfaces = {{ enabled_bios_interfaces }}
enabled_boot_interfaces = {{ enabled_boot_interfaces }}
enabled_management_interfaces = {{ enabled_management_interfaces }}
enabled_power_interfaces = {{ enabled_power_interfaces }}
enabled_deploy_interfaces = {{ enabled_deploy_interfaces }}
enabled_raid_interfaces = {{ enabled_raid_interfaces }}
enabled_vendor_interfaces = {{ enabled_vendor_interfaces }}
enabled_hardware_types = {{ enabled_hardware_types }}
{% if default_boot_interface is defined %}
default_boot_interface = {{ default_boot_interface }}
{% endif %}
default_resource_class = {{ default_resource_class }}
{% if expose_json_rpc | bool %}
rpc_transport = json-rpc
{% else %}
rpc_transport = none
{% endif %}
{% if enable_keystone | bool %}
auth_strategy = keystone
{% elif noauth_mode | bool %}
auth_strategy = noauth
{% else %}
auth_strategy = http_basic
http_basic_auth_user_file = /etc/ironic/htpasswd
{% endif %}
{% if ironic_log_dir | default("") != "" %}
log_dir = {{ ironic_log_dir }}
{% endif %}
isolinux_bin = {{ isolinux_bin_path }}
grub_config_path = EFI/{{ efi_distro }}/grub.cfg
{% if enable_tls | bool %}
[api]
# TLS is handled by nginx is proxy mode
host_ip = 127.0.0.1
public_endpoint = {{ api_protocol }}://{{ internal_ip }}:6385
unix_socket = /run/ironic/ironic.socket
# Nginx should be able to write to the socket, access will be further limited
# by the containing directory.
unix_socket_mode = 0660
{% if expose_json_rpc | bool %}
[ssl]
# Only used for JSON RPC when expose_json_rpc is true
cert_file = {{ tls_certificate_path }}
key_file = {{ ironic_private_key_path }}
{% endif %}
{% endif %}
[agent]
{% if ironic_store_ramdisk_logs | bool %}
deploy_logs_collect = always
{% endif %}
{% if ironic_agent_deploy_logs_local_path | default("") != "" %}
deploy_logs_local_path = {{ ironic_agent_deploy_logs_local_path }}
{% endif %}
[pxe]
kernel_append_params = {{ pxe_kernel_params }}
tftp_server = {{ internal_ip }}
tftp_root = {{ tftp_boot_folder }}
ipxe_fallback_script = pxelinux.cfg/default
tftp_master_path = {{ ironic_tftp_master_path }}
{% if 'ipxe' in enabled_boot_interfaces.split(',') %}
uefi_ipxe_bootfile_name = {{ ipxe_efi_binary }}
{% endif %}
enable_netboot_fallback = true
[deploy]
http_url = http://{{ internal_ip }}:{{ file_url_port }}/
http_root = {{ http_boot_folder }}
default_boot_option = local
default_boot_mode = {{ default_boot_mode }}
fast_track = {{ fast_track }}
{% if cleaning_disk_erase | bool %}
erase_devices_priority = 10
erase_devices_metadata_priority = 0
{% else %}
erase_devices_priority = 0
erase_devices_metadata_priority = 10
{% endif %}
{% if vmedia_enable_tls | bool %}
external_http_url = https://{{ internal_ip }}:{{ file_url_port_tls }}/
{% endif %}
[conductor]
automated_clean = {{ cleaning | lower }}
deploy_kernel = {{ ipa_kernel_url }}
deploy_ramdisk = {{ ipa_ramdisk_url }}
rescue_kernel = {{ ipa_kernel_url }}
rescue_ramdisk = {{ ipa_ramdisk_url }}
bootloader = {{ esp_image_url }}
{% if enable_prometheus_exporter | bool %}
send_sensor_data = true
send_sensor_data_for_undeployed_nodes = {{ sensor_data_undeployed_nodes }}
send_sensor_data_interval = {{ sensor_data_interval }}
{% endif %}
[database]
connection = mysql+pymysql://{{ ironic.database.username }}:{{ ironic.database.password }}@{{ ironic.database.host }}/{{ ironic.database.name }}?charset=utf8
[dhcp]
dhcp_provider = {{ dhcp_provider }}
{% if dhcp_provider == 'dnsmasq' %}
[dnsmasq]
dhcp_hostsdir = {{ dnsmasq_dhcp_hostsdir }}
dhcp_optsdir = {{ dnsmasq_dhcp_optsdir }}
leases_file = {{ dnsmasq_leases_file }}
{% endif %}
{% if enable_cors | bool == true %}
[cors]
allowed_origin = {{ cors_allowed_origin | default('allowed_origin=http://localhost:8000') }}
allow_credentials = {{ enable_cors_credential_support | default('true') }}
{% endif %}
[ipmi]
debug = {{ ironic_debug | bool and testing | bool }}
[ilo]
use_web_server_for_images = true
kernel_append_params = {{ ilo_kernel_params }}
[redfish]
use_swift = False
kernel_append_params = {{ redfish_kernel_params }}
[inspector]
power_off = {{ power_off_after_inspection }}
extra_kernel_params = {{ inspector_extra_kernel_options | default('') }}
require_managed_boot = False
add_ports = {{ inspector_port_addition | default('pxe') }}
keep_ports = {{ inspector_keep_ports | default('present') }}
{% if enable_inspector | bool %}
{% if enable_keystone | bool %}
auth_type = password
auth_url = {{ ironic.service_catalog.auth_url }}
username = {{ ironic.service_catalog.username }}
password = {{ ironic.service_catalog.password }}
user_domain_id = default
project_name = {{ ironic.service_catalog.project_name }}
project_domain_id = default
region_name = {{ keystone.bootstrap.region_name | default('RegionOne')}}
# NOTE(dtantsur): this has to be on internal IP even if public IPs are used
callback_endpoint_override = {{ api_protocol }}://{{ internal_ip }}:5050
{% elif noauth_mode | bool %}
auth_type=none
endpoint_override = {{ ironic_inspector_api_url }}
{% else %}
auth_type = http_basic
endpoint_override = {{ ironic_inspector_api_url }}
username = {{ admin_username }}
password = {{ admin_password }}
{% endif %}
{% if enable_tls | bool %}
cafile = {{ tls_certificate_path }}
{% endif %}
{% endif %}
[auto_discovery]
enabled = {{ enable_inspector_discovery | bool }}
driver = {{ inspector_default_node_driver }}
{% if enable_keystone is defined and enable_keystone | bool == true %}
[keystone_authtoken]
auth_plugin = password
auth_url = {{ ironic.service_catalog.auth_url }}
username = {{ ironic.service_catalog.username }}
password = {{ ironic.service_catalog.password }}
user_domain_id = default
project_name = {{ ironic.service_catalog.project_name }}
project_domain_id = default
{% if enable_tls | bool %}
cafile = {{ tls_certificate_path }}
{% endif %}
{% endif %}
[service_catalog]
{% if enable_keystone | bool %}
auth_url = {{ ironic.service_catalog.auth_url }}
auth_type = password
project_name = {{ ironic.service_catalog.project_name }}
username = {{ ironic.service_catalog.username }}
password = {{ ironic.service_catalog.password }}
user_domain_id = default
project_domain_id = default
region_name = {{ keystone.bootstrap.region_name | default('RegionOne')}}
{% elif noauth_mode | bool %}
auth_type = none
{% else %}
auth_type = http_basic
username = {{ admin_username }}
password = {{ admin_password }}
{% endif %}
# NOTE(dtantsur): this has to be on internal IP even if public IPs are used
endpoint_override = {{ api_protocol }}://{{ internal_ip }}:6385
{% if expose_json_rpc | bool %}
[json_rpc]
{% if enable_tls | bool %}
cafile = {{ tls_certificate_path }}
use_ssl = True
{% endif %}
{% if enable_keystone | bool %}
auth_strategy = keystone
auth_url = {{ ironic.service_catalog.auth_url }}
auth_type = password
project_name = {{ ironic.service_catalog.project_name }}
username = {{ ironic.service_catalog.username }}
password = {{ ironic.service_catalog.password }}
user_domain_id = default
project_domain_id = default
{% elif not supports_http_auth | bool %}
auth_strategy = noauth
{% else %}
auth_strategy = http_basic
auth_type = http_basic
http_basic_auth_user_file = /etc/ironic/htpasswd
username = {{ admin_username }}
password = {{ admin_password }}
{% endif %}
{% endif %}
{% if enable_prometheus_exporter | bool %}
[oslo_messaging_notifications]
driver = prometheus_exporter
transport_url = fake://
location = {{ prometheus_exporter_data_dir }}
{% endif %}