Project

General

Profile

GlideinwmsGitAndRPM » History » Version 2

« Previous - Version 2/6 (diff) - Next » - Current version
Marco Mambelli, 01/09/2020 12:48 PM


Glideinwms Git on a RPM installation

In all the code segments below there are sections that are for RHEL6 systems only and sections for RHEL7 only, these are marked as SL6, SL7 respectively.

Disable auto-updates

Exclude HTCondor and glidein packages from updates:

# SL6
vi /etc/sysconfig/yum-autoupdate
# Add this line
EXCLUDE="kernel* openafs* *-kmdl-* kmod-* *firmware* condor* glidein*" 

# SL7
# sl7 does not have /etc/sysconfig/yum-autoupdate. Alt. add at the end of yum.conf:
vi /etc/yum.conf
# Add these lines
## Exclude following Packages Updates ##
exclude=glidein* condor*

vi /etc/yum/yum-cron.conf
# Add these lines:
# Do not update these automatically
exclude=kernel* openafs* *-kmdl-* kmod-* *firmware* condor* glidein*

Install Git, clone the repository and checkout your branch

yum install -y git
mkdir /opt/gwms-git
cd /opt/gwms-git
# you may need a kinit if the key was not forwarded
git clone ssh://p-glideinwms@cdcvs.fnal.gov/cvs/projects/glideinwms
cd glideinwms
git checkout YOUR_BRANCH

Changes to Frontend software

```shell
  1. For RHEL 6
    export PYVERSION=2.6
  1. For RHEL 7
    export PYVERSION=2.7

mkdir -p /opt/fromrpm/usr_sbin
cd /usr/sbin
mv checkFrontend glideinFrontendElement.py glideinFrontend stopFrontend /opt/fromrpm/usr_sbin/
for i in checkFrontend glideinFrontend stopFrontend; do ln -s /usr/lib/python$PYVERSION/site-packages/glideinwms/frontend/${i}.py $i; done
ln -s /usr/lib/python$PYVERSION/site-packages/glideinwms/frontend/glideinFrontendElement.py glideinFrontendElement.py

  1. already in /usr/sbin
    mv glidecondor_addDN glidecondor_createSecCol glidecondor_createSecSched /opt/fromrpm/usr_sbin/
    for i in glidecondor_addDN glidecondor_createSecCol glidecondor_createSecSched ; do ln -s /opt/gwms-git/glideinwms/install/$i $i ; done
  1. already in /usr/sbin
    mv reconfig_frontend /opt/fromrpm/usr_sbin/
    ln -s /opt/gwms-git/glideinwms/creation/reconfig_frontend reconfig_frontend

mkdir -p /opt/fromrpm/usr_bin
cd /usr/bin/
mv /usr/bin/glidein* /opt/fromrpm/usr_bin/
for i in glidein_cat glidein_gdb glidein_interactive glidein_ls glidein_ps glidein_status glidein_top; do ln -s /usr/lib/python$PYVERSION/site-packages/glideinwms/tools/${i}.py $i; done

cd /usr/lib/python$PYVERSION/site-packages/
mv glideinwms fromrpm_glideinwms
mkdir glideinwms
cd glideinwms/
for i in creation frontend init.py lib tools; do ln -s /opt/gwms-git/glideinwms/$i $i; done
pushd /opt/gwms-git/glideinwms/creation/
ln -s . creation
popd

  1. no touching files in /etc

cd /var/lib/gwms-frontend/
mkdir fromrpm
mv creation web-base fromrpm/
ln -s /opt/gwms-git/glideinwms/creation creation
ln -s /opt/gwms-git/glideinwms/creation/web_base web-base

  1. Change as needed
    vi /etc/gwms-frontend/frontend.xml
    ```

Restart the Frontend

```
service gwms-frontend upgrade
service gwms-frontend reconfig
service gwms-frontend start
```

Changes to Factory software

