Project

General

Profile

GlideinwmsGitAndRPM » History » Version 3

Marco Mambelli, 01/09/2020 01:14 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 2 Marco Mambelli
<pre><code class="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 2 Marco Mambelli
</code></pre>
26 1 Marco Mambelli
27 2 Marco Mambelli
28 1 Marco Mambelli
h2. Install Git, clone the repository and checkout your branch
29 1 Marco Mambelli
30 2 Marco Mambelli
<pre><code class="shell">
31 1 Marco Mambelli
yum install -y git
32 1 Marco Mambelli
mkdir /opt/gwms-git
33 1 Marco Mambelli
cd /opt/gwms-git
34 1 Marco Mambelli
# you may need a kinit if the key was not forwarded
35 1 Marco Mambelli
git clone ssh://p-glideinwms@cdcvs.fnal.gov/cvs/projects/glideinwms
36 1 Marco Mambelli
cd glideinwms
37 1 Marco Mambelli
git checkout YOUR_BRANCH
38 2 Marco Mambelli
</code></pre>
39 2 Marco Mambelli
40 1 Marco Mambelli
41 1 Marco Mambelli
h2. Changes to Frontend software
42 1 Marco Mambelli
43 3 Marco Mambelli
<pre><code class="shell">
44 1 Marco Mambelli
# For RHEL 6
45 1 Marco Mambelli
export PYVERSION=2.6
46 1 Marco Mambelli
47 1 Marco Mambelli
# For RHEL 7
48 1 Marco Mambelli
export PYVERSION=2.7
49 1 Marco Mambelli
50 1 Marco Mambelli
51 1 Marco Mambelli
mkdir -p /opt/fromrpm/usr_sbin
52 1 Marco Mambelli
cd /usr/sbin
53 1 Marco Mambelli
mv checkFrontend glideinFrontendElement.py glideinFrontend stopFrontend /opt/fromrpm/usr_sbin/
54 1 Marco Mambelli
for i in checkFrontend glideinFrontend stopFrontend; do ln -s /usr/lib/python$PYVERSION/site-packages/glideinwms/frontend/${i}.py $i; done
55 1 Marco Mambelli
ln -s /usr/lib/python$PYVERSION/site-packages/glideinwms/frontend/glideinFrontendElement.py glideinFrontendElement.py
56 1 Marco Mambelli
57 1 Marco Mambelli
# already in /usr/sbin
58 1 Marco Mambelli
mv glidecondor_addDN glidecondor_createSecCol glidecondor_createSecSched /opt/fromrpm/usr_sbin/
59 1 Marco Mambelli
for i in glidecondor_addDN glidecondor_createSecCol glidecondor_createSecSched ; do ln -s /opt/gwms-git/glideinwms/install/$i $i ; done
60 1 Marco Mambelli
61 1 Marco Mambelli
# already in /usr/sbin
62 1 Marco Mambelli
mv reconfig_frontend /opt/fromrpm/usr_sbin/
63 1 Marco Mambelli
ln -s /opt/gwms-git/glideinwms/creation/reconfig_frontend reconfig_frontend
64 1 Marco Mambelli
65 1 Marco Mambelli
mkdir -p /opt/fromrpm/usr_bin
66 1 Marco Mambelli
cd /usr/bin/
67 1 Marco Mambelli
mv /usr/bin/glidein* /opt/fromrpm/usr_bin/
68 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
69 1 Marco Mambelli
70 1 Marco Mambelli
cd /usr/lib/python$PYVERSION/site-packages/
71 1 Marco Mambelli
mv glideinwms fromrpm_glideinwms
72 1 Marco Mambelli
mkdir glideinwms
73 1 Marco Mambelli
cd glideinwms/
74 1 Marco Mambelli
for i in creation  frontend  __init__.py  lib  tools; do  ln -s /opt/gwms-git/glideinwms/$i $i; done
75 1 Marco Mambelli
pushd /opt/gwms-git/glideinwms/creation/
76 1 Marco Mambelli
ln -s . creation
77 1 Marco Mambelli
popd
78 1 Marco Mambelli
79 1 Marco Mambelli
80 1 Marco Mambelli
# no touching files in /etc
81 1 Marco Mambelli
82 1 Marco Mambelli
cd /var/lib/gwms-frontend/
83 1 Marco Mambelli
mkdir fromrpm
84 1 Marco Mambelli
mv creation web-base fromrpm/
85 1 Marco Mambelli
ln -s /opt/gwms-git/glideinwms/creation creation
86 1 Marco Mambelli
ln -s /opt/gwms-git/glideinwms/creation/web_base web-base
87 1 Marco Mambelli
88 1 Marco Mambelli
# Change as needed
89 1 Marco Mambelli
vi /etc/gwms-frontend/frontend.xml
90 3 Marco Mambelli
</code></pre>
91 1 Marco Mambelli
92 1 Marco Mambelli
h3. Restart the Frontend
93 1 Marco Mambelli
94 3 Marco Mambelli
<pre><code class="shell">
95 1 Marco Mambelli
service gwms-frontend upgrade
96 1 Marco Mambelli
service gwms-frontend reconfig
97 1 Marco Mambelli
service gwms-frontend start
98 3 Marco Mambelli
</code></pre>
99 1 Marco Mambelli
100 3 Marco Mambelli
101 1 Marco Mambelli
h2. Changes to Factory software
102 1 Marco Mambelli
103 3 Marco Mambelli
<pre><code class="shell">
104 1 Marco Mambelli
105 1 Marco Mambelli
106 1 Marco Mambelli
# For SL6
107 1 Marco Mambelli
export MYPYTHON=python2.6
108 1 Marco Mambelli
# For SL7
109 1 Marco Mambelli
export MYPYTHON=python2.7
110 1 Marco Mambelli
111 1 Marco Mambelli
pushd /usr/sbin
112 1 Marco Mambelli
mkdir -p /opt/fromrpm/usr_sbin
113 1 Marco Mambelli
114 1 Marco Mambelli
mv checkFactory.py* glideFactoryEntryGroup.py* glideFactoryEntry.py* glideFactory.py* manageFactoryDowntimes.py* stopFactory.py* /opt/fromrpm/usr_sbin/
115 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
116 1 Marco Mambelli
117 1 Marco Mambelli
# already in: pushd /usr/sbin
118 1 Marco Mambelli
mkdir -p /opt/fromrpm/usr_sbin
119 1 Marco Mambelli
mv clone_glidein glidecondor_createSecCol glidecondor_addDN glidecondor_createSecSched info_glidein reconfig_glidein /opt/fromrpm/usr_sbin
120 1 Marco Mambelli
## Not in factory  mv reconfig_frontend /opt/fromrpm/usr_sbin   # reconfig_frontend is not there at start
121 1 Marco Mambelli
for i in glidecondor_createSecCol glidecondor_addDN glidecondor_createSecSched; do ln -s /opt/gwms-git/glideinwms/install/$i $i; done
122 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
123 1 Marco Mambelli
124 1 Marco Mambelli
mkdir -p /opt/fromrpm/usr_bin
125 1 Marco Mambelli
mv /usr/bin/glidein* /opt/fromrpm/usr_bin/
126 1 Marco Mambelli
pushd /usr/bin/
127 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
128 1 Marco Mambelli
129 1 Marco Mambelli
cd /usr/lib/$MYPYTHON/site-packages/
130 1 Marco Mambelli
mv glideinwms/ fromrpm_glideinwms
131 1 Marco Mambelli
mkdir glideinwms
132 1 Marco Mambelli
cd glideinwms
133 1 Marco Mambelli
for i in creation  factory  __init__.py lib  tools; do ln -s /opt/gwms-git/glideinwms/$i $i; done
134 1 Marco Mambelli
135 1 Marco Mambelli
# no touching files in /etc
136 1 Marco Mambelli
137 1 Marco Mambelli
cd /var/lib/gwms-factory/
138 1 Marco Mambelli
mkdir fromrpm
139 1 Marco Mambelli
mv creation web-base fromrpm/
140 1 Marco Mambelli
ln -s /opt/gwms-git/glideinwms/creation creation
141 1 Marco Mambelli
ln -s /opt/gwms-git/glideinwms/creation/web_base web-base
142 1 Marco Mambelli
143 1 Marco Mambelli
cd /var/log/gwms-factory/
144 1 Marco Mambelli
mkdir old
145 1 Marco Mambelli
mv client server old
146 1 Marco Mambelli
mkdir client server
147 1 Marco Mambelli
chown gfactory: server
148 1 Marco Mambelli
149 1 Marco Mambelli
# For SL6
150 1 Marco Mambelli
/etc/init.d/gwms-factory upgrade
151 1 Marco Mambelli
152 1 Marco Mambelli
# For SL7
153 1 Marco Mambelli
/usr/sbin/gwms-factory upgrade
154 1 Marco Mambelli
#/usr/sbin/gwms-factory reconfig
155 1 Marco Mambelli
/bin/systemctl start gwms-factory
156 1 Marco Mambelli
157 3 Marco Mambelli
</code></pre>
158 1 Marco Mambelli
159 1 Marco Mambelli
160 1 Marco Mambelli
161 1 Marco Mambelli
h3. Restart the Factory
162 3 Marco Mambelli
163 3 Marco Mambelli
<pre><code class="shell">
164 3 Marco Mambelli
service gwms-factory upgrade
165 3 Marco Mambelli
service gwms-factory reconfig
166 3 Marco Mambelli
service gwms-factory start
167 3 Marco Mambelli
</code></pre>