Merge "Add Bare Metal Operator Ironic config files"
This commit is contained in:
commit
8fa2d4b45b
@ -0,0 +1,7 @@
|
|||||||
|
DELETE FROM mysql.user ;
|
||||||
|
CREATE USER 'ironic'@'localhost' identified by '$(MARIADB_PASSWORD)' ;
|
||||||
|
GRANT ALL on *.* TO 'ironic'@'localhost' WITH GRANT OPTION ;
|
||||||
|
DROP DATABASE IF EXISTS test ;
|
||||||
|
CREATE DATABASE IF NOT EXISTS ironic ;
|
||||||
|
FLUSH PRIVILEGES ;
|
||||||
|
|
@ -0,0 +1,29 @@
|
|||||||
|
interface=$(PROVISIONING_INTERFACE)
|
||||||
|
bind-dynamic
|
||||||
|
log-dhcp
|
||||||
|
enable-tftp
|
||||||
|
tftp-root=/shared/tftpboot
|
||||||
|
|
||||||
|
# Disable listening for DNS
|
||||||
|
port=0
|
||||||
|
|
||||||
|
dhcp-range=$(DHCP_RANGE)
|
||||||
|
|
||||||
|
# Disable default router(s) and DNS over provisioning network
|
||||||
|
dhcp-option=3
|
||||||
|
dhcp-option=6
|
||||||
|
|
||||||
|
# IPv4 Configuration:
|
||||||
|
dhcp-match=ipxe,175
|
||||||
|
# Client is already running iPXE; move to next stage of chainloading
|
||||||
|
dhcp-boot=tag:ipxe,http://$(PROVISIONING_IP):80/dualboot.ipxe
|
||||||
|
|
||||||
|
# Note: Need to test EFI booting
|
||||||
|
dhcp-match=set:efi,option:client-arch,7
|
||||||
|
dhcp-match=set:efi,option:client-arch,9
|
||||||
|
dhcp-match=set:efi,option:client-arch,11
|
||||||
|
# Client is PXE booting over EFI without iPXE ROM; send EFI version of iPXE chainloader
|
||||||
|
dhcp-boot=tag:efi,tag:!ipxe,ipxe.efi
|
||||||
|
|
||||||
|
# Client is running PXE over BIOS; send BIOS version of iPXE chainloader
|
||||||
|
dhcp-boot=/undionly.kpxe,$(PROVISIONING_IP)
|
@ -0,0 +1,22 @@
|
|||||||
|
#!ipxe
|
||||||
|
|
||||||
|
# NOTE(lucasagomes): Loop over all network devices and boot from
|
||||||
|
# the first one capable of booting. For more information see:
|
||||||
|
# https://bugs.launchpad.net/ironic/+bug/1504482
|
||||||
|
set netid:int32 -1
|
||||||
|
:loop
|
||||||
|
inc netid
|
||||||
|
isset ${net${netid}/mac} || chain pxelinux.cfg/${mac:hexhyp} || goto inspector
|
||||||
|
echo Attempting to boot from MAC ${net${netid}/mac:hexhyp}
|
||||||
|
chain pxelinux.cfg/${net${netid}/mac:hexhyp} || goto loop
|
||||||
|
|
||||||
|
# If no networks configured to boot then introspect first valid one
|
||||||
|
:inspector
|
||||||
|
chain inspector.ipxe || goto loop_done
|
||||||
|
|
||||||
|
:loop_done
|
||||||
|
echo PXE boot failed! No configuration found for any of the present NICs
|
||||||
|
echo and could not find inspector.ipxe to use as fallback.
|
||||||
|
echo Press any key to reboot...
|
||||||
|
prompt --timeout 180
|
||||||
|
reboot
|
58
manifests/function/baremetal-operator/config-file/httpd.conf
Normal file
58
manifests/function/baremetal-operator/config-file/httpd.conf
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
ServerRoot "/etc/httpd"
|
||||||
|
Listen [::]:80
|
||||||
|
Include conf.modules.d/*.conf
|
||||||
|
User apache
|
||||||
|
Group apache
|
||||||
|
ServerAdmin root@localhost
|
||||||
|
<Directory />
|
||||||
|
AllowOverride none
|
||||||
|
Require all denied
|
||||||
|
</Directory>
|
||||||
|
DocumentRoot "/shared/html"
|
||||||
|
<Directory "/shared">
|
||||||
|
AllowOverride None
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
<Directory "/shared/html">
|
||||||
|
Options Indexes FollowSymLinks
|
||||||
|
AllowOverride None
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
<IfModule dir_module>
|
||||||
|
DirectoryIndex index.html
|
||||||
|
</IfModule>
|
||||||
|
<Files ".ht*">
|
||||||
|
Require all denied
|
||||||
|
</Files>
|
||||||
|
ErrorLog /dev/stderr
|
||||||
|
LogLevel warn
|
||||||
|
<IfModule log_config_module>
|
||||||
|
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined
|
||||||
|
LogFormat "%h %l %u %t \"%r\" %>s %b" common
|
||||||
|
<IfModule logio_module>
|
||||||
|
# You need to enable mod_logio.c to use %I and %O
|
||||||
|
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio
|
||||||
|
</IfModule>
|
||||||
|
CustomLog /dev/stderr combined
|
||||||
|
</IfModule>
|
||||||
|
<IfModule alias_module>
|
||||||
|
ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"
|
||||||
|
</IfModule>
|
||||||
|
<Directory "/var/www/cgi-bin">
|
||||||
|
AllowOverride None
|
||||||
|
Options None
|
||||||
|
Require all granted
|
||||||
|
</Directory>
|
||||||
|
<IfModule mime_module>
|
||||||
|
TypesConfig /etc/mime.types
|
||||||
|
AddType application/x-compress .Z
|
||||||
|
AddType application/x-gzip .gz .tgz
|
||||||
|
AddType text/html .shtml
|
||||||
|
AddOutputFilter INCLUDES .shtml
|
||||||
|
</IfModule>
|
||||||
|
AddDefaultCharset UTF-8
|
||||||
|
<IfModule mime_magic_module>
|
||||||
|
MIMEMagicFile conf/magic
|
||||||
|
</IfModule>
|
||||||
|
EnableSendfile on
|
||||||
|
IncludeOptional conf.d/*.conf
|
@ -0,0 +1,26 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
auth_strategy = noauth
|
||||||
|
debug = true
|
||||||
|
transport_url = fake://
|
||||||
|
use_stderr = true
|
||||||
|
listen_address = ::
|
||||||
|
[database]
|
||||||
|
connection = sqlite:///var/lib/ironic-inspector/ironic-inspector.db
|
||||||
|
[discovery]
|
||||||
|
enroll_node_driver = ipmi
|
||||||
|
[ironic]
|
||||||
|
auth_type = none
|
||||||
|
endpoint_override = http://$(PROVISIONING_IP):6385
|
||||||
|
[processing]
|
||||||
|
always_store_ramdisk_logs = true
|
||||||
|
node_not_found_hook = enroll
|
||||||
|
permit_active_introspection = true
|
||||||
|
power_off = false
|
||||||
|
processing_hooks = $default_processing_hooks,extra_hardware,lldp_basic
|
||||||
|
ramdisk_logs_dir = /shared/log/ironic-inspector/ramdisk
|
||||||
|
store_data = database
|
||||||
|
[pxe_filter]
|
||||||
|
driver = noop
|
||||||
|
[service_catalog]
|
||||||
|
auth_type = none
|
||||||
|
endpoint_override = http://$(PROVISIONING_IP):5050
|
@ -0,0 +1,9 @@
|
|||||||
|
#!ipxe
|
||||||
|
|
||||||
|
:retry_boot
|
||||||
|
echo In inspector.ipxe
|
||||||
|
imgfree
|
||||||
|
# NOTE(dtantsur): keep inspection kernel params in [mdns]params in ironic-inspector-image
|
||||||
|
kernel --timeout 60000 http://$(PROVISIONING_IP):80/images/ironic-python-agent.kernel ipa-inspection-callback-url=http://$(PROVISIONING_IP):5050/v1/continue ipa-inspection-collectors=default,extra-hardware,logs systemd.journald.forward_to_console=yes BOOTIF=${mac} ipa-debug=1 ipa-inspection-dhcp-all-interfaces=1 ipa-collect-lldp=1 initrd=ironic-python-agent.initramfs || goto retry_boot
|
||||||
|
initrd --timeout 60000 http://$(PROVISIONING_IP):80/images/ironic-python-agent.initramfs || goto retry_boot
|
||||||
|
boot
|
@ -0,0 +1,57 @@
|
|||||||
|
[DEFAULT]
|
||||||
|
auth_strategy = noauth
|
||||||
|
my_ip = $(PROVISIONING_IP)
|
||||||
|
debug = true
|
||||||
|
default_boot_interface = ipxe
|
||||||
|
default_deploy_interface = direct
|
||||||
|
default_inspect_interface = inspector
|
||||||
|
default_network_interface = noop
|
||||||
|
enabled_boot_interfaces = pxe,ipxe,fake,redfish-virtual-media
|
||||||
|
enabled_deploy_interfaces = direct,fake
|
||||||
|
enabled_hardware_types = ipmi,idrac,irmc,fake-hardware,redfish
|
||||||
|
enabled_inspect_interfaces = inspector,idrac,irmc,fake,redfish
|
||||||
|
enabled_management_interfaces = ipmitool,idrac,irmc,fake,redfish,idrac-redfish
|
||||||
|
enabled_power_interfaces = ipmitool,idrac,irmc,fake,redfish,idrac-redfish
|
||||||
|
enabled_raid_interfaces = no-raid,irmc,agent,fake
|
||||||
|
enabled_vendor_interfaces = ipmitool,no-vendor,idrac,fake
|
||||||
|
rpc_transport = json-rpc
|
||||||
|
use_stderr = true
|
||||||
|
[agent]
|
||||||
|
deploy_logs_collect = always
|
||||||
|
deploy_logs_local_path = /shared/log/ironic/deploy
|
||||||
|
[api]
|
||||||
|
host_ip = ::
|
||||||
|
api_workers = $(API_WORKERS)
|
||||||
|
[conductor]
|
||||||
|
automated_clean = $(AUTOMATED_CLEAN)
|
||||||
|
send_sensor_data = true
|
||||||
|
send_sensor_data_interval = 160
|
||||||
|
api_url = http://$(PROVISIONING_IP):6385
|
||||||
|
bootloader = http://$(PROVISIONING_IP):80/uefi_esp.img
|
||||||
|
[database]
|
||||||
|
connection = mysql+pymysql://ironic:$(MARIADB_PASSWORD)@localhost/ironic?charset=utf8
|
||||||
|
[deploy]
|
||||||
|
default_boot_option = local
|
||||||
|
erase_devices_metadata_priority = 10
|
||||||
|
erase_devices_priority = 0
|
||||||
|
http_root = /shared/html/
|
||||||
|
http_url = http://$(PROVISIONING_IP):80
|
||||||
|
fast_track = $(FAST_TRACK)
|
||||||
|
[dhcp]
|
||||||
|
dhcp_provider = none
|
||||||
|
[inspector]
|
||||||
|
endpoint_override = http://$(PROVISIONING_IP):5050
|
||||||
|
[oslo_messaging_notifications]
|
||||||
|
driver = prometheus_exporter
|
||||||
|
location = /shared/ironic_prometheus_exporter
|
||||||
|
transport_url = fake://
|
||||||
|
[pxe]
|
||||||
|
images_path = /shared/html/tmp
|
||||||
|
instance_master_path = /shared/html/master_images
|
||||||
|
ipxe_enabled = true
|
||||||
|
pxe_config_template = $pybasedir/drivers/modules/ipxe_config.template
|
||||||
|
tftp_master_path = /shared/tftpboot
|
||||||
|
tftp_root = /shared/tftpboot
|
||||||
|
uefi_pxe_config_template = $pybasedir/drivers/modules/ipxe_config.template
|
||||||
|
[redfish]
|
||||||
|
use_swift = false
|
@ -0,0 +1,14 @@
|
|||||||
|
generatorOptions:
|
||||||
|
disableNameSuffixHash: true
|
||||||
|
|
||||||
|
configMapGenerator:
|
||||||
|
- name: ironic-config-files
|
||||||
|
files:
|
||||||
|
- dnsmasq.conf
|
||||||
|
- dualboot.ipxe
|
||||||
|
- httpd.conf
|
||||||
|
- inspector.conf
|
||||||
|
- inspector.ipxe
|
||||||
|
- ironic.conf
|
||||||
|
- my.cnf
|
||||||
|
- configure-mysql.sql
|
19
manifests/function/baremetal-operator/config-file/my.cnf
Normal file
19
manifests/function/baremetal-operator/config-file/my.cnf
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
[server]
|
||||||
|
|
||||||
|
[mysqld]
|
||||||
|
datadir=/var/lib/mysql
|
||||||
|
socket=/var/lib/mysql/mysql.sock
|
||||||
|
log-error=/var/log/mariadb/mariadb.log
|
||||||
|
pid-file=/run/mariadb/mariadb.pid
|
||||||
|
max_connections = 64
|
||||||
|
max_heap_table_size = 1M
|
||||||
|
innodb_buffer_pool_size = 5M
|
||||||
|
innodb_log_buffer_size = 512K
|
||||||
|
|
||||||
|
[galera]
|
||||||
|
|
||||||
|
[embedded]
|
||||||
|
|
||||||
|
[mariadb]
|
||||||
|
|
||||||
|
[mariadb-10.3]
|
@ -1,5 +1,6 @@
|
|||||||
resources:
|
resources:
|
||||||
- ../../global/crd/baremetal-operator
|
- ../../global/crd/baremetal-operator
|
||||||
|
- config-file
|
||||||
- rbac
|
- rbac
|
||||||
- operator.yaml
|
- operator.yaml
|
||||||
- namespace.yaml
|
- namespace.yaml
|
||||||
|
Loading…
x
Reference in New Issue
Block a user