2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 09:36:41 +00:00

changed all labels

This commit is contained in:
caomengmeng 2016-04-13 03:07:56 -04:00
parent 5338644b00
commit a33385c6da
14 changed files with 113 additions and 12 deletions

View File

@ -0,0 +1,100 @@
start:reg_linux_statelite_installation_hierarchy_by_nfs
os:Linux
stop:yes
cmd:chdef -t node -o $$CN servicenode=$$SN monserver=$$SN nfsserver=$$SN tftpserver=$$SN xcatmaster=$$SN
check:rc==0
cmd:chdef -t node $$SN groups=service,all
check:rc==0
cmd:makedns -n
check:rc==0
cmd:makeconservercf
check:rc==0
cmd:sleep 20
cmd:if [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64" ]]; then getmacs -D $$CN; fi
check:rc==0
cmd:makedhcp -n
check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:copycds $$ISO
check:rc==0
cmd:xdsh $$SN df|grep /install;if [ $? -eq 0 ] ;then xdsh $$SN umount /install;fi
check:rc==0
cmd:xdsh $$SN 'cat /etc/exports|grep install; if [ "$?" -ne "0" ]; then echo "/install *(rw,no_root_squash,sync,no_subtree_check)" >> /etc/exports; fi'
check:rc==0
cmd:xdsh $$SN "mkdir -p /nodedata"
check:rc==0
cmd:xdsh $$SN "chmod 755 /etc/exports"
check:rc==0
cmd:xdsh $$SN 'cat /etc/exports|grep nodedata; if [ "$?" -ne "0" ]; then echo "/nodedata *(rw,no_root_squash,sync,no_subtree_check)" >> /etc/exports; fi'
check:rc==0
cmd:xdsh $$SN 'cd /etc; export exports;cd -'
check:rc==0
cmd:if cat /etc/*release |grep SUSE >/dev/null;then xdsh $$SN 'service nfsserver restart'; elif cat /etc/*release |grep "Red Hat" >/dev/null;then xdsh $$SN 'service nfs restart'; fi
check:rc==0
cmd:chtab node=$$CN statelite.statemnt="$$SN:/nodedata"
check:rc==0
cmd:if cat /etc/*release |grep SUSE >/dev/null; then cp /opt/xcat/share/xcat/tools/autotest/testcase/installation/litefile_sles.csv /tmp/litefile.csv; tabrestore /tmp/litefile.csv; elif cat /etc/*release |grep "Red Hat" >/dev/null; then tabrestore /opt/xcat/share/xcat/tools/autotest/testcase/installation/litefile.csv; fi
check:rc==0
cmd:tabdump litefile
check:rc==0
cmd:chtab priority=4.7 policy.commands=litefile policy.rule=allow
check:rc==0
cmd:chtab priority=4.8 policy.commands=litetree policy.rule=allow
check:rc==0
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then mv $rootimgdir $rootimgdir.regbak;fi
check:rc==0
cmd:if cat /etc/*release |grep SUSE >/dev/null;then if [ ! -d /install/custom/netboot/sles ]; then mkdir -p /install/custom/netboot/sles; fi; elif cat /etc/*release |grep "Red Hat" >/dev/null;then if [ ! -d /install/custom/netboot/rh ]; then mkdir -p /install/custom/netboot/rh; fi;fi
check:rc==0
cmd:if cat /etc/*release |grep SUSE >/dev/null;then if [ ! -e /install/custom/netboot/sles/compute.synclist ]; then echo "/etc/resolv.conf -> /etc/resolv.conf" > /install/custom/netboot/sles/compute.synclist; fi; elif cat /etc/*release |grep "Red Hat" >/dev/null;then if [ ! -e /install/custom/netboot/rh/compute.synclist ]; then echo "/etc/resolv.conf -> /etc/resolv.conf" > /install/custom/netboot/rh/compute.synclist; fi;fi
check:rc==0
cmd:if cat /etc/*release |grep SUSE >/dev/null;then chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute synclists=/install/custom/netboot/sles/compute.synclist rootfstype=; elif cat /etc/*release |grep "Red Hat" >/dev/null;then chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute synclists=/install/custom/netboot/rh/compute.synclist rootfstype=; fi
check:rc==0
cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute
check:rc==0
cmd:liteimg __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute
check:rc==0
cmd:prsync /install $$SN:/
check:rc==0
cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute
check:rc==0
cmd:lsdef $$CN |grep provmethod
check:rc==0
check:output=~statelite
cmd:if [[ "__GETNODEATTR($$CN,arch)__" =~ "ppc64" ]]; then rnetboot $$CN;elif [[ "__GETNODEATTR($$CN,arch)__" =~ "x86_64" ]];then rpower $$CN boot; fi
check:rc==0
cmd:sleep 900
cmd:a=0;while ! `lsdef -l $$CN|grep status|grep booted >/dev/null`; do sleep 10;((a++));if [ $a -gt 60 ];then break;fi done
cmd:ping $$CN -c 3
check:rc==0
check:output=~64 bytes from $$CN
cmd:lsdef -l $$CN | grep status
check:rc==0
check:output=~booted
cmd:xdsh $$CN date
check:rc==0
check:output=~\d\d:\d\d:\d\d
cmd:xdsh $$CN mount
check:rc==0
check:output=~/nodedata/$$CN on /.statelite/persistent
check:output=~compute/rootimg on / type nfs
cmd:MNIP=`cat /etc/hosts|grep $$MN|awk '{print $1}'`; result=`xdsh $$CN "cat /etc/resolv.conf|grep $MNIP"`; if [ "$result" = "$$CN: nameserver $MNIP" ]; then echo "sync file works well"; fi;
check:output=~sync file works well
cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir ]; then rm -rf $rootimgdir;fi
check:rc==0
end

View File

@ -1,6 +1,6 @@
start:reg_linux_SN_installation_hierarchy
os:Linux
stop=yes
stop:yes
cmd:chtab key=nameservers site.value="<xcatmaster>"
check:rc==0

View File

@ -1,6 +1,6 @@
start:reg_linux_diskfull_installation_flat
os:Linux
stop=yes
stop:yes
cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi

View File

@ -1,6 +1,6 @@
start:reg_linux_diskfull_installation_hierarchy
os:Linux
stop=yes
stop:yes
cmd:chdef -t node -o $$CN servicenode=$$SN monserver=$$SN nfsserver=$$SN tftpserver=$$SN xcatmaster=$$SN
check:rc==0

View File

@ -1,6 +1,6 @@
start:reg_linux_diskless_installation_flat
os:Linux
stop=yes
stop:yes
cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN
check:rc==0

View File

@ -1,6 +1,6 @@
start:reg_linux_diskless_installation_hierarchy
os:Linux
stop=yes
stop:yes
cmd:chdef -t node -o $$CN servicenode=$$SN monserver=$$SN nfsserver=$$SN tftpserver=$$SN xcatmaster=$$SN
check:rc==0

View File

@ -1,6 +1,6 @@
start:reg_linux_statelite_installation_flat
os:Linux
stop=yes
stop:yes
cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN
check:rc==0

View File

@ -1,5 +1,6 @@
start:reg_linux_statelite_installation_hierarchy
os:Linux
stop:yes
cmd:MNIP=`cat /etc/hosts|grep $$MN|awk '{print $1}'`;sed -i "s:nameserver .*:nameserver $MNIP:g" /etc/resolv.conf

View File

@ -1,6 +1,6 @@
start:reg_linux_statelite_installation_hierarchy_by_nfs
os:Linux
stop=yes
stop:yes
cmd:chdef -t node -o $$CN servicenode=$$SN monserver=$$SN nfsserver=$$SN tftpserver=$$SN xcatmaster=$$SN
check:rc==0

View File

@ -1,6 +1,6 @@
start:reg_linux_statelite_installation_hierarchy_by_ramdisk
os:Linux
stop=yes
stop:yes
cmd:chdef -t node -o $$CN servicenode=$$SN monserver=$$SN nfsserver=$$SN tftpserver=$$SN xcatmaster=$$SN
check:rc==0

View File

@ -1,6 +1,6 @@
start:Diskless_installation_flat_p8_le
os:Linux
stop=yes
stop:yes
cmd:copycds $$ISO
check:rc==0

View File

@ -1,6 +1,6 @@
start:Ubuntu_diskless_installation_flat_x86_vm
os:Linux
stop=yes
stop:yes
cmd:copycds $$ISO
check:rc==0

View File

@ -1,6 +1,6 @@
start:Full_installation_flat_p8_le
os:Linux
stop=yes
stop:yes
cmd:copycds $$ISO
check:rc==0

View File

@ -1,6 +1,6 @@
start:Ubuntu_full_installation_flat_x86_vm
os:Linux
stop=yes
stop:yes
cmd:copycds $$ISO
check:rc==0