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

add cuda installation testcase

This commit is contained in:
junxiawang 2015-05-15 04:52:36 -04:00
parent 185f6a32eb
commit 7c52ddc29c
4 changed files with 151 additions and 0 deletions

View File

@ -0,0 +1,39 @@
start:Ubuntu_diskless_installation_p8le_vm_cudafull
os:Linux
cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu14.04" ]];then ver=ubuntu1404;elif [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu14.10" ]];then ver=ubuntu1410; fi;echo "deb http://developer.download.nvidia.com/compute/cuda/repos/$ver/__GETNODEATTR($$CN,arch)__ /" >> /etc/apt/sources.list
cmd:makedns -n
check:rc==0
cmd:makeconservercf $$CN
check:rc==0
cmd:makedhcp -n
check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:if [ ! -d /install/custom/netboot/ubuntu ]; then mkdir -p /install/custom/netboot/ubuntu; fi
check:rc==0
cmd:if [ ! -e /install/custom/netboot/ubuntu/compute.synclist ]; then echo "/etc/resolv.conf -> /etc/resolv.conf" > /install/custom/netboot/ubuntu/compute.synclist; fi
check:rc==0
cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute -p pkgdir="http://ports.ubuntu.com/ubuntu-ports trusty main,http://ports.ubuntu.com/ubuntu-ports trusty-updates main"
cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu14.04" ]];then ver=ubuntu1404;elif [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu14.10" ]];then ver=ubuntu1410; fi;chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute otherpkgdir="http://developer.download.nvidia.com/compute/cuda/repos/$ver/__GETNODEATTR($$CN,arch)__ /" otherpkglist="/opt/xcat/share/xcat/netboot/ubuntu/cudafull.otherpkgs.pkglist" pkglist="/opt/xcat/share/xcat/netboot/ubuntu/cudafull.__GETNODEATTR($$CN,os)__.__GETNODEATTR($$CN,arch)__-.pkglist" rootimgdir="/install/netboot/ __GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/cudafull"
cmd:apt-get install -y acpid
check:rc==0
cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/x86_64/compute
check:rc==0
cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
cmd:packimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
cmd:rpower $$CN reset
check:rc==0
cmd:sleep 200
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 dpkg -l |grep cuda
check:rc==0
check:output=~cuda
end

View File

@ -0,0 +1,39 @@
start:Ubuntu_diskless_installation_vm_cudaruntime
os:Linux
cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu14.04" ]];then ver=ubuntu1404;elif [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu14.10" ]];then ver=ubuntu1410; fi;echo "deb http://developer.download.nvidia.com/compute/cuda/repos/$ver/__GETNODEATTR($$CN,arch)__ /" >> /etc/apt/sources.list
cmd:makedns -n
check:rc==0
cmd:makeconservercf $$CN
check:rc==0
cmd:makedhcp -n
check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:if [ ! -d /install/custom/netboot/ubuntu ]; then mkdir -p /install/custom/netboot/ubuntu; fi
check:rc==0
cmd:if [ ! -e /install/custom/netboot/ubuntu/compute.synclist ]; then echo "/etc/resolv.conf -> /etc/resolv.conf" > /install/custom/netboot/ubuntu/compute.synclist; fi
check:rc==0
cmd:chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute -p pkgdir="http://ports.ubuntu.com/ubuntu-ports trusty main,http://ports.ubuntu.com/ubuntu-ports trusty-updates main "
cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu14.04" ]];then ver=ubuntu1404;elif [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu14.10" ]];then ver=ubuntu1410; fi;chdef -t osimage -o __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute otherpkgdir="http://developer.download.nvidia.com/compute/cuda/repos/$ver/__GETNODEATTR($$CN,arch)__ /" otherpkglist="/opt/xcat/share/xcat/netboot/ubuntu/cudaruntime.otherpkgs.pkglist" pkglist="/opt/xcat/share/xcat/netboot/ubuntu/cudaruntime.__GETNODEATTR($$CN,os)__.__GETNODEATTR($$CN,arch)__-.pkglist" rootimgdir="/install/netboot/ __GETNODEATTR($$CN,os)__/__GETNODEATTR($$CN,arch)__/cudaruntime"
cmd:apt-get install -y acpid
check:rc==0
cmd:rm -rf /install/netboot/__GETNODEATTR($$CN,os)__/x86_64/compute
check:rc==0
cmd:genimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
cmd:packimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-netboot-compute
check:rc==0
cmd:rpower $$CN reset
check:rc==0
cmd:sleep 200
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 dpkg -l |grep cuda
check:rc==0
check:output=~cuda
end

