From 38f8b9f565a0e22857bbd5701658493c18b4536c Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 19 Nov 2007 19:45:11 +0000 Subject: [PATCH] Install to iSCSI target via software initiator beginnings. Other half involves uploading the final kernel and initrd to the netboot server. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@61 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT-2.0/xCAT/Schema.pm | 4 + perl-xCAT-2.0/xCAT/Template.pm | 5 +- .../usr/share/xcat/install/rh/iscsi.tmpl | 183 ++++++++++++++++++ 3 files changed, 190 insertions(+), 2 deletions(-) create mode 100644 xCAT-server-2.0/usr/share/xcat/install/rh/iscsi.tmpl diff --git a/perl-xCAT-2.0/xCAT/Schema.pm b/perl-xCAT-2.0/xCAT/Schema.pm index e2a38edd3..9c961ba0a 100644 --- a/perl-xCAT-2.0/xCAT/Schema.pm +++ b/perl-xCAT-2.0/xCAT/Schema.pm @@ -25,6 +25,10 @@ package xCAT::Schema; cols => [qw(node rack u chassis slot room comments disable)], keys => [qw(node)], }, + iscsi => { + cols => [qw(node server target userid passwd comments disable)], + keys => [qw(node)], + }, vpd => { cols => [qw(node serial mtm comments disable)], keys => [qw(node)], diff --git a/perl-xCAT-2.0/xCAT/Template.pm b/perl-xCAT-2.0/xCAT/Template.pm index fcad4447f..759b39c86 100755 --- a/perl-xCAT-2.0/xCAT/Template.pm +++ b/perl-xCAT-2.0/xCAT/Template.pm @@ -162,8 +162,9 @@ sub tabdb ($ent) = $tabh->getAttribs(\%kp,$field); } $tabh->close; - unless($ent and $ent->{$field}) { - return "#TABLEBAD:$table:field $field not found#"; + unless($ent and defined($ent->{$field})) { + return ""; + #return "#TABLEBAD:$table:field $field not found#"; } return $ent->{$field}; diff --git a/xCAT-server-2.0/usr/share/xcat/install/rh/iscsi.tmpl b/xCAT-server-2.0/usr/share/xcat/install/rh/iscsi.tmpl new file mode 100644 index 000000000..6e17514f0 --- /dev/null +++ b/xCAT-server-2.0/usr/share/xcat/install/rh/iscsi.tmpl @@ -0,0 +1,183 @@ +#RedHat Enterprise Linux 4 AS Only +#egan@us.ibm.com +# + +lang en_US +langsupport en_US +network --bootproto dhcp + +# +# Where's the source? +# nfs --server hostname.of.server or IP --dir /path/to/RH/CD/image +# +#nfs --server #XCATVAR:INSTALL_NFS# --dir #XCATVAR:INSTALL_SRC_DIR# +url --url http://#TABLE:noderes:$NODE:nfsserver#/install/#TABLE:nodetype:$NODE:os#/#TABLE:nodetype:$NODE:arch# + +#device ethernet e100 +keyboard "us" + +# +# Clear the MBR +# +zerombr yes + +# +# Wipe out the disk +# +clearpart --all --initlabel +#clearpart --linux +key --skip + +# +# Customize to fit your needs +# + +iscsiname #TABLE:nodelist:$NODE:node# +iscsi --ipaddr #TABLE:iscsi:$NODE:server# --user "#TABLE:iscsi:$NODE:userid#" --password "#TABLE:iscsi:$NODE:passwd#" + +#No RAID +#/boot really significant for this sort of setup nowadays? +#part /boot --size 50 --fstype ext3 +part swap --size 1024 +part / --size 1 --grow --fstype ext3 + +#RAID 0 /scr for performance +#part / --size 1024 --ondisk sda +#part swap --size 512 --ondisk sda +#part /var --size 1024 --ondisk sdb +#part swap --size 512 --ondisk sdb +#part raid.01 --size 1 --grow --ondisk sda +#part raid.02 --size 1 --grow --ondisk sdb +#raid /scr --level 0 --device md0 raid.01 raid.02 + +#Full RAID 1 Sample +#part raid.01 --size 50 --ondisk sda +#part raid.02 --size 50 --ondisk sdb +#raid /boot --level 1 --device md0 raid.01 raid.02 +# +#part raid.11 --size 1024 --ondisk sda +#part raid.12 --size 1024 --ondisk sdb +#raid / --level 1 --device md1 raid.11 raid.12 +# +#part raid.21 --size 1024 --ondisk sda +#part raid.22 --size 1024 --ondisk sdb +#raid /var --level 1 --device md2 raid.21 raid.22 +# +#part raid.31 --size 1024 --ondisk sda +#part raid.32 --size 1024 --ondisk sdb +#raid swap --level 1 --device md3 raid.31 raid.32 +# +#part raid.41 --size 1 --grow --ondisk sda +#part raid.42 --size 1 --grow --ondisk sdb +#raid /scr --level 1 --device md4 raid.41 raid.42 + +# +# bootloader config +# --append +# --useLilo +# --md5pass +# +bootloader + +# +# install or upgrade +# +install + +# +# text mode install (default is graphical) +# +text + +# +# firewall +# +firewall --disabled + +# +# mouse selection +# +#mouse genericps/2 --emulthree +mouse none + +# +# Select a zone +# Add the --utc switch if your hardware clock is set to GMT +# +#timezone US/Hawaii +#timezone US/Pacific +#timezone US/Mountain +#timezone US/Central +#timezone US/Eastern +timezone --utc #TABLE:site:key=timezone:value# + +# +# Don't do X +# +skipx + + +# +# To generate an encrypted root password use: +# +# perl -e 'print crypt("blah","Xa") . "\n";'p +# openssl passwd -apr1 -salt xxxxxxxx password +# +# where "blah" is your root password. +# +#rootpw --iscrypted XaLGAVe1C41x2 +#rootpw XaLGAVe1C41x2 --iscrypted +rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password# +#rootpw --iscrypted #COMMAND:perl -e 'print crypt("#TABLE:passwd.tab:rootpw:1#","Xa") . "\n";'p# + +# +# NIS setup: auth --enablenis --nisdomain sensenet +# --nisserver neptune --useshadow --enablemd5 +# +# OR +auth --useshadow --enablemd5 + +# +# SE Linux +# +selinux --disabled + +# +# Reboot after installation +# +reboot + +# +#end of section +# +%packages --resolvedeps +@ Network Servers +@ System Tools +@ X Window System +@ Legacy Software Development +autofs +ksh +tcsh +ntp +tftp +xinetd +rsh +rsh-server +psacct +nfs-utils +net-snmp +rsync +yp-tools +ypserv +ypbind +m4 +sendmail-cf +gdb +binutils +openssh-server +util-linux +compat-libstdc++-33 +%pre +#INCLUDE:../scripts/pre.rh# +%post +#INCLUDE:../scripts/post.rh#