.
[corvix.git] / var / deb-package / corvix-cluster / head / install-40queue
blob18fd3f0f737b3cca75de7fee5a1e0542a458b164
1 #!/bin/zsh
2 ver_maui=3.2.6p19
3 ver_torque=2.1.6
5 _prepare() {
6 [[ -d /usr/src/cluster ]] || mkdir -p /usr/src/cluster
7 cd /usr/src/cluster
9 [[ -e torque-$ver_torque.tar.gz ]] || wget http://www.clusterresources.com/downloads/torque/torque-$ver_torque.tar.gz
10 [[ -e maui-$ver_maui.tar.gz ]] || wget http://www.clusterresources.com/downloads/maui/maui-$ver_maui.tar.gz
12 tar xzf torque-$ver_torque.tar.gz
13 tar xzf maui-$ver_maui.tar.gz
16 _compile_torque() {
17 cd /usr/src/cluster/torque-$ver_torque
18 ./configure --enable-server --enable-monitor --enable-clients --enable-syslog
19 make -j 4
20 make install
22 _compile_maui() {
23 cd /usr/src/cluster/maui-$ver_maui
24 export MAUIADMIN=root
25 ./configure --with-spooldir=/var/spool/torque --with-pbs=/usr/local --with-key=666
26 make -j 4
27 make install
30 _make_mirror() {
31 cp /usr/src/cluster/torque-$ver_torque.tar.gz /opt/cluster/lib/www/corvix/
32 cp /usr/src/cluster/maui-$ver_maui.tar.gz /opt/cluster/lib/www/corvix/
35 _configure_queue() {
36 echo "Warning! Use internal hostname only."
37 read
38 echo y | /usr/local/sbin/pbs_server -t create
39 cat << eof | qmgr
40 # Create and define queue batch
41 create queue batch
42 set queue batch queue_type = Execution
43 set queue batch acl_host_enable = False
44 set queue batch resources_default.nodes = 1
45 set queue batch resources_default.walltime = 01:00:00
46 set queue batch enabled = True
47 set queue batch started = True
48 # Set server attributes.
49 set server scheduling = True
50 set server default_queue = batch
51 set server log_events = 511
52 set server mail_from = adm
53 set server scheduler_iteration = 600
54 set server node_ping_rate = 300
55 set server node_check_rate = 600
56 set server tcp_timeout = 6
57 #submit hosts
58 set server submit_hosts += nigol1
59 set server submit_hosts += nigol2
60 set server submit_hosts += head
61 set server managers += root@nigol1
62 set server operators += root@nigol1
63 set server managers += root@nigol2
64 set server operators += root@nigol2
65 # mailing
66 set server mail_from="wap@physik.uni-kl.de"
67 eof
68 qterm
71 _postinstall() {
72 chmod aog+rwx /var/spool/torque/spool
73 _configure_queue
74 _make_mirror
77 _prepare
78 _compile_torque
79 _compile_maui
80 _postinstall