2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 17:23:08 +00:00

add sles, redhat cases

This commit is contained in:
caomengmeng 2016-05-16 04:00:45 -04:00
parent b12eda029a
commit 2f6cafe2fc
3 changed files with 438 additions and 0 deletions

View File

@ -67,6 +67,14 @@ NETDRIVER=ibmveth #network infterface card driver used by diskless installat
NETBOOTDIR=/opt/xcat/share/xcat/netboot/rh #path of netboot directory, used by diskless installation
MaxLparID=32
KITDATA=kitdata
MIGRATION1_CORE=http://xcat.org/files/xcat/xcat-core/2.10.x_Linux/xcat-core/xcat-core-2.10.tar.bz2
MIGRATION2_CORE=http://xcat.org/files/xcat/xcat-core/2.11.x_Linux/xcat-core/xcat-core-2.11.1-linux.tar.bz2
MIGRATION1_DEP=http://xcat.org/files/xcat/xcat-dep/2.x_Linux/xcat-dep-2.10.tar.bz2
MIGRATION2_DEP=http://xcat.org/files/xcat/xcat-dep/2.x_Linux/xcat-dep-2.11.1.tar.bz2
MIGRATION1_VERSION=2.10
MIGRATION2_VERSION=2.11.1
LATEST_VERSION=2.12
[Custom]
#commands run before test

View File

