Difference between revisions of "CentOS 7.x Rocks cluster 7.0 Install rpm package in compute nodes"

From Notes_Wiki
(Created page with "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: <pre> ssh <compute-node-hostname> yum -y install iotop </pre> =Install...")
 
m
Line 17: Line 17:
#:: keepcache=1
#:: keepcache=1
#:</pre>
#:</pre>
# Go to /etc/yum.repos.d folder and enable required repositories.  For example edit '<tt>/etc/yum.repos.d/epel.repo</tt>' and set
#:<pre>
#:: enabled =1
#:</pre>
# 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.   
# 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.   
#:<pre>
#:<pre>
#:: yum -y reinstall vim
#:: yum -y reinstall vim
#:: yum -y install htop
#:</pre>
#:</pre>
#: 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.
#: 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.
Line 26: Line 31:
#:: cd "/export/rocks/install/contrib/7.0/x86_64/RPMS/"
#:: 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/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 .
#:</pre>
#:</pre>
# Create extend-compute.xml file using:
# Create extend-compute.xml file using:
Line 35: Line 41:
#:<pre>
#:<pre>
#::  <package>vim-enhanced</package>
#::  <package>vim-enhanced</package>
#::  <package>htop</package>
#:</pre>
#:</pre>
# Rebuild the compute node distribution
# Rebuild the compute node distribution

Revision as of 06:49, 11 May 2022

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 skeleton.xml extend-compute.xml
  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. Rebuild the compute node distribution
    cd /export/rocks/install/
    rocks create distro
  8. 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