forked from PanDAWMS/panda-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathINSTALL.txt
150 lines (94 loc) · 4.05 KB
/
INSTALL.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
Installation
--------------------
1. install panda-common and panda-server.
* For tar-ball installation
1. Checkout packages from git
$ git clone git://[email protected]/PanDAWMS/panda-common.git
$ git clone git://[email protected]/PanDAWMS/panda-server.git
2. Build and install
$ cd panda-common
$ python setup.py install
$ cd ../panda-server
$ python setup.py install
* For RPM installation
First you need to install CERN_Grid_Certification_Authority.pem. If you use Scientific Linux it is just
$ yum install CERN-CA-certs
Otherwise the installation has to be done manually:
1. Download the CERN Grid Certification Authority Certificate from https://gridca.cern.ch/gridca/
$ wget https://cafiles.cern.ch/cafiles/certificates/CERN%20Grid%20Certification%20Authority.crt
2. Copy to system location and rename. For example,
$ sudo mv "CERN Grid Certification Authority.crt" /etc/pki/tls/certs/CERN_Grid_Certification_Authority.pem
Next, configure PanDA yum repository
$ sudo wget --directory-prefix /etc/yum.repos.d/ --no-check-certificate https://pandabuild.cern.ch:443/misc/pandabuild.repo
Make sure that sslcacert in pandabuild.repo is consistent if you manully installed CERN_Grid_Certification_Authority.pem.
Finally,
$ sudo yum install panda-server
2. Modify config files
$ cd INSTALLDIR/etc/panda
$ mv panda_common.cfg.rpmnew panda_common.cfg
$ mv panda_server.cfg.rpmnew panda_server.cfg
$ mv panda_server-httpd-FastCGI.conf.rpmnew panda_server-httpd.conf
$ emacs -nw panda_server.cfg
fix FIXME
dq2_dir = /opt/dq2
->
dq2_dir = /data/atlpan/DQ2Clients/DQ2Clients
$ emacs -nw panda_server-httpd.conf
SSLCertificateFile InstallDir/etc/panda/server.crt
SSLCertificateKeyFile InstallDir/etc/panda/server.key
->
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
$ cp INSTALLDIR/etc/panda/panda_server.sysconfig /etc/sysconfig/panda_server
$ emacs -nw /etc/sysconfig/panda_server # Edit and correct the URLs to your needs and check the correct values
3. Add .gacl
$ cd INSTALLDIR/lib/python*/site-packages/pandaserver/server/
$ emacs -nw .gacl
<gacl>
<entry>
<any-user/>
<allow><read/><list/></allow>
</entry>
</gacl>
4. Add grid-env.sh if needed
e.g.,
$ cat INSTALLDIR/etc/grid-env.sh
export LD_LIBRARY_PATH=/opt/glite/lib64:/opt/globus/lib:/opt/lcg/lib64:$LD_LIBRARY_PATH
export PYTHONPATH=/opt/glite/lib64/python:/opt/lcg/lib64/python:$PYTHONPATH
export PATH=/opt/edg/bin:/opt/glite/bin:/opt/globus/bin:/opt/lcg/bin:$PATH
and modify panda_server.cfg
$ emacs -nw INSTALLDIR/etc/panda/panda_server.cfg
glite_source = /opt/glite/etc/profile.d/grid-env.sh
->
glite_source = INSTALLDIR/etc/grid-env.sh
5. Make log and cache dirs, and change owner if RPM is used
mkdir -p /var/log/panda
mkdir -p /var/log/panda/wsgisocks
mkdir -p /var/cache/pandaserver
chown atlpan:zp /var/log/panda
chown atlpan:zp /var/log/panda/wsgisocks
chown atlpan:zp /var/cache/pandaserver
# If log rotation is needed
cp /etc/panda/panda_server.logrotate /etc/logrotate.d/panda_server
6. For voatlas
cp ~/devsrv/share/httpd-pandasrv /etc/rc.d/init.d/
/sbin/chkconfig --add httpd-pandasrv
cp ~/devsrv/share/panda_server-httpd.conf.VM /data/atlpan/srv/etc/panda/panda_server-httpd.conf
cp ~/devsrv/share/panda_server.cfg.VM /data/atlpan/srv/etc/panda/panda_server.cfg
cp ~/devsrv/share/x509up_u25606_novoms /data/atlpan/
chown atlpan:zp /data/atlpan/x509up_u25606_novoms
cp ~/devsrv/share/pandasrv /etc/logrotate.d/
cp ~/devsrv/share/pandasrv.cron /etc/cron.d/
Start the server
--------------------
Install service
$ sudo ln -fs INSTALLDIR/etc/init.d/panda_server /etc/rc.d/init.d/httpd-pandasrv
$ sudo /sbin/chkconfig --add httpd-pandasrv
$ sudo /sbin/chkconfig httpd-pandasrv on
Add the following to crontab.
0-59/5 * * * * INSTALLDIR/usr/bin/panda_server-add.sh > /dev/null 2>&1
15 0-21/3 * * * INSTALLDIR/usr/bin/panda_server-copyArchive.sh > /dev/null 2>&1
Run the server.
$ sudo /sbin/service httpd-pandasrv start
Stop the server.
$ sudo /sbin/service httpd-pandasrv stop