```shell

  1. For SL6
    export MYPYTHON=python2.6
  2. For SL7
    export MYPYTHON=python2.7

pushd /usr/sbin
mkdir -p /opt/fromrpm/usr_sbin

mv checkFactory.py* glideFactoryEntryGroup.py* glideFactoryEntry.py* glideFactory.py* manageFactoryDowntimes.py* stopFactory.py* /opt/fromrpm/usr_sbin/
for i in checkFactory.py glideFactoryEntryGroup.py glideFactoryEntry.py glideFactory.py manageFactoryDowntimes.py stopFactory.py; do ln -s /usr/lib/$MYPYTHON/site-packages/glideinwms/factory/$i $i; ln -s /usr/lib/$MYPYTHON/site-packages/glideinwms/factory/${i}o ${i}o; ln -s /usr/lib/$MYPYTHON/site-packages/glideinwms/factory/${i}c ${i}c; done

  1. already in: pushd /usr/sbin
    mkdir -p /opt/fromrpm/usr_sbin
    mv clone_glidein glidecondor_createSecCol glidecondor_addDN glidecondor_createSecSched info_glidein reconfig_glidein /opt/fromrpm/usr_sbin
    1. Not in factory mv reconfig_frontend /opt/fromrpm/usr_sbin # reconfig_frontend is not there at start
      for i in glidecondor_createSecCol glidecondor_addDN glidecondor_createSecSched; do ln -s /opt/gwms-git/glideinwms/install/$i $i; done
      for i in clone_glidein info_glidein reconfig_glidein reconfig_frontend; do ln -s /opt/gwms-git/glideinwms/creation/$i $i; done

mkdir -p /opt/fromrpm/usr_bin
mv /usr/bin/glidein* /opt/fromrpm/usr_bin/
pushd /usr/bin/
for i in glidein_cat glidein_gdb glidein_interactive glidein_ls glidein_ps glidein_status glidein_top; do ln -s /usr/lib/$MYPYTHON/site-packages/glideinwms/tools/${i}.py $i; done

cd /usr/lib/$MYPYTHON/site-packages/
mv glideinwms/ fromrpm_glideinwms
mkdir glideinwms
cd glideinwms
for i in creation factory init.py lib tools; do ln -s /opt/gwms-git/glideinwms/$i $i; done

  1. no touching files in /etc

cd /var/lib/gwms-factory/
mkdir fromrpm
mv creation web-base fromrpm/
ln -s /opt/gwms-git/glideinwms/creation creation
ln -s /opt/gwms-git/glideinwms/creation/web_base web-base

cd /var/log/gwms-factory/
mkdir old
mv client server old
mkdir client server
chown gfactory: server

  1. For SL6
    /etc/init.d/gwms-factory upgrade
  1. For SL7
    /usr/sbin/gwms-factory upgrade
    #/usr/sbin/gwms-factory reconfig
    /bin/systemctl start gwms-factory
```
Old version for SL5, Python 2.4
```shell
  1. for RHEL5 (python2.4)
    mv checkFactory.py* glideFactoryEntryGroup.py* glideFactoryEntry.py* glideFactory.py* manageFactoryDowntimes.py* stopFactory.py* /opt/old_usrsbin/
    for i in checkFactory.py glideFactoryEntryGroup.py glideFactoryEntry.py glideFactory.py manageFactoryDowntimes.py stopFactory.py; do ln -s /usr/lib/python2.4/site-packages/glideinwms/factory/$i $i; ln -s /usr/lib/python2.4/site-packages/glideinwms/factory/${i}o ${i}o; ln -s /usr/lib/python2.4/site-packages/glideinwms/factory/${i}c ${i}c; done
  1. already in: pushd /usr/sbin
    mkdir -p /opt/fromrpm/usr_sbin
    mv clone_glidein glidecondor_createSecCol glidecondor_addDN glidecondor_createSecSched info_glidein reconfig_glidein reconfig_frontend /opt/fromrpm/usr_sbin
    for i in glidecondor_createSecCol glidecondor_addDN glidecondor_createSecSched; do ln -s /opt/gwms-git/glideinwms/install/$i $i; done
    for i in clone_glidein info_glidein reconfig_glidein reconfig_frontend; do ln -s /opt/gwms-git/glideinwms/creation/$i $i; done

mkdir /opt/old_usrbin/
mv /usr/bin/glidein* /opt/old_usrbin/
pushd /usr/bin/
for i in glidein_cat glidein_gdb glidein_interactive glidein_ls glidein_ps glidein_status glidein_top; do ln -s /usr/lib/python2.4/site-packages/glideinwms/tools/${i}.py $i; done

cd /usr/lib/python2.4/site-packages/
mv glideinwms/ fromrpm_glideinwms
mkdir glideinwms
cd glideinwms
for i in creation factory init.py lib tools; do ln -s /opt/gwms-git/glideinwms/$i $i; done
```

Restart the Factory