[ARVADOS] updated: 9b9ceec0908bdf769109d4df73b3afe1e693c631

git at public.curoverse.com git at public.curoverse.com
Mon Jun 30 15:04:42 EDT 2014


Summary of changes:
 docker/arvdock | 319 ++++++++++++++++++++++++++++++---------------------------
 1 file changed, 169 insertions(+), 150 deletions(-)

       via  9b9ceec0908bdf769109d4df73b3afe1e693c631 (commit)
       via  659ce826d7e04bab793a4a3ab67dcd38cf98326d (commit)
       via  d7c0d242bb848613d5814966162b1c8d298d644d (commit)
      from  4af484d2c161fe75266bef6c43325a44cd3e0afd (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit 9b9ceec0908bdf769109d4df73b3afe1e693c631
Author: Ward Vandewege <ward at curoverse.com>
Date:   Mon Jun 30 15:04:15 2014 -0400

    docker: arvdoc: start up doc and workbench last so it's less likely the
    user will overlook the URL hint that is printed out.

diff --git a/docker/arvdock b/docker/arvdock
index e4a0ca5..372f322 100755
--- a/docker/arvdock
+++ b/docker/arvdock
@@ -204,11 +204,6 @@ function do_start {
         start_keep=true
     fi
 
-    if [[ $start_doc != false ]]
-    then
-        start_container "$start_doc:80" "doc_server" '' '' "arvados/doc"
-    fi
-
     if [[ $start_sso != false ]]
     then
         start_container "$start_sso:443" "sso_server" '' '' "arvados/sso"
@@ -219,11 +214,6 @@ function do_start {
         start_container "$start_api:443" "api_server" '' "sso_server:sso" "arvados/api"
     fi
 
-    if [[ $start_workbench != false ]]
-    then
-        start_container "$start_workbench:80" "workbench_server" '' "api_server:api" "arvados/workbench"
-    fi
-
     if [[ $start_keep != false ]]
     then
         # create `keep_volumes' array with a list of keep mount points
@@ -243,6 +233,16 @@ function do_start {
             "arvados/keep"
     fi
 
+    if [[ $start_doc != false ]]
+    then
+        start_container "$start_doc:80" "doc_server" '' '' "arvados/doc"
+    fi
+
+    if [[ $start_workbench != false ]]
+    then
+        start_container "$start_workbench:80" "workbench_server" '' "api_server:api" "arvados/workbench"
+    fi
+
     if [ -d $HOME/.config/arvados ] || mkdir -p $HOME/.config/arvados
     then
         cat >$HOME/.config/arvados/settings.conf <<EOF

commit 659ce826d7e04bab793a4a3ab67dcd38cf98326d
Author: Ward Vandewege <ward at curoverse.com>
Date:   Mon Jun 30 15:02:16 2014 -0400

    docker: arvdock: whitespace cleanup

diff --git a/docker/arvdock b/docker/arvdock
index 30daabc..e4a0ca5 100755
--- a/docker/arvdock
+++ b/docker/arvdock
@@ -111,18 +111,18 @@ function make_keep_volumes () {
     # Mount a keep volume if we don't already have one
     for mountpoint in $(cut -d ' ' -f 2 /proc/mounts); do
       if [[ -d "$mountpoint/keep" && "$mountpoint" != "/" ]]; then
-	keep_volumes+=($mountpoint)
+        keep_volumes+=($mountpoint)
       fi
     done
 
     # Create any keep volumes that do not yet exist.
     while [ ${#keep_volumes[*]} -lt 2 ]
     do
-	new_keep=$(mktemp -d)
-	echo >&2 "mounting 512M tmpfs keep volume in $new_keep"
-	sudo mount -t tmpfs -o size=512M tmpfs $new_keep
-	mkdir $new_keep/keep
-	keep_volumes+=($new_keep)
+        new_keep=$(mktemp -d)
+        echo >&2 "mounting 512M tmpfs keep volume in $new_keep"
+        sudo mount -t tmpfs -o size=512M tmpfs $new_keep
+        mkdir $new_keep/keep
+        keep_volumes+=($new_keep)
     done
 }
 
@@ -146,106 +146,106 @@ function do_start {
     while [ $# -ge 1 ]
     do
         case $1 in
-	    -d | --doc)
-		case "$2" in
-		    "") start_doc=9898; shift 2 ;;
-		    *)  start_doc=$2; shift 2 ;;
-		esac
-		;;
-	    -s | --sso)
-		case "$2" in
-		    "") start_sso=9901; shift 2 ;;
-		    *)  start_sso=$2; shift 2 ;;
-		esac
-		;;
-	    -a | --api)
-		case "$2" in
-		    "") start_api=9900; shift 2 ;;
-		    *)  start_api=$2; shift 2 ;;
-		esac
-		;;
-	    -w | --workbench)
-		case "$2" in
-		    "") start_workbench=9899; shift 2 ;;
-		    *)  start_workbench=$2; shift 2 ;;
-		esac
-		;;
-	    -k | --keep )
-		start_keep=true
-		shift
-		;;
-	    --ssh)
-		# ENABLE_SSH is a global variable
-		ENABLE_SSH=true
-		shift
-		;;
-	    --)
-		shift
-		break
-		;;
-	    *)
-		usage
-		exit 1
-		;;
-	esac
+            -d | --doc)
+                case "$2" in
+                    "") start_doc=9898; shift 2 ;;
+                    *)  start_doc=$2; shift 2 ;;
+                esac
+                ;;
+            -s | --sso)
+                case "$2" in
+                    "") start_sso=9901; shift 2 ;;
+                    *)  start_sso=$2; shift 2 ;;
+                esac
+                ;;
+            -a | --api)
+                case "$2" in
+                    "") start_api=9900; shift 2 ;;
+                    *)  start_api=$2; shift 2 ;;
+                esac
+                ;;
+            -w | --workbench)
+                case "$2" in
+                    "") start_workbench=9899; shift 2 ;;
+                    *)  start_workbench=$2; shift 2 ;;
+                esac
+                ;;
+            -k | --keep )
+                start_keep=true
+                shift
+                ;;
+            --ssh)
+                # ENABLE_SSH is a global variable
+                ENABLE_SSH=true
+                shift
+                ;;
+            --)
+                shift
+                break
+                ;;
+            *)
+                usage
+                exit 1
+                ;;
+        esac
     done
 
     # If no options were selected, then start all servers.
     if [[ $start_doc == false &&
-	  $start_sso == false &&
-	  $start_api == false &&
-	  $start_workbench == false &&
-	  $start_keep == false ]]
+          $start_sso == false &&
+          $start_api == false &&
+          $start_workbench == false &&
+          $start_keep == false ]]
     then
