Project

General

Profile

GlideinwmsGitAndRPM » History » Version 1

Marco Mambelli, 01/09/2020 12:46 PM

1 1 Marco Mambelli
h1. Glideinwms Git on a RPM installation
2 1 Marco Mambelli
3 1 Marco Mambelli
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.
4 1 Marco Mambelli
5 1 Marco Mambelli
h2. Disable auto-updates
6 1 Marco Mambelli
7 1 Marco Mambelli
Exclude HTCondor and glidein packages from updates:
8 1 Marco Mambelli
```shell
9 1 Marco Mambelli
# SL6
10 1 Marco Mambelli
vi /etc/sysconfig/yum-autoupdate
11 1 Marco Mambelli
# Add this line
12 1 Marco Mambelli
EXCLUDE="kernel* openafs* *-kmdl-* kmod-* *firmware* condor* glidein*"
13 1 Marco Mambelli
14 1 Marco Mambelli
# SL7
15 1 Marco Mambelli
# sl7 does not have /etc/sysconfig/yum-autoupdate. Alt. add at the end of yum.conf:
16 1 Marco Mambelli
vi /etc/yum.conf
17 1 Marco Mambelli
# Add these lines
18 1 Marco Mambelli
## Exclude following Packages Updates ##
19 1 Marco Mambelli
exclude=glidein* condor*
20 1 Marco Mambelli
21 1 Marco Mambelli
vi /etc/yum/yum-cron.conf
22 1 Marco Mambelli
# Add these lines:
23 1 Marco Mambelli
# Do not update these automatically
24 1 Marco Mambelli
exclude=kernel* openafs* *-kmdl-* kmod-* *firmware* condor* glidein*
25 1 Marco Mambelli
```
26 1 Marco Mambelli
27 1 Marco Mambelli
h2. Install Git, clone the repository and checkout your branch
28 1 Marco Mambelli
29 1 Marco Mambelli
```shell
30 1 Marco Mambelli
yum install -y git
31 1 Marco Mambelli
mkdir /opt/gwms-git
32 1 Marco Mambelli
cd /opt/gwms-git
33 1 Marco Mambelli
# you may need a kinit if the key was not forwarded
34 1 Marco Mambelli
git clone ssh://p-glideinwms@cdcvs.fnal.gov/cvs/projects/glideinwms
35 1 Marco Mambelli
cd glideinwms
36 1 Marco Mambelli
git checkout YOUR_BRANCH
37 1 Marco Mambelli
```
38 1 Marco Mambelli
39 1 Marco Mambelli
h2. Changes to Frontend software
40 1 Marco Mambelli
41 1 Marco Mambelli
```shell
42 1 Marco Mambelli
# For RHEL 6
43 1 Marco Mambelli
export PYVERSION=2.6
44 1 Marco Mambelli
45 1 Marco Mambelli
# For RHEL 7
46 1 Marco Mambelli
export PYVERSION=2.7
47 1 Marco Mambelli
48 1 Marco Mambelli
49 1 Marco Mambelli
mkdir -p /opt/fromrpm/usr_sbin
50 1 Marco Mambelli
cd /usr/sbin
51 1 Marco Mambelli
mv checkFrontend glideinFrontendElement.py glideinFrontend stopFrontend /opt/fromrpm/usr_sbin/
52 1 Marco Mambelli
for i in checkFrontend glideinFrontend stopFrontend; do ln -s /usr/lib/python$PYVERSION/site-packages/glideinwms/frontend/${i}.py $i; done
53 1 Marco Mambelli
ln -s /usr/lib/python$PYVERSION/site-packages/glideinwms/frontend/glideinFrontendElement.py glideinFrontendElement.py
54 1 Marco Mambelli
55 1 Marco Mambelli
# already in /usr/sbin
56 1 Marco Mambelli
mv glidecondor_addDN glidecondor_createSecCol glidecondor_createSecSched /opt/fromrpm/usr_sbin/
57 1 Marco Mambelli
for i in glidecondor_addDN glidecondor_createSecCol glidecondor_createSecSched ; do ln -s /opt/gwms-git/glideinwms/install/$i $i ; done
58 1 Marco Mambelli
59 1 Marco Mambelli
# already in /usr/sbin
60 1 Marco Mambelli
mv reconfig_frontend /opt/fromrpm/usr_sbin/
61 1 Marco Mambelli
ln -s /opt/gwms-git/glideinwms/creation/reconfig_frontend reconfig_frontend
62 1 Marco Mambelli
63 1 Marco Mambelli
mkdir -p /opt/fromrpm/usr_bin
64 1 Marco Mambelli
cd /usr/bin/
65 1 Marco Mambelli
mv /usr/bin/glidein* /opt/fromrpm/usr_bin/
66 1 Marco Mambelli
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
67 1 Marco Mambelli
68 1 Marco Mambelli
cd /usr/lib/python$PYVERSION/site-packages/
69 1 Marco Mambelli
mv glideinwms fromrpm_glideinwms
70 1 Marco Mambelli
mkdir glideinwms
71 1 Marco Mambelli
cd glideinwms/
72 1 Marco Mambelli
for i in creation  frontend  __init__.py  lib  tools; do  ln -s /opt/gwms-git/glideinwms/$i $i; done
73 1 Marco Mambelli
pushd /opt/gwms-git/glideinwms/creation/
74 1 Marco Mambelli
ln -s . creation
75 1 Marco Mambelli
popd
76 1 Marco Mambelli
77 1 Marco Mambelli
78 1 Marco Mambelli
# no touching files in /etc
79 1 Marco Mambelli
80 1 Marco Mambelli
cd /var/lib/gwms-frontend/
81 1 Marco Mambelli
mkdir fromrpm
82 1 Marco Mambelli
mv creation web-base fromrpm/
83 1 Marco Mambelli
ln -s /opt/gwms-git/glideinwms/creation creation
84 1 Marco Mambelli
ln -s /opt/gwms-git/glideinwms/creation/web_base web-base
85 1 Marco Mambelli
86 1 Marco Mambelli
# Change as needed
87 1 Marco Mambelli
vi /etc/gwms-frontend/frontend.xml
88 1 Marco Mambelli
```
89 1 Marco Mambelli
90 1 Marco Mambelli
h3. Restart the Frontend
91 1 Marco Mambelli
92 1 Marco Mambelli
```
93 1 Marco Mambelli
service gwms-frontend upgrade
94 1 Marco Mambelli
service gwms-frontend reconfig
95 1 Marco Mambelli
service gwms-frontend start
96 1 Marco Mambelli
```
97 1 Marco Mambelli
98 1 Marco Mambelli
h2. Changes to Factory software
99 1 Marco Mambelli
100 1 Marco Mambelli
```shell
101 1 Marco Mambelli
102 1 Marco Mambelli
103 1 Marco Mambelli
# For SL6
104 1 Marco Mambelli
export MYPYTHON=python2.6
105 1 Marco Mambelli
# For SL7
106 1 Marco Mambelli
export MYPYTHON=python2.7
107 1 Marco Mambelli
108 1 Marco Mambelli
pushd /usr/sbin
109 1 Marco Mambelli
mkdir -p /opt/fromrpm/usr_sbin
110 1 Marco Mambelli
111 1 Marco Mambelli
mv checkFactory.py* glideFactoryEntryGroup.py* glideFactoryEntry.py* glideFactory.py* manageFactoryDowntimes.py* stopFactory.py* /opt/fromrpm/usr_sbin/
112 1 Marco Mambelli
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
113 1 Marco Mambelli
114 1 Marco Mambelli
# already in: pushd /usr/sbin
115 1 Marco Mambelli
mkdir -p /opt/fromrpm/usr_sbin
116 1 Marco Mambelli
mv clone_glidein glidecondor_createSecCol glidecondor_addDN glidecondor_createSecSched info_glidein reconfig_glidein /opt/fromrpm/usr_sbin
117 1 Marco Mambelli
## Not in factory  mv reconfig_frontend /opt/fromrpm/usr_sbin   # reconfig_frontend is not there at start
118 1 Marco Mambelli
for i in glidecondor_createSecCol glidecondor_addDN glidecondor_createSecSched; do ln -s /opt/gwms-git/glideinwms/install/$i $i; done
119 1 Marco Mambelli
for i in clone_glidein info_glidein reconfig_glidein reconfig_frontend; do ln -s /opt/gwms-git/glideinwms/creation/$i $i; done
120 1 Marco Mambelli
121 1 Marco Mambelli
mkdir -p /opt/fromrpm/usr_bin
122 1 Marco Mambelli
mv /usr/bin/glidein* /opt/fromrpm/usr_bin/
123 1 Marco Mambelli
pushd /usr/bin/
124 1 Marco Mambelli
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
125 1 Marco Mambelli
126 1 Marco Mambelli
cd /usr/lib/$MYPYTHON/site-packages/
127 1 Marco Mambelli
mv glideinwms/ fromrpm_glideinwms
128 1 Marco Mambelli
mkdir glideinwms
129 1 Marco Mambelli
cd glideinwms
130 1 Marco Mambelli
for i in creation  factory  __init__.py lib  tools; do ln -s /opt/gwms-git/glideinwms/$i $i; done
131 1 Marco Mambelli
132 1 Marco Mambelli
# no touching files in /etc
133 1 Marco Mambelli
134 1 Marco Mambelli
cd /var/lib/gwms-factory/
135 1 Marco Mambelli
mkdir fromrpm
136 1 Marco Mambelli
mv creation web-base fromrpm/
137 1 Marco Mambelli
ln -s /opt/gwms-git/glideinwms/creation creation
138 1 Marco Mambelli
ln -s /opt/gwms-git/glideinwms/creation/web_base web-base
139 1 Marco Mambelli
140 1 Marco Mambelli
cd /var/log/gwms-factory/
141 1 Marco Mambelli
mkdir old
142 1 Marco Mambelli
mv client server old
143 1 Marco Mambelli
mkdir client server
144 1 Marco Mambelli
chown gfactory: server
145 1 Marco Mambelli
146 1 Marco Mambelli
# For SL6
147 1 Marco Mambelli
/etc/init.d/gwms-factory upgrade
148 1 Marco Mambelli
149 1 Marco Mambelli
# For SL7
150 1 Marco Mambelli
/usr/sbin/gwms-factory upgrade
151 1 Marco Mambelli
#/usr/sbin/gwms-factory reconfig
152 1 Marco Mambelli
/bin/systemctl start gwms-factory
153 1 Marco Mambelli
154 1 Marco Mambelli
155 1 Marco Mambelli
156 1 Marco Mambelli
```
157 1 Marco Mambelli
Old version for SL5, Python 2.4
158 1 Marco Mambelli
```shell
159 1 Marco Mambelli
#### for RHEL5 (python2.4)
160 1 Marco Mambelli
mv checkFactory.py* glideFactoryEntryGroup.py* glideFactoryEntry.py* glideFactory.py* manageFactoryDowntimes.py* stopFactory.py* /opt/old_usrsbin/
161 1 Marco Mambelli
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
162 1 Marco Mambelli
163 1 Marco Mambelli
# already in: pushd /usr/sbin
164 1 Marco Mambelli
mkdir -p /opt/fromrpm/usr_sbin
165 1 Marco Mambelli
mv clone_glidein glidecondor_createSecCol glidecondor_addDN glidecondor_createSecSched info_glidein reconfig_glidein reconfig_frontend /opt/fromrpm/usr_sbin
166 1 Marco Mambelli
for i in glidecondor_createSecCol glidecondor_addDN glidecondor_createSecSched; do ln -s /opt/gwms-git/glideinwms/install/$i $i; done
167 1 Marco Mambelli
for i in clone_glidein info_glidein reconfig_glidein reconfig_frontend; do ln -s /opt/gwms-git/glideinwms/creation/$i $i; done
168 1 Marco Mambelli
169 1 Marco Mambelli
mkdir /opt/old_usrbin/
170 1 Marco Mambelli
mv /usr/bin/glidein* /opt/old_usrbin/
171 1 Marco Mambelli
pushd /usr/bin/
172 1 Marco Mambelli
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
173 1 Marco Mambelli
174 1 Marco Mambelli
cd /usr/lib/python2.4/site-packages/
175 1 Marco Mambelli
mv glideinwms/ fromrpm_glideinwms
176 1 Marco Mambelli
mkdir glideinwms
177 1 Marco Mambelli
cd glideinwms
178 1 Marco Mambelli
for i in creation  factory  __init__.py lib  tools; do ln -s /opt/gwms-git/glideinwms/$i $i; done
179 1 Marco Mambelli
```
180 1 Marco Mambelli
181 1 Marco Mambelli
182 1 Marco Mambelli
183 1 Marco Mambelli
h3. Restart the Factory