/
startservices.sh
executable file
·111 lines (106 loc) · 2.92 KB
/
startservices.sh
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
#startservices.sh - starts the various InteGrade modules
#Author: Jose de Ribamar Braga Pinheiro Junior
#Modified by: Andrei Goldchleger, Ricardo Luiz de Andrade Abrantes
#
#!/bin/bash
#set -x
wait=10
in=false
secureAppRepos=false
LRM_PRIORITY="-19"
# Environment Variables
export IG_HOME=/home/pos/vinicius/integrade-mag/
export ANT_HOME=/home/pos/vinicius/programas/ant/
export JACORB_HOME=/home/pos/vinicius/programas/JacORB-2.2.3/
export JAVA_HOME=/home/pos/vinicius/programas/java/
export JADE_HOME=/home/pos/vinicius/programas/jade.new/
export JFREECHART_HOME=
export PATH=${JACORB_HOME}/bin:${JAVA_HOME}/bin:${ANT_HOME}/bin:$PATH
export NS_PORT=47039
#For each command line parameter, executes the associated module
while [ "$1" != "" -o "$in" == "false" ]
do
in=true
case "$1" in
"env")
echo Done!
shift
;;
"servers")
echo Initializing servers
if [ "$GRM_PARENT_IOR" != "" ]
then
echo "GRM will try to contact provided GRM as parent."
elif [ "$GRM_PARENT_NAMING_SERVER_IOR" != "" ]
then
echo "GRM will try to obtain a GRM from provided name server and make it his parent."
else
echo "This will be a root GRM, there will be no parents."
fi
cd $JACORB_HOME/bin
./ns -DOAPort=$NS_PORT &
cd $IG_HOME/clusterManagement/grm/launchTrader/
./settr &
sleep $wait
cd $IG_HOME/clusterManagement/grm/classes/
./runit &
sleep $wait
if [ ${secureAppRepos} = "true" ]
then
cd $IG_HOME/clusterManagement/arsm/classes/
./runit &
sleep $wait
fi
cd $IG_HOME/clusterManagement/applicationRepository/classes/
./runit &
cd $IG_HOME
./runjade &
shift
;;
"lrm")
echo Initializing agentHandler
sleep $wait
cd $IG_HOME/mag/classes
./runit &
echo Initializing lrm
sleep $wait
cd $IG_HOME/resourceProviders/lrm
nice "${LRM_PRIORITY}" ./LrmLauncher &
shift
;;
"asctGui")
echo Initializing asctGui
cd $IG_HOME/tools/asct/classes
./runit &
sleep $wait
shift
;;
"clusterview")
cd $IG_HOME/tools/clusterView/classes
./runit &
sleep $wait
shift
;;
"all")
shift
echo Initializing all
. $0 env
$0 servers
$0 clusterview
$0 lrm
$0 asctGui
;;
*)
echo " "
echo "Usage: $0 <lrm> <asct> <asctGui> <servers> <clusterview> <env> <all>"
echo
echo "env -> Sets environment variables. Execute with a leading 'dot' (e.g.) . $0"
echo "servers -> Initializes server side modules(GRM and Application Repository)"
echo "clusterview -> Initializes the graphical resource monitor"
echo "lrm -> Initializes the Local Resorce Manager"
echo "asctGui -> Initializes the Graphical Application submittion and Control tool"
echo "all -> Initializes all modules"
echo
shift
esac
done