[[PageOutline]] = 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 ... }}} 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 ... }}} Installed dependencies may be different on different systems, and this may not work. == Debugging monitoring package dependencies == This section contains specific tips for downloading the five dependency packages required by [wiki:PlasticSlices/MonitoringRecommendations/PlnodeConfiguration the Plastic Slices monitoring configuration on MyPLC PlanetLab nodes], which are: {{{ rrdtool-python rrdtool-perl perl-File-Find-Rule perl-XML-Writer perl-libwww-perl }}} === Try yumdownloader === IF you used [wiki:GpoLab/MyplcPackageInstallationTips#UseyumdownloadertodownloadpackagesanddependenciesontheMyPLC yumdownloader] to cache the RPMs on your MyPLC, copy them over now, install them by hand, and check that it worked: {{{ cd ~/rpms sudo rpm -iv *.rpm rpm -q rrdtool-python rrdtool-perl perl-File-Find-Rule perl-XML-Writer perl-libwww-perl }}} Note that these RPMs were collected on a different machine, so there may still be dependency problems you need to resolve by hand. === Try noderepo === In principle, you should be able to install noderepo on your MyPLC very simply, and this should allow !PlanetLab nodes attached to that MyPLC to get !PlanetLab-related packages directly from the MyPLC, and other packages from a Fedora repository. However, we have found a number of issues with this, such as: * On some MyPLC versions, it doesn't work, because the stock `.repo` files distributed on the !PlanetLab nodes are missing or incorrect, so even when they can get the PL-specific repository from the server, they still can't get other packages. * If you have made any manual changes to your nodes, such as force-downgrading a package, you will lose those changes once the node can successfully upgrade. If this applies to you and you don't know how to forcibly hold packages versions in yum, ask GPO. That notwithstanding, if this works, it is easy: on your MyPLC host itself, run: {{{ sudo yum install noderepo-planetlab-- }}} (e.g. `noderepo-planetlab-f12-i386`). If that allows you to install packages on the nodes via yum, great. === Try configuring yum without noderepo === If noderepo doesn't work for you out of the box, Aaron Rosen suggested the following steps for getting a node to run yum successfully ''without'' the !PlanetLab repos. He tried these on a node running F12 with relevant package versions: {{{ kernel-2.6.27.54-28.planetlab.i686 NodeManager-2.0-21.planetlab.i686 vserver-planetlab-f12-i386-5.0-3.2010.10.14.i686 }}} If your node looks similar, this may work for you too. GPO has not tested this. * Create the stock `yum.repos.d`: {{{ mkdir /etc/yum.repos.d/ }}} * Copy the `fedora.repo` file from your myplc to the node, creating {{{ /etc/yum.repos.d/fedora.repo }}} * Download and install some newer versions of perl by hand to resolve discrepancies: {{{ wget ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/fedora/linux/releases/12/Fedora/x86_64/os/Packages/perl-5.10.0-82.fc12.i686.rpm wget ftp://ftp.pbone.net/mirror/archive.fedoraproject.org/fedora/linux/releases/12/Fedora/x86_64/os/Packages/perl-libs-5.10.0-82.fc12.i686.rpm rpm -e --nodeps perl-5.10.0-91.fc12.i686 perl-libs-5.10.0-91.fc12.i686 rpm -i perl-5.10.0-82.fc12.i686.rpm perl-libs-5.10.0-82.fc12.i686.rpm }}} After that, he was able to use `yum install` to install the monitoring dependencies. === Install all package dependencies by hand === We believe that the full set of packages needed to get the five monitoring dependencies is: * On an F8 node: {{{ cairo dejavu-lgc-fonts fontconfig freetype libthai libX11 libXau libXdmcp libXext libXft libXrender libpng libxcb libxml2 pango perl-Compress-Zlib perl-Compress-Raw-Zlib perl-File-Find-Rule perl-HTML-Parser perl-HTML-Tagset perl-IO-Compress-Base perl-IO-Compress-Zlib perl-Number-Compare perl-Test-Mock-LWP perl-Text-Glob perl-URI perl-XML-Writer perl-libwww-perl rrdtool rrdtool-perl rrdtool-python xorg-x11-filesystem }}} You should be able to download these by hand on your myplc node, using e.g. `yumdownloader`, and install them on each plnode using `rpm -iv *.rpm`. If the only dependency errors you see are minor perl versions, e.g.: {{{ # rpm -iv *.rpm error: Failed dependencies: perl = 4:5.10.0-96.fc12 is needed by perl-Compress-Zlib-0:2.008-96.fc12.i686 perl = 4:5.10.0-96.fc12 is needed by perl-IO-Compress-Base-0:2.015-96.fc12.i686 perl = 4:5.10.0-96.fc12 is needed by perl-IO-Compress-Zlib-0:2.015-96.fc12.i686 }}} and if you have some similar `perl-5.10.0` subversion installed, you can try using `--nodeps` to ignore the discrepancy (or you could download the newer perl version).