Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

A.

...

Create rpm Development Tree (if it does not exist)

The rpmdevtools package contains the rpmdev-setuptree command which will create the necessary directories.

sudo yum install -y rpmdevtools

rpmdev-setuptree

Alternatively, to create the tree 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 packages.  (These are also specified in the "pbsproopenpbs.spec" file):

  • gcc
  • autoconf
  • automake
  • hwloc-devel
  • libX11-devel
  • libXt-devel
  • libedit-devel
  • libical-devel
  • ncurses-devel
  • perl
  • postgresql-devel
  • pythonpython3-devel >= 2.6python-devel < 3.05
  • tcl-devel
  • tk-devel
  • swig
  • expat-devel (if suse then libexpat-devel)
  • openssl-devel (if suse then libopenssl-devel)

...

1. Install

...

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

...

python3-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

...

python3-devel tcl-devel

...

tk-devel swig libexpat-devel libopenssl-devel libXext-devel

...

libXft-devel fontconfig

      

2. Install

...

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

...

python3 sendmail sudo tcl tk libical

 

...

For openSUSE systems

...

, run the following command as root:

...

zypper install expat libedit postgresql-server

...

python3 sendmail sudo tcl tk libical1

3. Install prerequisite packages for testing PBS Pro:

...

Make sure you have the following on your local system:

the pip command

the sudo command

the which command

the net-tools package

...

C. Build the rpm Package for OpenPBS <pbs_version>

You can either build from source cloned from GitHub, or build from source rpm (srpm).

To Build from source cloned from GitHub:

        Note: <pbs_version> specified at pbsproopenpbs/src/pbsproopenpbs.spec 

1.    Go to pbspro openpbs directory which we you have cloned (git clone https://github.com/PBSProopenpbs/pbsproopenpbs)
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 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 (pbsproopenpbs-<pbs_version>.tar.gz) file in the same directory.
65.    Move the pbsproopenpbs-<pbs_version>.tar.gz file to ~/rpmbuild/SOURCES
76.    Move pbspro/src/pbspro Copy openpbs/openpbs.spec file to  ~/rpmbuild/SPECS
87.    Change directory to ~/rpmbuild/SPECS
98.    Run the below command
                  rpmbuild -ba pbsproopenpbs.spec         (This command will generate the below rpm packages in ~/rpmbuild/RPMS dirctory)

                  a) pbsproopenpbs-client-<pbs_version>-0.x86_64.rpm 

                  b) pbsproopenpbs-debuginfo-<pbs_version>-0.x86_64.rpm 

                  c) pbsproopenpbs-execution-<pbs_version>-0.x86_64.rpm

                  d) pbsproopenpbs-server-<pbs_version>-0.x86_64.rpm

...


...

To Build the rpm Package from openpbs-<pbs_version>.src.rpm

...

:

  1. Download from http://download.opensuse.org/repositories/home:/pbsproci/

...

2. You can either use the –rebuild option, or you can build the rpm yourself.

To use the --rebuild option:

Do an rpmbuild –rebuild openpbs-<pbs_version>.src.rpm


To build the rpm yourself:

Install the openpbs-<pbs_version>.src.rpm

...

rpm -i openpbs-<pbs_version>.src.rpm    

This installs openpbs-<pbs_version>.tar.gz and

...

openpbs.spec in their respective directories under the rpmbuild dev tree

...

.

...

...

Change directory to ~/rpmbuild/SPECS and run the below command

...

rpmbuild -ba

...

openpbs.spec               (This command

...

generates the below rpm packages in ~/rpmbuild/RPMS dirctory)

...

a)

...

openpbs-client-<pbs_version>-0.x86_64.rpm

...

b)

...

openpbs-debuginfo-<pbs_version>-0.x86_64.rpm

...

c)

...

openpbs-execution-<pbs_version>-0.x86_64.rpm

...

d)

...

openpbs-server-<pbs_version>-0.x86_64.rpm

...

D. Install and Test Your rpm Package Locally

Installing and Testing

...

Locally on CentOS7

...

:

  1.  Log in as root
  2.  Change directory to ~/rpmbuild/RPMS
  3.  yum  Install the package: yum -y install /root/rpmbuild/RPMS/x86_64/pbsproopenpbs-server-<pbs_version>.x86_64.rpm
  4.  Need to enable mom  Enable MoM via “PBS_START_MOM=1” in /etc/pbs.conf file
  5.  Start the PBSPro PBS Pro daemons using /etc/init.d/pbs start.
  6.  Need to validate by submitting job and verifying the state.
  7.  yum -y install python-pip sudo which net-tools
  8.  From a non-root account, make sure that PBS works by running a job
  9.  Continue as root
  10.  cd test/fw
  11.  pip  Install PTL and dependencies: pip install -r requirements.txt .
  12.  Need to install PTL(PBS test Lab) by executing “python setup.py install”
  13.  Need to create users needed by PTL by executing " Create user accounts and groups required by PTL:  pbs_config --make-ug"
  14.  cd ../tests
  15.  pbs Run PTL tests: pbs_benchpress -l INFOCLI2 -o ptl.txt
  16.  Once pbs_benchpress completes, you can find the PTL log in ptl.txt.

...

Installing and Testing

...

Locally on openSUSE 13.2

...

:

  1.  Log in as root
  2.  Change directory to ~/rpmbuild/RPMS 
  3.  Install the package: zypper -n install /root/rpmbuild/RPMS/x86_64/pbsproopenpbs-server-<pbs_version>.x86_64.rpm
  4. Need to enable mom  Enable MoM via “PBS_START_MOM=1” in /etc/pbs.conf file
  5.  Start the PBSPro PBS Pro daemons using /etc/init.d/pbs start. 
  6. Need to validate by submitting job and verifying the state.
  7. zypper -n install python-pip sudo which net-tools  From a non-root account, make sure that PBS works by running a job
  8.  Continue as root
  9.  cd test/fw
  10.  pip  Install PTL and dependencies: pip install -r requirements.txt .
  11.  Need to install PTL(PBS test Lab) by executing “python setup.py install”
  12.  Need to create users needed by PTL by executing " Create user accounts and groups required by PTL: pbs_config --make-ug"
  13.  cd ../tests
  14.  pbs Run PTL tests: pbs_benchpress -l INFOCLI2 -o ptl.txt
  15.  Once pbs_benchpress completes, you can find the PTL log in ptl.txt.


...

OSS Site Map

...

...