- integration of the Splitter-NG framework
authorJosef Spillner <josef.spillner@tu-dresden.de>
Tue, 2 Dec 2014 21:35:33 +0000 (22:35 +0100)
committerJosef Spillner <josef.spillner@tu-dresden.de>
Tue, 2 Dec 2014 21:35:33 +0000 (22:35 +0100)
- improved launching process

integration/createvbox.sh
integration/run-nubigate-vm.sh
scripts/fill-demonstrator-nubisave-system.sh
scripts/fill-demonstrator-splitterng.sh [new file with mode: 0755]
scripts/fill-demonstrator.sh

index 15788c0..0062a42 100755 (executable)
@@ -2,9 +2,11 @@
 #
 # Syntax: createvbox.sh [<vdi>] [<name>] [start]
 
+date=`date +%Y%m%d`
+
 vdi=$PWD/nubigate-unreleased.vdi
 img=$PWD/nubigate-unreleased.img
-vmname="NubiGate Unreleased"
+vmname="NubiGate Unreleased $date"
 if [ ! -z $1 ] && [ "$1" != "start" ]; then
        vdi=$1
        shift
@@ -63,6 +65,7 @@ if [ $? -ne 0 ]; then
        redir ssh 22 $(($baseport+1))
        redir web 80 $(($baseport+2))
        redir tomcat 8080 $(($baseport+3))
+       redir vnc 5900 $((baseport+4))
        baseport=$(($baseport+10))
        echo $baseport > ~/.vboxautoconfig
 else
index b099c16..41b25d8 100755 (executable)
@@ -1,5 +1,10 @@
 #!/bin/sh
 
+if [ -z $1 ]; then
+       echo "Syntax: $0 <vm-image.img/.vdi>" >&2
+       exit 1
+fi
+
 img=$1
 baseimg=`basename $1`
 
@@ -17,10 +22,11 @@ if [ ! -f $img ]; then
 fi
 echo "Booting VM $img..."
 
-isvdi=`echo $baseimg | grep -q vdi`
+echo $baseimg | grep -q vdi
+isvdi=$?
 
 if [ $isvdi -eq 0 ]; then
-       $PWD/createvbox.sh $img start
+       $PWD/integration/createvbox.sh $img start
 else
        bridging=0
 
index 8982290..dcfa918 100755 (executable)
@@ -80,7 +80,7 @@ sudo chroot $system a2ensite cloud.dav
 #echo "127.0.0.1 cloud" | sudo tee -a $system/etc/hosts >/dev/null
 
 grep -v "^exit 0" $system/etc/rc.local > .rc.local
-echo "su -c 'nubisave headless && sleep 6 && nubisave-mounter && sleep 3 && mkdir -p /home/demo/nubisave/owncloud/admin && chown www-data:www-data /home/demo/nubisave/owncloud' demo &" >> .rc.local
+echo "su -c 'nubisave headless >> ~/.nubisave.log && sleep 6 && nubisave-mounter >> ~/.nubisave-mounter.log && sleep 3 && mkdir -p /home/demo/nubisave/owncloud/admin && chown www-data:www-data /home/demo/nubisave/owncloud' demo &" >> .rc.local
 chmod +x .rc.local
 sudo mv .rc.local $system/etc/rc.local
 
diff --git a/scripts/fill-demonstrator-splitterng.sh b/scripts/fill-demonstrator-splitterng.sh
new file mode 100755 (executable)
index 0000000..3398564
--- /dev/null
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+system=system
+origdir=$PWD
+
+mkdir -p _checkouts
+cd _checkouts
+if [ ! -d splitter-ng ]; then
+       git clone git://nubisave.org/git/splitter-ng
+else
+       cd splitter-ng
+       git pull
+fi
+cd $origdir
+
+cd _checkouts/splitter-ng
+ant
+cd $origdir
+
+sudo cp -r _checkouts/splitter-ng $system/opt
+
+sudo chroot $system chown -R demo:demo /opt/splitter-ng
index 0f45a1a..867aac8 100755 (executable)
@@ -5,7 +5,7 @@ system=system
 highlight="\e[1m\e[32m"
 reset="\e[0m\e[0m"
 
-for proto in nubisave-system nubivis-system adaptivesyncer owncloud-system system
+for proto in nubisave-system nubivis-system adaptivesyncer owncloud-system splitterng system
 do
        echo -e "${highlight}Building/Integrating $proto...${reset}"
        ./scripts/fill-demonstrator-$proto.sh