A.
...
Create rpm Development Tree (if it does not exist)
Create the tree by hand, or use "rpmdev-setuptree" to create necessary directories. To create by hand:
1. Go to your home directory of user (Example : /root); you don't need to be root
2. mkdir rpmbuild
...
4. mkdir BUILD BUILDROOT RPMS SOURCES SPECS SRPMS
( or )
we can use "rpmdev-setuptree" to create necessary directories.
...
B.
...
Install Dependencies
Below is the list of dependencies prerequisite you will need. (These are also specified in the "pbspro.spec" file):
- gcc
- autoconf
- automake
- hwloc-devel
- libX11-devel
- libXt-devel
- libedit-devel
- libical-devel
- ncurses-devel
- perl
- postgresql-devel
- python-devel >= 2.6
- python-devel < 3.0
- tcl-devel
- tk-devel
- swig
- expat-devel (if suse then libexpat-devel)
- openssl-devel (if suse then libopenssl-devel)
...
1. Install the
...
dependencies for building PBS Pro
...
:
...
For CentOS systems
...
, run the following command as root:
...
yum install -y gcc make rpm-build libtool hwloc-devel
...
libX11-devel libXt-devel libedit-devel libical-devel
...
ncurses-devel perl postgresql-devel python-devel tcl-
...
devel tk-devel swig expat-devel openssl-devel libXext libXft
...
...
For openSUSE systems
...
, run the following command as root:
...
zypper install gcc make rpm-build libtool hwloc-devel
...
libX11-devel libXt-devel libedit-devel libical-devel
...
ncurses-devel perl postgresql-devel python-devel tcl-devel
...
tk-devel swig libexpat-devel libopenssl-devel libXext-devel
...
libXft-devel fontconfig
2. Install the prerequisite packages for running PBS Pro
...
:
In addition
...
to the commands below, you should also install a text editor of
...
your choosing (vim, emacs, gedit, etc.).
...
...
For CentOS systems
...
, run the following command as root:
...
yum install -y expat libedit postgresql-server python
...
sendmail sudo tcl tk libical
...
...
For openSUSE systems
...
, run the following command as root:
...
zypper install expat libedit postgresql-server python
...
sendmail sudo tcl tk libical1
...
C.
...
Build the rpm Package for PBS Pro <pbs_version>
...
You can either build from source cloned from GitHub, or you can build from source rpm (srpm).
To Build from source cloned from GitHub:
Note: <pbs_version> specified at pbspro/src/pbspro.spec
1. Go to pbspro directory which we you have cloned (git clone https://github.com/PBSPro/pbspro)
2. List of files available at pbspro directory.
[user@hostname pbspro]# ls
autogen.sh configure.ac doc LICENSE Makefile.am pbspro-rpmlintrc README src win_configure
buildutils COPYRIGHT INSTALL m4 PBS_License.txt pbspro.spec README.md test
3. Run the autogen.sh script to generate the configure script and makefile Makefile.in files
./autogen.sh
(generates configure script and makefile Makefile.in templates)
43. Run ./configure
54. Run the below commandGenerate the source tar that will use to build the rpm
make dist
make dist generates .tar.gz (pbspro-<pbs_version>.tar.gz) file in the same directory.
65. Move the pbspro-<pbs_version>.tar.gz file to ~/rpmbuild/SOURCES
76. Move pbspro/src/pbspro.spec file to ~/rpmbuild/SPECS
87. Change directory to ~/rpmbuild/SPECS
98. Run the below command
rpmbuild -ba pbspro.spec ( This command will generate below rpm packages in ~/rpmbuild/RPMS dirctory)
...
d) pbspro-server-<pbs_version>-0.x86_64.rpm
...
...
To Build the rpm Package from pbspro-<pbs_version>.src.rpm
...
:
...
2. You can either use the –rebuild option, or you can build the rpm yourself.
To use the --rebuild option:
Do an rpmbuild –rebuild pbspro-<pbs_version>.src.rpm
To build the rpm yourself:
Install the pbspro-<pbs_version>.src.
...
rpm
rpm -i pbspro-<pbs_version>.src.rpm
This installs pbspro-<pbs_version>.tar.gz and
...
pbspro.spec in their respective directories under the rpmbuild dev tree.
rpm -i pbspro-<pbs_version>.src.rpm
...
Change directory to ~/rpmbuild/SPECS and run the below command
...
rpmbuild -ba pbspro.spec ( This command
...
generates below rpm packages in ~/rpmbuild/RPMS dirctory)
...
a) pbspro-client-<pbs_version>-0.x86_64.rpm
...
b) pbspro-debuginfo-<pbs_version>-0.x86_64.rpm
...
c) pbspro-execution-<pbs_version>-0.x86_64.rpm
...
d) pbspro-server-<pbs_version>-0.x86_64.rpm
...
E. Install and Test an rpm Package Locally on
Installing and Testing
...
Locally on CentOS7:
- After following section 'C' or 'D', change directory to ~/rpmbuild/RPMS
- yum -y install /root/rpmbuild/RPMS/x86_64/pbspro-server-<pbs_version>.x86_64.rpm
- Need to enable mom “PBS_START_MOM=1” in /etc/pbs.conf file
- Start the PBSPro daemons using /etc/init.d/pbs start.
- Need to validate by submitting job and verifying the state.
- yum -y install python-pip sudo which net-tools
- cd test/fw
- pip install -r requirements.txt .
- Need to install PTL(PBS test Lab) by executing “python setup.py install”
- Need to create users needed by PTL by executing "pbs_config --make-ug"
- cd ../tests
- pbs_benchpress -l INFOCLI2 -o ptl.txt
- Once pbs_benchpress completes, you can find the PTL log in ptl.txt.
...
Installing and Testing
...
Locally on openSUSE 13.2
- After following section 'C' or 'D', change directory to ~/rpmbuild/RPMS
- zypper -n install /root/rpmbuild/RPMS/x86_64/pbspro-server-<pbs_version>.x86_64.rpm
- Need to enable mom “PBS_START_MOM=1” in /etc/pbs.conf file
- Start the PBSPro daemons using /etc/init.d/pbs start.
- Need to validate by submitting job and verifying the state.
- zypper -n install python-pip sudo which net-tools
- cd test/fw
- pip install -r requirements.txt .
- Need to install PTL(PBS test Lab) by executing “python setup.py install”
- Need to create users needed by PTL by executing "pbs_config --make-ug"
- cd ../tests
- pbs_benchpress -l INFOCLI2 -o ptl.txt
- Once pbs_benchpress completes, you can find the PTL log in ptl.txt.
...
...