wiki:GpoLab/MyplcPackageInstallationTips

Version 1 (modified by chaos@bbn.com, 13 years ago) (diff)

--

Ideas for handling package installation on MyPLC PlanetLab nodes

Introduction

Out of the box, MyPLC PlanetLab nodes can't run yum to install packages. This is because they use their MyPLC as a repository, and MyPLCs do not, by default, operate correctly as yum repositories for their nodes.

The cleanest solution is to install the noderepo package on the MyPLC. If you're interested in installing noderepo, ask GPO infra what we had to do to configure it on our testbed (and we'll try to get some documentation up here soon).

However, if you don't have noderepo, here are some other things to try.

Use yumdownloader to download packages and dependencies on the MyPLC

Suppose you are trying to install one or more packages both on the MyPLC host and on the PlanetLab nodes controlled by that MyPLC, and you don't want to have to find all the packages and all their dependencies by hand. You may be able to use a utility called yumdownloader to download RPMs and dependencies on the MyPLC before you install the package on that MyPLC.

Install yum-utils

The yumdownloader utility is part of the yum-utils package. Install this on your MyPLC:

sudo yum install yum-utils

Download the package(s) on the MyPLC first

If the package(s) you want to install are not yet on the MyPLC, you can download both packages and dependencies by doing something like:

rpm_cache_dir=~/rpms
rm -r ${rpm_cache_dir}
mkdir ${rpm_cache_dir}
sudo yumdownloader --destdir ${rpm_cache_dir} --resolve <package1> <package2> ...

This will download all RPMs you specify on the command line, and any dependencies which are not yet installed on the MyPLC. (So do this before you install the packages on the MyPLC itself, or you'll only download the packages you asked for, and not their dependencies.)

Install the RPMs on each node

  • Copy ${rpm_cache_dir} and its contents over to each node
  • On each node, try installing the packages:
    rpm_cache_dir=~/rpms
    cd ${rpm_cache_dir}
    sudo rpm -iv *.rpm
    

Keep an eye out for errors, and check afterwards to make sure the packages you asked for are actually now installed:

rpm -q <package1> <package2> ...

Installed dependencies may be different on different systems, and this may not work.