Here is a short tutorial to roll out software updates to the provisioned client nodes on demand.
Prepare
- Download the Linux distro updates to the head node
# wget -r -np --reject=html http://mirror.centos.org/centos/5/updates/x86_64/
Clean up unnecessary html files.
# rm -f $(find ./mirror.centos.org -name "index*")
Move the update repo to /mnt for the sake of easy management.
# mv ./mirror.centos.org/centos/5/updates/ /mnt/centos_updates
- Create a yum repo configuration file for the update repository.
# cat > /etc/yum.repos.d/update.repo << EOF [update] name=CentOS update mirror baseurl=file:///mnt/centos_updates/x86_64 gpgcheck=0 enabled=1 EOF
Updates the headnodes
- Make sure both the distro repo and the sunhpc update repo are enabled.
# yum repolist --snip-- sunhpc-updates-local SunHPC updates Packages for RHEL (local) enabled : 7 update CentOS update mirror enabled : 580 --snip--
- Run yum update.
# yum clean all # yum -y update
- Reboot the head node. Verify the new kernel, e.g. 2.6.18_128.2.1.el5 and kernel modules associated with it have been installed.
# rpm -qa|egrep '2.6.18_128.2.1.el5|2.6.18-128.2.1.el5' kernel-ib-1.4.1-2.6.18_128.2.1.el5 lustre-client-tests-1.8.0.1-2.6.18_128.2.1.el5 kernel-headers-2.6.18-128.2.1.el5 mft-2.5.0-2.6.18_128.2.1.el5 lustre-client-1.8.0.1-2.6.18_128.2.1.el5 kernel-2.6.18-128.2.1.el5 lustre-client-modules-1.8.0.1-2.6.18_128.2.1.el5
Roll out updates to the diskful clients
- Add the distro update repo to cobbler
# cobbler repo add --name=centos_updates --mirror=/mnt/centos_updates/x86_64/ # cobbler_reposync centos_updates
The centos_updates will appear in the cobbler repo list.
# cobbler repo list centos_updates sunhpc_base_centos5.3 sunhpc_extras_centos5.3 sunhpc_lustre_centos5.3 sunhpc_updates_centos5.3
- Edit the repo configuration files.
# cp /var/www/cobbler/repo_mirror/centos_updates/config.repo centos_updates.repo # cp /var/www/cobbler/repo_mirror/sunhpc_updates_centos5.3/config.repo sunhpc_updates_centos5.3.repo
Replace "${server}" with the ip address of the headnode provision interface, e.g. 192.168.200.13, in both centos_updates.repo and sunhpc_updates_centos5.3.repo
[centos_updates] name=centos_updates - baseurl=http://${server}/cobbler/repo_mirror/centos_updates + baseurl=http://192.168.200.13/cobbler/repo_mirror/centos_updates enabled=1 priority=99 gpgcheck=0 [sunhpc_updates_centos5.3] name=sunhpc_updates_centos5.3 - baseurl=http://${server}/cobbler/repo_mirror/sunhpc_updates_centos5.3 + baseurl=http://192.168.200.13/cobbler/repo_mirror/sunhpc_updates_centos5.3 enabled=1 priority=99 gpgcheck=0 - Copy to the repo configuration files to the diskful clients.
# pdcp -g profile=rhel5.3 centos_updates.repo /etc/yum.repos.d/ # pdcp -g profile=rhel5.3 sunhpc_updates_rhel5.3.repo /etc/yum.repos.d/
- Update the diskful clients
# pdsh -g profile=rhel5.3 yum -y -q update
Roll out updates to the diskless clients
- Check the diskless image path.
# ls /var/lib/oneSIS/image/ centos5.3-onesis centos5.3-onesis-lustre
- Copy the update repo configuration files.
# cp /etc/yum.repos.d/update.repo /var/lib/oneSIS/image/centos5.3-onesis/etc/yum.repos.d
- Update the diskless images.
To bypass the yum check, enter:# mkdir -p /ram/var/run # mkdir -p /ram/var/log
Update the diskless images in /var/lib/oneSIS/image/centos5.3-onesis.
# yum -y --installroot=/var/lib/oneSIS/image/centos5.3-onesis clean all # yum -y --installroot=/var/lib/oneSIS/image/centos5.3-onesis update