View File

@ -0,0 +1,35 @@
start:Ubuntu_full_installation_flat_cudafull
os:Linux
cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu14.04" ]];then ver=ubuntu1404;elif [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu14.10" ]];then ver=ubuntu1410; fi;echo "deb http://developer.download.nvidia.com/compute/cuda/repos/$ver/__GETNODEATTR($$CN,arch)__ /" >> /etc/apt/sources.list
cmd:makedns -n
check:rc==0
cmd:makeconservercf $$CN
check:rc==0
cmd:cat /etc/conserver.cf | grep $$CN
check:output=~$$CN
cmd:sleep 60
cmd:makedhcp -n
check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:copycds $$ISO
check:rc==0
cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu14.04" ]];then ver=ubuntu1404;elif [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu14.10" ]];then ver=ubuntu1410; fi;chdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute -p pkgdir="http://ports.ubuntu.com/ubuntu-ports trusty main,http://ports.ubuntu.com/ubuntu-ports trusty-updates main,http://developer.download.nvidia.com/compute/cuda/repos/$ver/__GETNODEATTR($$CN,arch)__/ /"
cmd:chdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute pkglist="/opt/xcat/share/xcat/install/ubuntu/cudafull.__GETNODEATTR($$CN,os)__.__GETNODEATTR($$CN,arch)__.pkglist"
cmd:chdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute template="/opt/xcat/share/xcat/install/ubuntu/cudafull.tmpl"
cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
cmd:rpower $$CN reset
check:rc==0
cmd:sleep 2000
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 dpkg -l |grep cuda
check:rc==0
check:output=~cuda
end

View File

@ -0,0 +1,38 @@
start:Ubuntu_full_installation_flat_cudaruntime
os:Linux
cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu14.04" ]];then ver=ubuntu1404;elif [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu14.10" ]];then ver=ubuntu1410; fi;echo "deb http://developer.download.nvidia.com/compute/cuda/repos/$ver/__GETNODEATTR($$CN,arch)__ /" >> /etc/apt/sources.list
cmd:makedns -n
check:rc==0
cmd:makeconservercf $$CN
check:rc==0
cmd:cat /etc/conserver.cf | grep $$CN
check:output=~$$CN
cmd:sleep 60
cmd:makedhcp -n
check:rc==0
cmd:makedhcp -a
check:rc==0
cmd:copycds $$ISO
check:rc==0
cmd:if [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu14.04" ]];then ver=ubuntu1404;elif [[ "__GETNODEATTR($$CN,os)__" =~ "ubuntu14.10" ]];then ver=ubuntu1410; fi;chdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute -p pkgdir="/install/__GETNODEATTR($$CN,os)__/ppc64el,http://ports.ubuntu.com/ubuntu-ports trusty main,http://ports.ubuntu.com/ubuntu-ports trusty-updates main, http://developer.download.nvidia.com/compute/cuda/repos/__GETNODEATTR($$CN,os)__/$ver /"
cmd:chdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute pkglist="/opt/xcat/share/xcat/install/ubuntu/cudaruntime.__GETNODEATTR($$CN,os)__.__GETNODEATTR($$CN,arch)__.pkglist"
cmd:chdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute template="/opt/xcat/share/xcat/install/ubuntu/cudaruntime.tmpl"
cmd:nodeset $$CN osimage=__GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-install-compute
check:rc==0
cmd:rpower $$CN reset
check:rc==0
cmd:sleep 2000
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 dpkg -l |grep cuda
check:rc==0
check:output=~cuda
cmd:xdsh $$CN dpkg -l |grep cuda
check:rc==0
check:output=~cuda
end