-	start_doc=9898
-	start_sso=9901
-	start_api=9900
-	start_workbench=9899
-	start_keep=true
+        start_doc=9898
+        start_sso=9901
+        start_api=9900
+        start_workbench=9899
+        start_keep=true
     fi
 
     if [[ $start_doc != false ]]
     then
-	start_container "$start_doc:80" "doc_server" '' '' "arvados/doc"
+        start_container "$start_doc:80" "doc_server" '' '' "arvados/doc"
     fi
 
     if [[ $start_sso != false ]]
     then
-	start_container "$start_sso:443" "sso_server" '' '' "arvados/sso"
+        start_container "$start_sso:443" "sso_server" '' '' "arvados/sso"
     fi
 
     if [[ $start_api != false ]]
     then
-	start_container "$start_api:443" "api_server" '' "sso_server:sso" "arvados/api"
+        start_container "$start_api:443" "api_server" '' "sso_server:sso" "arvados/api"
     fi
 
     if [[ $start_workbench != false ]]
     then
-	start_container "$start_workbench:80" "workbench_server" '' "api_server:api" "arvados/workbench"
+        start_container "$start_workbench:80" "workbench_server" '' "api_server:api" "arvados/workbench"
     fi
 
     if [[ $start_keep != false ]]
     then
-	# create `keep_volumes' array with a list of keep mount points
-	# remove any stale metadata from those volumes before starting them
-	make_keep_volumes
-	for v in ${keep_volumes[*]}
-	do
-	    [ -f $v/keep/.metadata.yml ] && sudo rm $v/keep/.metadata.yml
-	done
-	start_container "25107:25107" "keep_server_0" \
-	    "${keep_volumes[0]}:/dev/keep-0" \
-	    "api_server:api" \
-	    "arvados/keep"
-	start_container "25108:25107" "keep_server_1" \
-	    "${keep_volumes[1]}:/dev/keep-0" \
-	    "api_server:api" \
-	    "arvados/keep"
+        # create `keep_volumes' array with a list of keep mount points
+        # remove any stale metadata from those volumes before starting them
+        make_keep_volumes
+        for v in ${keep_volumes[*]}
+        do
+            [ -f $v/keep/.metadata.yml ] && sudo rm $v/keep/.metadata.yml
+        done
+        start_container "25107:25107" "keep_server_0" \
+            "${keep_volumes[0]}:/dev/keep-0" \
+            "api_server:api" \
+            "arvados/keep"
+        start_container "25108:25107" "keep_server_1" \
+            "${keep_volumes[1]}:/dev/keep-0" \
+            "api_server:api" \
+            "arvados/keep"
     fi
 
     if [ -d $HOME/.config/arvados ] || mkdir -p $HOME/.config/arvados
     then
