-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-start.sh
executable file
·55 lines (46 loc) · 1.35 KB
/
docker-start.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
#!/bin/bash
if [ "$1" = "head-node" ]; then
/etc/init.d/ssh restart
echo "Installing AGE on the head node..."
rm -rf /opt/age/*/default
cd /opt/age/*/ && ./inst_sge -m -auto `pwd`/inst.conf
while true
do
sleep 10
done
fi
if [ "$1" = "compute-node" ]; then
/etc/init.d/ssh restart
echo "Installing AGE on the compute node..."
cat > /etc/ssh/ssh_config << EOF
Host *
StrictHostKeyChecking no
EOF
sleep 5
sudo -u ageadmin ssh head "source /opt/age/*/default/common/settings.sh && qconf -as `hostname`"
sudo -u ageadmin ssh head "source /opt/age/*/default/common/settings.sh && qconf -ah `hostname`"
cd /opt/age/*/ && cat ./inst.conf | sed "s/EXEC_HOST_LIST=.*/EXEC_HOST_LIST=`hostname`/" > ./inst_`hostname`.conf
cd /opt/age/*/ && ./inst_sge -x -auto ./inst_`hostname`.conf
while true
do
sleep 10
done
fi
if [ "$1" = "rsw" ]; then
echo "x"
echo "Installing AGE on the compute node..."
cat > /etc/ssh/ssh_config << EOF
Host *
StrictHostKeyChecking no
EOF
sleep 5
sudo -u ageadmin ssh head "source /opt/age/*/default/common/settings.sh && qconf -as `hostname`"
ln -s /opt/rstudio-age /opt/age/*
/usr/lib/rstudio-server/bin/license-manager activate $RSW_LICENSE
rstudio-server start
rstudio-launcher start
while true
do
sleep 10
done
fi