CentOS 7.x Rocks cluster 7.0 Install rpm package in compute nodes

From Notes_Wiki

Home > CentOS > CentOS 7.x > CentOS 7.x Rocks cluster 7.0 > CentOS 7.x Rocks cluster 7.0 Install rpm package in compute nodes

Install rpm package directly via yum/rpm

We can copy the rpm file to compute node and install it via rpm/yum. If the package is likely to be there in the yum repository of rocks then it call also be installed via yum directly. For example:

ssh <compute-node-hostname>
yum -y install iotop


Install rpm package via rocks build process

We can add package to rocks compute node installation process. This way all new compute nodes will automatically get this package also during initial OS installation itself. To achieve this use:

  1. Edit '/etc/yum.conf' and enable
    keepcache=1
  2. Go to /etc/yum.repos.d folder and enable required repositories. For example edit '/etc/yum.repos.d/epel.repo' and set
    enabled =1
  3. Install or reinstall the package so that its rpms are downloaded and available in yum-cache. If you have the rpm via other mechanism then that is also fine.
    yum -y reinstall vim
    yum -y install htop
    If rpm is obtained from other mechanisms perhaps try "yum localinstall" of that rpm on a compute node to validate all dependencies before adding it to build process.
  4. Go to folder where we need to keep all custom rpm files and copy the new rpm files there
    cd "/export/rocks/install/contrib/7.0/x86_64/RPMS/"
    cp /var/cache/yum/x86_64/7/Rocks-7.0/packages/vim-enhanced-7.4.160-2.el7.x86_64.rpm .
    cp /var/cache/yum/x86_64/7/epel/packages/htop-2.2.0-3.el7.x86_64.rpm .
  5. Create extend-compute.xml file using:
    cd /export/rocks/install/site-profiles/7.0/nodes/
    cp -i skeleton.xml extend-compute.xml #Dont overwrite existing file, if any
  6. Edit 'extend-compute.xml' and list all the package rpms that are copied. We need to list all the packages one by one.
    <package>vim-enhanced</package>
    <package>htop</package>
  7. Validate the xml file using:
    xmllint -noout extend-compute.xml
  8. Rebuild the compute node distribution
    cd /export/rocks/install/
    rocks create distro
  9. Test the build on a compute node (one where these packages are not installed yet)
    rocks set host boot <compute-node-hostname> action=install
    ssh <compute-node-hostname> "shutdown -r now"

Refer:


Home > CentOS > CentOS 7.x > CentOS 7.x Rocks cluster 7.0 > CentOS 7.x Rocks cluster 7.0 Install rpm package in compute nodes