-	cat >$HOME/.config/arvados/settings.conf <<EOF
+        cat >$HOME/.config/arvados/settings.conf <<EOF
 ARVADOS_API_HOST=$(ip_address "api_server")
 ARVADOS_API_HOST_INSECURE=yes
 ARVADOS_API_TOKEN=$(cat api/generated/superuser_token)
@@ -274,76 +274,76 @@ function do_stop {
     while [ $# -ge 1 ]
     do
         case $1 in
-	    -d | --doc)
-		stop_doc=doc_server ; shift 2 ;;
-	    -s | --sso)
-		stop_sso=sso_server ; shift 2 ;;
-	    -a | --api)
-		stop_api=api_server ; shift 2 ;;
-	    -w | --workbench)
-		stop_workbench=workbench_server ; shift 2 ;;
-	    -k | --keep )
-		stop_keep="keep_server_0 keep_server_1" ; shift ;;
-	    --ssh)
-		shift
-		;;
-	    --)
-		shift
-		break
-		;;
-	    *)
-		usage
-		exit 1
-		;;
-	esac
+            -d | --doc)
+                stop_doc=doc_server ; shift 2 ;;
+            -s | --sso)
+                stop_sso=sso_server ; shift 2 ;;
+            -a | --api)
+                stop_api=api_server ; shift 2 ;;
+            -w | --workbench)
+                stop_workbench=workbench_server ; shift 2 ;;
+            -k | --keep )
+                stop_keep="keep_server_0 keep_server_1" ; shift ;;
+            --ssh)
+                shift
+                ;;
+            --)
+                shift
+                break
+                ;;
+            *)
+                usage
+                exit 1
+                ;;
+        esac
     done
 
     # If no options were selected, then stop all servers.
     if [[ $stop_doc == "" &&
-	  $stop_sso == "" &&
-	  $stop_api == "" &&
-	  $stop_workbench == "" &&
-	  $stop_keep == "" ]]
+          $stop_sso == "" &&
+          $stop_api == "" &&
+          $stop_workbench == "" &&
+          $stop_keep == "" ]]
     then
-	stop_doc=doc_server
-	stop_sso=sso_server
-	stop_api=api_server
-	stop_workbench=workbench_server
-	stop_keep="keep_server_0 keep_server_1"
+        stop_doc=doc_server
+        stop_sso=sso_server
+        stop_api=api_server
+        stop_workbench=workbench_server
+        stop_keep="keep_server_0 keep_server_1"
     fi
 
     $DOCKER stop $stop_doc $stop_sso $stop_api $stop_workbench $stop_keep \
