Friday, March 6, 2015

ROCKS user guide: Chapter 8. Advanced Tasks

8.8. System Update

There are two ways in which packages can be updated on a Rocks Cluster. You can create an update roll and then add it to the distribution (preferred method) or you can update your frontend using YUM and then add the update packages to your distribution. The next two chapters will explain in detail the two methodologies.

8.8.1. System update using update roll

This approach is preferred over the other because it allows to test the effect of updates on compute nodes and in case of problems there is an easy way to roll back the system to the previous configuration.
  1. Use rocks create mirror to create an update roll
        # rocks create mirror http://mirror.centos.org/centos/6.2/updates/<arch>/Packages/ rollname=update-currentDate 
    Where arch is your current architecture (x86_64, i386).
  2. Add the update roll created by the previous command to your distribution
        # rocks add roll update-currentDate.iso
        # cd /export/rocks/install
        # rocks create distro 
  3. New installed nodes will automatically get the updated packages. It is wise to test the update on a compute nodes to verify that updates did not break anything. To force a node to reinstall, run the command:
        # ssh hostname-0-0 /boot/kickstart/cluster-kickstart 
  4. If something goes wrong you can always revert the updates removing the update roll.
        # rocks remove roll update-currentDate
        # cd /export/rocks/install
        # rocks create distro 
  5. After you tested the update on some nodes with the previous step, you can update the frontend using the standard yum command
        # yum update 
    Then reboot the frontend to make the update effective.

8.8.2. System update using YUM

To update using YUM you first have to update packages on your frontend (for this reason this approach is more risky) and then you can propagate the modification to the rest of the cluster.
  1. Several repositories are configured, but then disabled by Rocks at install time. This is done so that the user can have full control over the distribution. The local distribution IS a yum repository. If you have created an updates roll as in the previous section, then
        # yum clean all
        # yum check-update 
        
    might produce output that resembles the following
    [root@ ~]# yum check-update
    Rocks-6.0                                                | 1.9 kB     00:00     
    Rocks-6.0/primary                                        | 1.1 MB     00:00     
    Rocks-6.0                                                             2183/2183
    keyutils.x86_64                             1.4-3.el6                  Rocks-6.0
    keyutils-libs.x86_64                        1.4-3.el6                  Rocks-6.0
    keyutils-libs-devel.x86_64                  1.4-3.el6                  Rocks-6.0
    [root@ ~]# 
        
    Alternatively, you can enable the CentOS updates repo and do the following
        # yum clean all
        # yum --enablerepo=updates check-update 
        
    might produce output that resembles the following
    [root@ ~]# yum --enablerepo=updates check-update
    updates                                                  | 3.5 kB     00:00     
    
    firefox.x86_64                      10.0.4-1.el6.centos                updates  
    keyutils.x86_64                             1.4-3.el6                  Rocks-6.0
    keyutils-libs.x86_64                        1.4-3.el6                  Rocks-6.0
    keyutils-libs-devel.x86_64                  1.4-3.el6                  Rocks-6.0
    libpng.x86_64                       2:1.2.49-1.el6_2                   updates  
    libpng-devel.x86_64                 2:1.2.49-1.el6_2                   updates  
    libsmbclient.x86_64                 3.5.10-116.el6_2                   updates  
    openssl.x86_64                      1.0.0-20.el6_2.4                   updates  
    openssl-devel.x86_64                1.0.0-20.el6_2.4                   updates  
    qemu-kvm.x86_64                     2:0.12.1.2-2.209.el6_2.4           updates  
    samba-winbind-clients.x86_64        3.5.10-116.el6_2                   updates  
    xorg-x11-server-Xephyr.x86_64       1.10.4-6.el6_2.1.0.1.centos        updates  
    xorg-x11-server-Xorg.x86_64         1.10.4-6.el6_2.1.0.1.centos        updates  
    xorg-x11-server-common.x86_64       1.10.4-6.el6_2.1.0.1.centos        updates  
    xulrunner.x86_64                    10.0.4-1.el6.centos                updates  
    [root@ ~]# 
        
  2. Now, Actually install the updates on your frontend
        # yum --enablerepo=updates update
        
  3. When YUM installs update packages on your system, it stores a copy of downloaded RPMs in the directory /var/cache/yum/updates/packages. It is necessary to add this packages to the distribution copying them in the contrib directory:
        # cp /var/cache/yum/updates/packages/*  /export/rocks/install/contrib/5.5/<arch>/RPMS/ 
    Where arch is your current architecture (x86_64, i386).
  4. Finally rebuild your distribution:
        # cd /export/rocks/install
        # rocks create distro 
  5. New installed nodes will automatically get the updated packages. To force a node to reinstall, run the command:
        # ssh hostname-0-0 /boot/kickstart/cluster-kickstart 
http://www.rocksclusters.org/roll-documentation/base/5.5/update.html

No comments:

Post a Comment