Adding OFED drivers installation

1. adding OFED pre req to CentOS if mlnx enabled
2. adding OFED installation at kickstart postinstall
3. adding OFED pre req to Ubuntu if mlnx enabled
4. adding OFED installation to preseed late command

partially implements: blueprint mellanox-features-support
Signed-off-by: Moshe Levi <moshele@mellanox.com>

Change-Id: I10d1e26aff99f6d6360a6de6f1f385d1c28157d9
This commit is contained in:
Aviram Bar-Haim 2014-06-17 23:53:15 +03:00 committed by Moshe Levi
parent 967c047bf5
commit 111216618e
6 changed files with 52 additions and 0 deletions

View File

@ -59,6 +59,7 @@ class cobbler::snippets {
cobbler_snippet {"centos_authorized_keys": }
cobbler_snippet {"centos_blacklist_i2c_piix4":}
cobbler_snippet {"centos_static_net":}
cobbler_snippet {"ofed_install_with_sriov":}
cobbler_snippet {"ubuntu_authorized_keys":}
cobbler_snippet {"ubuntu_blacklist_i2c_piix4":}
cobbler_snippet {"ubuntu_disable_pxe":}
@ -73,6 +74,7 @@ class cobbler::snippets {
cobbler_snippet {"anaconda_ssh_console":}
cobbler_snippet {'centos_post_kernel_lt_if_enabled':}
cobbler_snippet {'centos_pkg_kernel_lt_if_enabled':}
cobbler_snippet {'centos_ofed_prereq_pkgs_if_enabled':}
case $operatingsystem {
/(?i)(debian|ubuntu)/: {

View File

@ -131,6 +131,10 @@ perl
daemonize
rsync
# COBBLER EMBEDDED SNIPPET: 'centos_ofed_prereq_pkgs_if_enabled'
# LISTS ofed prereq PACKAGES IF mlnx_plugin_mode VARIABLE IS SET TO enabled
$SNIPPET('centos_ofed_prereq_pkgs_if_enabled')
# COBBLER EMBEDDED SNIPPET: 'puppet_install_if_enabled'
# LISTS puppet PACKAGE IF puppet_auto_setup VARIABLE IS SET TO 1
$SNIPPET('puppet_install_if_enabled')
@ -252,6 +256,9 @@ $SNIPPET('centos_static_net')
# Blacklist i2c_piix4 module so it does not create kernel errors
$SNIPPET('centos_blacklist_i2c_piix4')
# Install OFED components for RDMA if needed
$SNIPPET('ofed_install_with_sriov')
# COBBLER EMBEDDED SNIPPET: 'kickstart_done'
# DISABLES PXE BOOTING
$SNIPPET('kickstart_done')

View File

@ -128,6 +128,7 @@ echo "UseDNS no" >> /target/etc/ssh/sshd_config && \
in-target apt-get -y install linux-image-3.11 linux-headers-3.11 && \
$SNIPPET('ubuntu_blacklist_i2c_piix4')
$SNIPPET('ubuntu_static_net')
$SNIPPET('ofed_install_with_sriov')
# Rsyslogd should send all messages to master node
$SNIPPET('target_logs_to_master_ubuntu')
true

View File

@ -0,0 +1,5 @@
#set mlnx_mode=$getVar('mlnx_plugin_mode','disabled')
#if $mlnx_mode != "disabled"
mlnx-ofed-light
#end if

View File

@ -0,0 +1,32 @@
#set mlnx_mode=$getVar('mlnx_plugin_mode','disabled')
#set iser_enabled=$getVar('mlnx_iser_enabled','false')
#if $mlnx_mode != "disabled" or $iser_enabled == 'true'
#set ofed_install_cmd="/usr/bin/perl /opt/ofed/MLNX_OFED_light/mlnxofedinstall -q --enable-sriov"
#if $breed == "redhat"
$ofed_install_cmd
#elif $breed == "debian" or $breed == "ubuntu"
in-target $ofed_install_cmd && \
#end if
#set $mlnx_opt = "options mlx4_core port_type_array=2,2"
#if $mlnx_mode in ("ethernet") or $iser_enabled == 'true'
#set $vf_num = $getVar('mlnx_vf_num','1')
#set $mlnx_opt += " num_vfs=%s enable_64b_cqe_eqe=0 log_num_mgm_entry_size=-1" % ($vf_num)
#end if
#if $iser_enabled == 'true'
#set $mlnx_opt += " probe_vf=1"
#end if
#set mlnx4_core_file="/etc/modprobe.d/mlx4_core.conf"
#if $breed == "debian" or $breed == "ubuntu"
#set mlnx4_core_file = "/target" + $mlnx4_core_file + " && \\"
#end if
#set mlnx_option_cmd="echo -e \"%s\" > %s" % ($mlnx_opt, $mlnx4_core_file)
$mlnx_option_cmd
#end if

View File

@ -5,4 +5,9 @@
#silent $pkgsel_packages.append("mcollective")
#end if
#set mlnx_mode=$getVar('mlnx_plugin_mode','disabled')
#if $mlnx_mode != "disabled"
#silent $pkgsel_packages.append("mlnx-ofed-light")
#end if
d-i pkgsel/include string #echo " ".join($pkgsel_packages)