-	2>/dev/null
+        2>/dev/null
 }
 
 function do_test {
     local alltests
     if [ $# -lt 1 ]
     then
-	alltests="python-sdk api"
+        alltests="python-sdk api"
     else
-	alltests="$@"
+        alltests="$@"
     fi
 
     for testname in $alltests
     do
-	echo "testing $testname..."
-	case $testname in
-	    python-sdk)
-		do_start --api --keep --sso
-		export ARVADOS_API_HOST=$(ip_address "api_server")
-		export ARVADOS_API_HOST_INSECURE=yes
-		export ARVADOS_API_TOKEN=$(cat api/generated/superuser_token)
-		python -m unittest discover ../sdk/python
-		;;
-	    api)
-		$DOCKER run -t -i arvados/api \
-		    /usr/src/arvados/services/api/script/rake_test.sh
-		;;
-	    *)
-		echo >&2 "unknown test $testname"
-		;;
-	esac
+        echo "testing $testname..."
+        case $testname in
+            python-sdk)
+                do_start --api --keep --sso
+                export ARVADOS_API_HOST=$(ip_address "api_server")
+                export ARVADOS_API_HOST_INSECURE=yes
+                export ARVADOS_API_TOKEN=$(cat api/generated/superuser_token)
+                python -m unittest discover ../sdk/python
+                ;;
+            api)
+                $DOCKER run -t -i arvados/api \
+                    /usr/src/arvados/services/api/script/rake_test.sh
+                ;;
+            *)
+                echo >&2 "unknown test $testname"
+                ;;
+        esac
     done
 }
 
@@ -355,24 +355,24 @@ fi
 
 case $1 in
     start)
-	shift
-	do_start $@
-	;;
+        shift
+        do_start $@
+        ;;
     stop)
-	shift
-	do_stop $@
-	;;
+        shift
+        do_stop $@
+        ;;
     restart)
-	shift
-	do_stop $@
-	do_start $@
-	;;
+        shift
+        do_stop $@
+        do_start $@
+        ;;
     test)
-	shift
-	do_test $@
-	;;
+        shift
+        do_test $@
+        ;;
     *)
-	usage
-	exit 1
-	;;
+        usage
+        exit 1
+        ;;
 esac

commit d7c0d242bb848613d5814966162b1c8d298d644d
Author: Ward Vandewege <ward at curoverse.com>
Date:   Mon Jun 30 15:01:28 2014 -0400

    docker: usability improvements for arvdock.

diff --git a/docker/arvdock b/docker/arvdock
index f727f1b..30daabc 100755
--- a/docker/arvdock
+++ b/docker/arvdock
@@ -81,6 +81,24 @@ function start_container {
       echo "    ssh root@$ip"
       echo
     fi
+
+    if [[ "$name" == "doc_server" ]]; then
+      echo
+      echo "*****************************************************************"
+      echo "You can access the Arvados documentation at http://localhost:${port%:*}"
+      echo "*****************************************************************"
+      echo
+    fi
+
+    if [[ "$name" == "workbench_server" ]]; then
+      echo
+      echo "*****************************************************************"
+      echo "You can access the Arvados workbench at http://localhost:${port%:*}"
+      echo "*****************************************************************"
+      echo
+   fi
+
+
 }
 
 declare -a keep_volumes
@@ -188,22 +206,22 @@ function do_start {
 
     if [[ $start_doc != false ]]
     then
-	start_container "9898:80" "doc_server" '' '' "arvados/doc"
+	start_container "$start_doc:80" "doc_server" '' '' "arvados/doc"
     fi
 
     if [[ $start_sso != false ]]
     then
-	start_container "9901:443" "sso_server" '' '' "arvados/sso"
+	start_container "$start_sso:443" "sso_server" '' '' "arvados/sso"
     fi
 
     if [[ $start_api != false ]]
     then
-	start_container "9900:443" "api_server" '' "sso_server:sso" "arvados/api"
+	start_container "$start_api:443" "api_server" '' "sso_server:sso" "arvados/api"
     fi
 
     if [[ $start_workbench != false ]]
     then
-	start_container "9899:80" "workbench_server" '' "api_server:api" "arvados/workbench"
+	start_container "$start_workbench:80" "workbench_server" '' "api_server:api" "arvados/workbench"
     fi
 
     if [[ $start_keep != false ]]
@@ -233,6 +251,7 @@ ARVADOS_API_HOST_INSECURE=yes
 ARVADOS_API_TOKEN=$(cat api/generated/superuser_token)
 EOF
     fi
+
 }
 
 function do_stop {
@@ -279,7 +298,7 @@ function do_stop {
 	esac
     done
 
-    # If no options were selected, then start all servers.
+    # If no options were selected, then stop all servers.
     if [[ $stop_doc == "" &&
 	  $stop_sso == "" &&
 	  $stop_api == "" &&

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list