summaryrefslogtreecommitdiffstats
path: root/jenkins-server-slave-setup/nodes/sgothel-solaris10-nvquadro-020_021/start-ssh-jenkins-solaris.sh
blob: 9f2d4ecf2640375f8540cd0edd04e4cb339057bb (plain)
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
#! /bin/bash

cd ~/jenkins

rm -f slave.jar
# wget --no-check-certificate https://jogamp.org/chuck/jnlpJars/slave.jar
scp chuckslave@jogamp.org:/srv/jenkins/war/WEB-INF/slave.jar .

function connect_1 {
  # solaris-x86_32-nv
  . /opt-share/etc/profile.ant
  export PATH=/usr/java/bin:$PATH
  #. /opt-solaris-x86/etc/profile.jre6
  #. /opt-solaris-x86/etc/profile.j2se6

  export SOURCE_LEVEL=1.6
  export TARGET_LEVEL=1.6
  export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar

  export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"

  java -d32 -version
  which java
  sshpid=
  while true ; do
    if [ ! -z "$sshpid" ] ; then
	kill -9 $sshpid
    fi
    ssh -o "ServerAliveInterval 30" -o "ServerAliveCountMax 5" -o "KeepAlive yes" chuckslave@jogamp.org -L 6020:localhost:5555 -N &
    sshpid=$!
    java -d32 -server -jar slave.jar -jnlpUrl https://jogamp.org/chuck/computer/solaris-NVQUADRO-solaris10-jogamp-x32-sgothel-020/slave-agent.jnlp
  done
}

function connect_2 {
  # solaris-x86_64-nv
  . /opt-share/etc/profile.ant
  export PATH=/usr/java/bin/amd64:$PATH
  #. /opt-solaris-x86_64/etc/profile.jre6
  #. /opt-solaris-x86_64/etc/profile.j2se6

  export SOURCE_LEVEL=1.6
  export TARGET_LEVEL=1.6
  export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar

  export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org"

  java -d64 -version
  sshpid=
  while true ; do
    if [ ! -z "$sshpid" ] ; then
	kill -9 $sshpid
    fi
    ssh -o "ServerAliveInterval 30" -o "ServerAliveCountMax 5" -o "KeepAlive yes" chuckslave@jogamp.org -L 6021:localhost:5555 -N &
    sshpid=$!
    java -d64 -server -Xmx1024m -jar slave.jar -jnlpUrl https://jogamp.org/chuck/computer/solaris-NVQUADRO-solaris10-jogamp-x64-sgothel-021/slave-agent.jnlp
  done
}

connect_1 > solaris-NVQUADRO-solaris10-jogamp-x32-sgothel-020.log 2>&1 &
disown $!

connect_2 > solaris-NVQUADRO-solaris10-jogamp-x64-sgothel-021.log 2>&1 &
disown $!