
echo -e "\nCreating cobbler system entry ...\n"
cobbler system add --name=${IPname} --profile=${RHELH_PROFILE} --mac=${rawMAC//-/:}
--ip=${IPnum} --hostname=${IPname} --dns-name=${IPname} --kopts="console=ttyS0,115200
nostorage"
cobbler sync
#Remove semaphore
/bin/rm /tmp/AvailNameIP
# Present storage to hosts
echo -e "\nPresenting storage to host ${pname} ...\n"
/root/resources/prep_stor_host.sh ${pname}
# Update cluster configuration for NFS presentation
# create a semaphore for unique client names
while [[ -e /tmp/UpdateNFSClient ]] ; do sleep 1; done
touch /tmp/UpdateNFSClient
#Get next available client name
nfsClient=`/root/resources/GetAvailNFSClient.sh`
# add the export to the cluster configuration
addnfsexport --ricciroot=/.ricci -H ${MGMT1_IP} rhev-nfs-fs ${nfsClient} ${IPname} rw 1
# release semaphore
/bin/rm /tmp/UpdateNFSClient
# Get the count of systems registered with this name (should be 0)
initReg=`/root/resources/listRegSystems_infra.py | grep -c ${IPname}`
echo -e "\nNumber of systems registered with this name: ${initReg} ...\n"
# Set to boot PXE first
echo -e "\nChanging system boot order to boot network (PXE) first ...\n"
while [[ ! `ilocommand -i //${LOGIN}:${ILO_PW}@${iloIP} set /system1/bootconfig1/bootsource5
bootorder=1 | grep status=0` ]]; do sleep 10; done
# Reset node (power on node in case node was off)
echo -e "\nResetting server blade (power on in case blade was off) ...\n"
ilocommand -i //${LOGIN}:${ILO_PW}@${iloIP} power reset
ilocommand -i //${LOGIN}:${ILO_PW}@${iloIP} power on
# Wait for system to register with satellite indicating installation completion
echo -e "\nWaiting for system to register with satellite ...\n"
while [[ $initReg -ge `/root/resources/listRegSystems_infra.py | grep -c ${IPname}` ]]; do sleep 15;
done
echo -e "\nSatellite registration complete ...\n"
# Set to boot PXE last
echo -e "\nChanging system boot order to boot network last ...\n"
111 www.redhat.com
Komentarze do niniejszej Instrukcji