@ -0,0 +1,212 @@
start:redhat_migration1
os:Linux
#cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi
#cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN
#check:rc==0
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then rmvm $$CN -f -p && mkvm $$CN -s 20G; fi
cmd:rscan __GETNODEATTR($$CN,hcp)__ -w
check:rc==0
cmd:makedns -n
check:rc==0
cmd:service named restart
check:rc==0
cmd:makeconservercf $$CN
check:rc==0
cmd:cat /etc/conserver.cf | grep $$CN
check:output=~$$CN
cmd:sleep 60
cmd:if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]; then getmacs -D $$CN; fi
check:rc==0
cmd:makedhcp -n
check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:service dhcpd restart
check:rc==0
cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$CN;elif cat /etc/*release |grep "Red Hat" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$CN;fi
check:output=~$$CN
cmd:copycds $$ISO
check:rc==0
cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
cmd:lsdef $$CN |grep provmethod
check:rc==0
check:output=~__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
cmd:if [[ "__GETNODEATTR($$CN,mgt)__" = "ipmi" ]]; then rsetboot $$CN net; fi
check:rc==0
cmd:if [ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" ];then rnetboot $$CN;else rpower $$CN boot;fi else rpower $$CN boot;fi
check:rc==0
cmd:sleep 600
cmd:lsdef -l $$CN | grep status
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 300 ];then break;fi done
cmd:ping $$CN -c 3
check:output=~64 bytes from $$CN
cmd:lsdef -l $$CN | grep status
check:output=~booted
cmd:xdsh $$CN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$CN "rm -rf /oldxcat"
cmd:xdsh $$CN "mkdir -p /oldxcat"
check:rc==0
cmd:xdsh $$CN "yum -y install bzip2"
check:rc==0
cmd:xdsh $$CN "cd /oldxcat;wget $$MIGRATION2_DEP"
check:rc==0
cmd:xdsh $$CN "cd /oldxcat;wget $$MIGRATION2_CORE"
check:rc==0
cmd:xdsh $$CN "tar -jxvf /oldxcat/xcat-dep* -C /oldxcat"
check:rc==0
cmd:xdsh $$CN "tar -jxvf /oldxcat/xcat-core* -C /oldxcat"
check:rc==0
cmd:xdsh $$CN "/oldxcat/xcat-core/mklocalrepo.sh"
check:rc==0
cmd:xdsh $$CN "cd /oldxcat/xcat-dep/rh`more /etc/*release|grep VERSION_ID|cut -c13`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh"
check:rc==0
cmd:xdsh $$CN "yum clean all;yum -y install xCAT"
check:rc==0
cmd:xdsh $$CN "source /etc/profile.d/xcat.sh"
check:rc==0
cmd:xdsh $$CN "lsxcatd -v"
check:rc==0
check:output=~$$MIGRATION2_VERSION
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running
cmd:xdsh $$CN "chdef -t node -o node0001 nodetype=osi groups=linux"
check:rc==0
cmd:xdsh $$CN "lsdef"
check:output=~node0001
cmd:check==0
cmd:xdsh $$CN "cd /; scp -r $$MN:/core-rpms-snap.tar.bz2 /"
check:rc==0
cmd:xdsh $$CN "cd /; scp -r $$MN:/xcat-dep*.tar.bz2 /"
check:rc==0
cmd:xdsh $$CN "tar -jxf /core-rpms-snap.tar.bz2"
check:rc==0
cmd:xdsh $$CN "cd /root/xcat-core;./mklocalrepo.sh"
check:rc==0
cmd:xdsh $$CN "tar -jxvf /xcat-dep*.tar.bz2"
check:rc==0
cmd:xdsh $$CN "cd /root/xcat-dep/rh`more /etc/*release|grep VERSION_ID|cut -c13`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh"
check:rc==0
cmd:xdsh $$CN "yum clean metadata;yum -y update '*xCAT*'"
check:rc==0
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running
cmd:xdsh $$CN "lsdef"
check:output=~node0001
cmd:xdsh $$CN "noderm node0001"
check:rc==0
cmd:xdsh $$CN "lsxcatd -v"
check:rc==0
check:output=~$$LATEST_VERSION
end
start:redhat_migration2
os:Linux
#cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi
#cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN
#check:rc==0
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then rmvm $$CN -f -p && mkvm $$CN -s 20G; fi
cmd:rscan __GETNODEATTR($$CN,hcp)__ -w
check:rc==0
cmd:makedns -n
check:rc==0
cmd:service named restart
check:rc==0
cmd:makeconservercf $$CN
check:rc==0
cmd:cat /etc/conserver.cf | grep $$CN
check:output=~$$CN
cmd:sleep 60
cmd:if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]; then getmacs -D $$CN; fi
check:rc==0
cmd:makedhcp -n
check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:service dhcpd restart
check:rc==0
cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$CN;elif cat /etc/*release |grep "Red Hat" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$CN;fi
check:output=~$$CN
cmd:copycds $$ISO
check:rc==0
cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
cmd:lsdef $$CN |grep provmethod
check:rc==0
check:output=~__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
cmd:if [[ "__GETNODEATTR($$CN,mgt)__" = "ipmi" ]]; then rsetboot $$CN net; fi
check:rc==0
cmd:if [ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" ];then rnetboot $$CN;else rpower $$CN boot;fi else rpower $$CN boot;fi
check:rc==0
cmd:sleep 600
cmd:lsdef -l $$CN | grep status
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 300 ];then break;fi done
cmd:ping $$CN -c 3
check:output=~64 bytes from $$CN
cmd:lsdef -l $$CN | grep status
check:output=~booted
cmd:xdsh $$CN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$CN "rm -rf /oldxcat"
cmd:xdsh $$CN "mkdir -p /oldxcat"
check:rc==0
cmd:xdsh $$CN "yum -y install bzip2"
check:rc==0
cmd:xdsh $$CN "cd /oldxcat;wget $$MIGRATION1_DEP"
check:rc==0
cmd:xdsh $$CN "cd /oldxcat;wget $$MIGRATION1_CORE"
check:rc==0
cmd:xdsh $$CN "tar -jxvf /oldxcat/xcat-dep* -C /oldxcat"
check:rc==0
cmd:xdsh $$CN "tar -jxvf /oldxcat/xcat-core* -C /oldxcat"
check:rc==0
cmd:xdsh $$CN "/oldxcat/xcat-core/mklocalrepo.sh"
check:rc==0
cmd:xdsh $$CN "cd /oldxcat/xcat-dep/rh`more /etc/*release|grep VERSION_ID|cut -c13`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh"
check:rc==0
cmd:xdsh $$CN "yum clean all;yum -y install xCAT"
check:rc==0
cmd:xdsh $$CN "source /etc/profile.d/xcat.sh"
check:rc==0
cmd:xdsh $$CN "lsxcatd -v"
check:rc==0
check:output=~$$MIGRATION1_VERSION
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running
cmd:xdsh $$CN "chdef -t node -o node0001 nodetype=osi groups=linux"
check:rc==0
cmd:xdsh $$CN "lsdef"
check:output=~node0001
cmd:check==0
cmd:xdsh $$CN "cd /; scp -r $$MN:/core-rpms-snap.tar.bz2 /"
check:rc==0
cmd:xdsh $$CN "cd /; scp -r $$MN:/xcat-dep*.tar.bz2 /"
check:rc==0
cmd:xdsh $$CN "tar -jxf /core-rpms-snap.tar.bz2"
check:rc==0
cmd:xdsh $$CN "cd /root/xcat-core;./mklocalrepo.sh"
check:rc==0
cmd:xdsh $$CN "tar -jxvf /xcat-dep*.tar.bz2"
check:rc==0
cmd:xdsh $$CN "cd /root/xcat-dep/rh`more /etc/*release|grep VERSION_ID|cut -c13`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh"
check:rc==0
cmd:xdsh $$CN "yum clean metadata;yum -y update '*xCAT*'"
check:rc==0
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running
cmd:xdsh $$CN "lsdef"
check:output=~node0001
cmd:xdsh $$CN "noderm node0001"
check:rc==0
cmd:xdsh $$CN "lsxcatd -v"
check:rc==0
check:output=~$$LATEST_VERSION
end

View File

@ -0,0 +1,218 @@
start:sles_migration1
os:Linux
#cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi
#cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN
#check:rc==0
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then rmvm $$CN -f -p && mkvm $$CN -s 20G; fi
cmd:rscan __GETNODEATTR($$CN,hcp)__ -w
check:rc==0
cmd:makedns -n
check:rc==0
cmd:service named restart
check:rc==0
cmd:makeconservercf $$CN
check:rc==0
cmd:cat /etc/conserver.cf | grep $$CN
check:output=~$$CN
cmd:sleep 60
cmd:if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]; then getmacs -D $$CN; fi
check:rc==0
cmd:makedhcp -n
check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:service dhcpd restart
check:rc==0
cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$CN;elif cat /etc/*release |grep "Red Hat" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$CN;fi
check:output=~$$CN
cmd:copycds $$ISO
check:rc==0
cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
cmd:lsdef $$CN |grep provmethod
check:rc==0
check:output=~__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
cmd:if [[ "__GETNODEATTR($$CN,mgt)__" = "ipmi" ]]; then rsetboot $$CN net; fi
check:rc==0
cmd:if [ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" ];then rnetboot $$CN;else rpower $$CN boot;fi else rpower $$CN boot;fi
check:rc==0
cmd:sleep 600
cmd:lsdef -l $$CN | grep status
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 300 ];then break;fi done
cmd:ping $$CN -c 3
check:output=~64 bytes from $$CN
cmd:lsdef -l $$CN | grep status
check:output=~booted
cmd:xdsh $$CN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$CN "rm -rf /oldxcat"
cmd:xdsh $$CN "mkdir -p /oldxcat"
check:rc==0
cmd:xdsh $$CN "zypper install bzip2"
check:rc==0
cmd:xdsh $$CN "cd /oldxcat;wget $$MIGRATION1_DEP"
check:rc==0
cmd:xdsh $$CN "cd /oldxcat;wget $$MIGRATION1_CORE"
check:rc==0
cmd:xdsh $$CN "tar -jxvf /oldxcat/xcat-dep* -C /oldxcat"
check:rc==0
cmd:xdsh $$CN "tar -jxvf /oldxcat/xcat-core* -C /oldxcat"
check:rc==0
cmd:xdsh $$CN "/oldxcat/xcat-core/mklocalrepo.sh"
check:rc==0
cmd:xdsh $$CN "cd /oldxcat/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh"
check:rc==0
cmd:xdsh $$CN "zypper sl -U;zypper --gpg-auto-import-keys search --match-exact -s screen"
check:rc==0
cmd:xdsh $$CN "zypper -n install xCAT"
check:rc==0
cmd:xdsh $$CN "zypper -n install createrepo"
check:rc==0
cmd:xdsh $$CN "source /etc/profile.d/xcat.sh"
check:rc==0
cmd:xdsh $$CN "lsxcatd -v"
check:rc==0
check:output=~$$MIGRATION1_VERSION
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running
cmd:xdsh $$CN "chdef -t node -o node0001 nodetype=osi groups=linux"
check:rc==0
cmd:xdsh $$CN "lsdef"
check:output=~node0001
cmd:xdsh $$CN "cd /; scp -r $$MN:/core-rpms-snap.tar.bz2 /"
check:rc==0
cmd:xdsh $$CN "cd /; scp -r $$MN:/xcat-dep*.tar.bz2 /"
check:rc==0
cmd:xdsh $$CN "tar -jxf /core-rpms-snap.tar.bz2"
check:rc==0
cmd:xdsh $$CN "cd /root/xcat-core;./mklocalrepo.sh"
check:rc==0
cmd:xdsh $$CN "tar -jxvf /xcat-dep*.tar.bz2"
check:rc==0
cmd:xdsh $$CN "cd /root/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh"
check:rc==0
cmd:xdsh $$CN "zypper refresh;zypper -n update '*xCAT*'"
check:rc==0
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running
cmd:xdsh $$CN "lsdef"
check:output=~node0001
cmd:xdsh $$CN "noderm node0001"
check:rc==0
cmd:xdsh $$CN "lsxcatd -v"
check:rc==0
check:output=~$$LATEST_VERSION
end
start:sles_migration2
os:Linux
#cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi
#cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN
#check:rc==0
cmd:if [ "__GETNODEATTR($$CN,arch)__" != "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then rmvm $$CN -f -p && mkvm $$CN -s 20G; fi
cmd:rscan __GETNODEATTR($$CN,hcp)__ -w
check:rc==0
cmd:makedns -n
check:rc==0
cmd:service named restart
check:rc==0
cmd:makeconservercf $$CN
check:rc==0
cmd:cat /etc/conserver.cf | grep $$CN
check:output=~$$CN
cmd:sleep 60
cmd:if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" -a "__GETNODEATTR($$CN,mgt)__" != "ipmi" ]; then getmacs -D $$CN; fi
check:rc==0
cmd:makedhcp -n
check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:service dhcpd restart
check:rc==0
cmd:if cat /etc/*release |grep SUSE >/dev/null;then cat /var/lib/dhcp/db/dhcpd.leases|grep $$CN;elif cat /etc/*release |grep "Red Hat" >/dev/null;then cat /var/lib/dhcpd/dhcpd.leases|grep $$CN;fi
check:output=~$$CN
cmd:copycds $$ISO
check:rc==0
cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
cmd:lsdef $$CN |grep provmethod
check:rc==0
check:output=~__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
cmd:if [[ "__GETNODEATTR($$CN,mgt)__" = "ipmi" ]]; then rsetboot $$CN net; fi
check:rc==0
cmd:if [ "__GETNODEATTR($$CN,mgt)__" != "ipmi" ];then if [ "__GETNODEATTR($$CN,arch)__" = "ppc64" ];then rnetboot $$CN;else rpower $$CN boot;fi else rpower $$CN boot;fi
check:rc==0
cmd:sleep 600
cmd:lsdef -l $$CN | grep status
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 300 ];then break;fi done
cmd:ping $$CN -c 3
check:output=~64 bytes from $$CN
cmd:lsdef -l $$CN | grep status
check:output=~booted
cmd:xdsh $$CN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$CN "rm -rf /oldxcat"
cmd:xdsh $$CN "mkdir -p /oldxcat"
check:rc==0
cmd:xdsh $$CN "zypper install bzip2"
check:rc==0
cmd:xdsh $$CN "cd /oldxcat;wget $$MIGRATION2_CORE"
check:rc==0
cmd:xdsh $$CN "cd /oldxcat;wget $$MIGRATION2_DEP"
check:rc==0
cmd:xdsh $$CN "tar -jxvf /oldxcat/xcat-dep* -C /oldxcat"
check:rc==0
cmd:xdsh $$CN "tar -jxvf /oldxcat/xcat-core* -C /oldxcat"
check:rc==0
cmd:xdsh $$CN "/oldxcat/xcat-core/mklocalrepo.sh"
check:rc==0
cmd:xdsh $$CN "cd /oldxcat/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh"
check:rc==0
cmd:xdsh $$CN "zypper sl -U;zypper --gpg-auto-import-keys search --match-exact -s screen"
check:rc==0
cmd:xdsh $$CN "zypper -n install xCAT"
check:rc==0
cmd:xdsh $$CN "zypper -n install createrepo"
check:rc==0
cmd:xdsh $$CN "source /etc/profile.d/xcat.sh"
eck:rc==0
cmd:xdsh $$CN "lsxcatd -v"
check:rc==0
check:output=~$$MIGRATION2_VERSION
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running
cmd:xdsh $$CN "chdef -t node -o node0001 nodetype=osi groups=linux"
check:rc==0
cmd:xdsh $$CN "lsdef"
check:output=~node0001
cmd:xdsh $$CN "cd /; scp -r $$MN:/core-rpms-snap.tar.bz2 /"
check:rc==0
cmd:xdsh $$CN "cd /; scp -r $$MN:/xcat-dep*.tar.bz2 /"
check:rc==0
cmd:xdsh $$CN "tar -jxf /core-rpms-snap.tar.bz2"
check:rc==0
cmd:xdsh $$CN "cd /root/xcat-core;./mklocalrepo.sh"
check:rc==0
cmd:xdsh $$CN "tar -jxvf /xcat-dep*.tar.bz2"
check:rc==0
cmd:xdsh $$CN "cd /root/xcat-dep/sles1`more /etc/*release|grep VERSION_ID|cut -c14`/__GETNODEATTR($$CN,arch)__/;./mklocalrepo.sh"
check:rc==0
cmd:xdsh $$CN "zypper refresh;zypper -n update '*xCAT*'"
check:rc==0
cmd:xdsh $$CN "service xcatd status"
check:rc==0
check:output=~running
cmd:xdsh $$CN "lsdef"
check:output=~node0001
cmd:xdsh $$CN "noderm node0001"
check:rc==0
cmd:xdsh $$CN "lsxcatd -v"
check:rc==0
check:output=~$$LATEST_VERSION
end