2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-21 11:12:04 +00:00

Genesis base based on Fedora 28

This commit is contained in:
Mark Gurevich 2021-10-14 16:52:10 -04:00
parent cdbb37e9c3
commit 3c643e6598
12 changed files with 28 additions and 11 deletions

View File

@ -1,13 +1,13 @@
xCAT Genesis Base
=================
xCAT ships a ``xCAT-genesis-base`` package as part of xcat-deps. This is a light-weight diskless linux image based currently on Fedora34, that is used by xCAT to do hardware discovery.
xCAT ships a ``xCAT-genesis-base`` package as part of xcat-deps. This is a light-weight diskless linux image based currently on Fedora28, that is used by xCAT to do hardware discovery.
To build your own version of the ``xCAT-genesis-base`` on-site using a server running OS other than Fedora34, like Red Hat Enterprise Linux 8, follow the steps below. Building ``xCAT-genesis-base`` on a server running Red Hat Enterprise Linux 7 or earlier, is no longer supported.
To build your own version of the ``xCAT-genesis-base`` on-site using a server running OS other than Fedora28, like Red Hat Enterprise Linux 8, follow the steps below. Building ``xCAT-genesis-base`` on a server running Red Hat Enterprise Linux 7 or earlier, is no longer supported.
1. Download the latest timestamp version of the ``xCAT-genesis-builder`` RPM provided here: http://xcat.org/files/xcat/xcat-dep/2.x_Linux/beta/
2. Install the ``xCAT-genesis-builder`` RPM on a node installed with desired OS (currently verified with Fedora34 and Red Hat Enterprise Linux 8). For more details: https://github.com/xcat2/xcat-core/tree/master/xCAT-genesis-builder#readme
2. Install the ``xCAT-genesis-builder`` RPM on a node installed with desired OS (currently verified with Fedora28 and Red Hat Enterprise Linux 8). For more details: https://github.com/xcat2/xcat-core/tree/master/xCAT-genesis-builder#readme
3. Build the ``xCAT-genesis-base`` RPM: ::

View File

@ -1,6 +1,6 @@
# xCAT-genesis-builder
`xCAT-genesis-builder` is a utility for building base initrd images for deploying diskless nodes in your cluster for discovery. This tool is required only if you have the intention of building your own version of `xCAT-genesis-base` RPM which is available in `xcat-dep` (latest version was built on Fedora34).
`xCAT-genesis-builder` is a utility for building base initrd images for deploying diskless nodes in your cluster for discovery. This tool is required only if you have the intention of building your own version of `xCAT-genesis-base` RPM which is available in `xcat-dep` (latest version was built on Fedora28).
# Background
@ -19,7 +19,7 @@ that support the Red Hat Package Manager (rpm) development tools. The script `b
attempt to install some of these core packages if they are not already present.
## Instructions for buiding `xCAT-genesis-builder` RPM
Latest version 2.16.3 of `xCAT-genesis-builder` RPM available at https://www.xcat.org/files/xcat/xcat-dep/2.x_Linux/beta and was verified to install and run on Fedora34 and Red Hat 8. Earlier version 2.14.5 of `xCAT-genesis-builder` RPM available at https://www.xcat.org/files/xcat/xcat-dep/2.x_Linux/beta and was verified to install and run on Fedora26 and Red Hat 7.
Latest version 2.16.3 of `xCAT-genesis-builder` RPM available at https://www.xcat.org/files/xcat/xcat-dep/2.x_Linux/beta and was verified to install and run on Fedora28 and Red Hat 8. Earlier version 2.14.5 of `xCAT-genesis-builder` RPM available at https://www.xcat.org/files/xcat/xcat-dep/2.x_Linux/beta and was verified to install and run on Fedora26 and Red Hat 7.
If a new version of `xCAT-genesis-builder` RPM needs to be built:
1. Clone `xcat-core` git repository:

View File

@ -5,7 +5,7 @@
# this whole dir into it somewhere (like /tmp).
# Then run this script. The optional 1st arg should be mcp if you are building against mcp.
# Currently, *Fedora 34* and *RedHat 8* are the only OSes supported to build genesis-base for ppc64, and Centos 6.5 for x86_64
# Currently, *Fedora 28* and *RedHat 8* are the only OSes supported to build genesis-base for ppc64, and Centos 6.5 for x86_64
HOSTOS="$1"
DIR=`dirname $0`

View File

@ -12,8 +12,6 @@ Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
%endif
BuildArch: noarch
%define name xCAT-genesis-base-%{tarch}
# Use xz compression instead of default gzip on Fedora34
%define _binary_payload w7.xzdio
%define __spec_install_post :
%define debug_package %{nil}
%define __prelink_undo_cmd %{nil}

View File

@ -4,7 +4,7 @@ Version: %{?version:%{version}}%{!?version:%(cat Version)}
Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 1
AutoReq: false
Requires: ipmitool screen lldpad rpm-build mstflint xfsprogs nc rpmdevtools libstdc++-devel pciutils bridge-utils iprutils psmisc mdadm bind-utils dosfstools usbutils libusbx bc rpmdevtools
Requires: ipmitool screen lldpad rpm-build mstflint xfsprogs nc rpmdevtools libstdc++-devel pciutils bridge-utils iprutils psmisc mdadm bind-utils dosfstools usbutils libusbx bc rpmdevtools rng-tools
Prefix: /opt/xcat
AutoProv: false

View File

@ -58,6 +58,11 @@ if [[ ${ARCH} =~ ppc64 ]]; then
modprobe `basename $line`
fi
done
# Check if running on a VM, and load "virtio_pci" module
cat /proc/cpuinfo | grep "machine" | grep "emulated"
if [ $? -eq 0 ]; then
modprobe virtio_pci
fi
waittime=2
ALL_NICS=$(ip link show | grep -v "^ " | awk '{print $2}' | sed -e 's/:$//' | grep -v lo)
for tmp in $ALL_NICS; do

View File

@ -2138,7 +2138,7 @@ sub copycd
{
# Attempt to auto-detect for Fedora OS, the first element
# (after " ") has typically been the version
# ex: Fedora 34
# ex: Fedora 28
#
my @fedora_version = split /[- ]/, $desc;
$distname = "fedora" . $fedora_version[1];

View File

@ -0,0 +1,11 @@
#Please make sure there is a space between @ and group name
wget
vim-minimal
nfs-utils
rsync
net-tools
openssh-server
util-linux-ng
rsyslog
openssl
rng-tools

View File

@ -0,0 +1 @@
../rh/compute.rhels8.tmpl

View File

@ -0,0 +1 @@
compute.fedora14.pkglist

View File

@ -0,0 +1 @@
../rh/dracut_047/

View File

@ -254,7 +254,6 @@ sub rungenesisimg {
#########################################
sub testxdsh {
my $value = shift;
send_msg(2, "The input parameter for testxdsh() is $value \n");
my $checkstring;
my $checkfile;
my $nodestatus;
@ -273,6 +272,7 @@ sub testxdsh {
return 1;
}
send_msg(2, "Node $noderange has been installed with genesis shell. Checking $checkfile file on that node contains '$checkstring' \n");
my $xdsh_command="xdsh $noderange -t 2 cat $checkfile 2>&1|grep $checkstring";
if (($value == 1) || ($value == 2) || ($value == 3)) {
`$xdsh_command`;