OBSOLETE - Prototype of LHCb Software installation with RPM/YUM
Introduction
In order to test possible alternatives to install_project for the release of LHCb software, prototypes were built using RPM and YUM:
- lb_install_yum.pyOne prototype using RPM and YUM, looking for packages from a remote YUM repository
- Another one using RPM and a thin home-made client for yum (in order to address the some of the issues encountered with yum)
These prototypes have limited functionality (e.g. the script does not update itself as install_project does, and neither does it support chained install areas) but should still allow to install/run the Brunel and
DaVinci applications.
LHCbDirac and Ganga are not available in the RPM repository yet as their LCG dependencies have not been prepared yet (2012-07-26)
Installation
The procedure is essentially the same as for install_project as the scripts have. First, the CMTCONFIG and CMTSITE have to be set:
export CMTCONFIG=x86_64-slc6-gcc48-opt
export MYSITEROOT=<yoursiteroot>
cd $MYSITEROOT
Production Tool: LHCb Installation with lbpkr
See
https://github.com/lhcb-org/lbpkr#installation
DEPRECATED: LHCb RPM Installation from repository
The LHCb client is available with:
wget http://lhcbproject.web.cern.ch/lhcbproject/dist/rpm/lb_install.sh
chmod +x lb_install.sh
To create a LHCb installation in /tmp/siteroot, and list the available packages
./lb_install.sh --root=/tmp/siteroot list
(you can also define a MYSITEROOT environment variable instead of using the --root option)
To view the list of
DaVinci Installations:
./lb_install.sh --root=/tmp/siteroot list 'DAVINCI.*'
Finally to install
DaVinci:
./lb_install.sh --root=/tmp/siteroot install DAVINCI_v34r1_x86_64_slc6_gcc48_opt
DEPRECATED: LHCb/ATLAS test RPM client from GIT
The code used for the test in a GIT repository, and can be obtained by running:
git clone http://cern.ch/lhcbproject/GIT/RpmInstall.git
or:
git clone ssh://lxplus.cern.ch/afs/cern.ch/lhcb/software/GIT/RpmInstall.git
The config of the YUM repo was split from the main script, and the
- LbInstall.py: The main installer script
- DependencyManager.py: The custom made YUM client
- AtlasConfig.py: Module containing the creation of the yum.conf for ATLAS
- LHCbConfig.py: Module containing the creation of the yum.conf for LHCb
- make_bootstrap.sh: The bootstrap creator.
make_bootstrap.sh creates an shell script to which a ZIP file containing the Python files is appended. Python is capable of using those classes directly (it is a sort of self extractable executable), e.g.
make_bootstrap.sh lb
make_bootstrap.sh at
Project overview
This project was started with the goal of checking whether RPM is a viable alternative to the current software distribution system, and especially investigate the needs in terms:
- packaging: is it possible/how to configure RPM packages to fullfill LHCb's needs
- dependency management and distribution: Can a script with functionality equivalent to install_project.py be implemented.
The first findings were summarized in the followoing document:
LHCbSoftwarePackaging.pdf
And the code is available at
git clone ssh://lxplus.cern.ch/afs/cern.ch/lhcb/software/GIT/lbrpm.git
In a second phase, and considering several issues encountered when developping/using the RPM/YUM prototype, it was decided to try an implement a "YUM light" client, with functionality strictly limited to what is needed.
Previous prototypes
Deprecated - Using LHCb YUM client
wget http://test-lbrpm.web.cern.ch/test-lbrpm/lbrpm/install/lbws
chmod +x lbws
Then
lbws -b brunel v42r2p1
or
lbws --binary=x86_64-slc5-gcc43-opt brunel v42r2p1
Usage:
lb_install.py [-d][-b] project version
This installs a LHCb project, with the binaries if -b is specified.
lb_install.py install rpmname
Installs a RPM from the yum repository by name. You can list the available files by
running:
lb_install.py list
to find the applications available in the repository
lb_install.py rpm [rpm command and options]
Pass through mode where the command is delegated to RPM (with the correct DB)
lb_install.py list [regexp for rpm name]
List packages found in the repository
Deprecated - Using YUM
wget http://test-lbrpm.web.cern.ch/test-lbrpm/lbrpm/install_yum/lb_install_yum.py
Then
python ./lb_install_yum.py -b brunel v42r2p1
or
python ./lb_install_yum.py --binary=x86_64-slc5-gcc43-opt brunel v42r2p1
This is the same syntax as for install project
N.B.1 I have only converted a few versions of a few projects to RPM. There however should be enough to run recent Brunel (v42r2p1 or v42r2p2)
In any case, lb_install_yum.py yum list will show you all the packages available.
N.B.1.bis BUG: The installation with the syntax ./lb_install -b brunel v42r2p1 doe NOT work for Data Packages and versioned projects (COMPAT, LBSCRIPTS...)
For those you can either:
- omit the version number and the latest will be installed
- use "python lb_install yum list" to find the RPM you want and run "python lb_install install
"
Usage:
lb_install_yum.py [-d][-b] project version
This installs a LHCb project, with the binaries if -b is specified.
lb_install_yum.py install rpmname
Installs a RPM from the yum repository by name. You can list the available files by
running:
lb_install_yum.py yum list
to find the applications available in the repository
lb_install_yum.py rpm [rpm command and options]
Pass through mode where the command is delegated to RPM (with the correct DB)
lb_install_yum.py yum [yum command and options]
Pass through mode where the command is delegated to YUM (with the correct DB)
-- BenjaminCouturier - 25-Apr-2012