[ARVADOS] updated: c7143dc92806d7b0c6f434e91744a04e5283284d

Git user git at public.curoverse.com
Wed Mar 8 15:33:54 EST 2017


Summary of changes:
 tools/arvbox/bin/arvbox                            | 78 ++++++++++++----------
 .../arvbox/docker/service/websockets/run-service   | 39 ++++++-----
 2 files changed, 66 insertions(+), 51 deletions(-)

       via  c7143dc92806d7b0c6f434e91744a04e5283284d (commit)
       via  005595fb1a7da851a863118fba7e3d00026fb3a3 (commit)
      from  533a50bbcee4ece451a65e87066563a5b33ef150 (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 c7143dc92806d7b0c6f434e91744a04e5283284d
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Mar 8 15:33:50 2017 -0500

    Add ability to use "arvbox start test" to re-run tests without tearing down &
    restarting whole container.  no issue #

diff --git a/tools/arvbox/bin/arvbox b/tools/arvbox/bin/arvbox
index 4749131..395129d 100755
--- a/tools/arvbox/bin/arvbox
+++ b/tools/arvbox/bin/arvbox
@@ -106,14 +106,22 @@ run() {
 
     shift
 
+    need_setup=1
+
     if docker ps -a --filter "status=running" | grep -E "$ARVBOX_CONTAINER$" -q ; then
-        echo "Container $ARVBOX_CONTAINER is already running"
-        exit 0
+        if test "$CONFIG" = test ; then
+            need_setup=0
+        else
+            echo "Container $ARVBOX_CONTAINER is already running"
+            exit 0
+        fi
     fi
 
-    if docker ps -a | grep -E "$ARVBOX_CONTAINER$" -q ; then
-        echo "Container $ARVBOX_CONTAINER already exists but is not running; use restart or rebuild"
-        exit 1
+    if test $need_setup = 1 ; then
+        if docker ps -a | grep -E "$ARVBOX_CONTAINER$" -q ; then
+            echo "Container $ARVBOX_CONTAINER already exists but is not running; use restart or reboot"
+            exit 1
+        fi
     fi
 
     if test ! -z "$TAG"
@@ -186,35 +194,37 @@ run() {
 
             mkdir -p $VAR_DATA/test
 
-            docker run \
-                   --detach \
-                   --name=$ARVBOX_CONTAINER \
-                   --privileged \
-                   "--volume=$ARVADOS_ROOT:/usr/src/arvados:rw" \
-                   "--volume=$SSO_ROOT:/usr/src/sso:rw" \
-                   "--volume=$PG_DATA:/var/lib/postgresql:rw" \
-                   "--volume=$VAR_DATA:/var/lib/arvados:rw" \
-                   "--volume=$PASSENGER:/var/lib/passenger:rw" \
-                   "--volume=$GEMS:/var/lib/gems:rw" \
-                   "--volume=$PIPCACHE:/var/lib/pip:rw" \
-                   "--volume=$GOSTUFF:/var/lib/gopath:rw" \
-                   arvados/arvbox-dev$TAG \
-                   /usr/local/bin/runsvinit -svdir=/etc/test-service
-
-            docker exec -ti \
-                    $ARVBOX_CONTAINER \
-                    /usr/local/lib/arvbox/runsu.sh \
-                    /usr/local/lib/arvbox/waitforpostgres.sh
-
-            docker exec -ti \
-                   $ARVBOX_CONTAINER \
-                   /usr/local/lib/arvbox/runsu.sh \
-                   /var/lib/arvbox/service/sso/run-service --only-setup
-
-            docker exec -ti \
-                   $ARVBOX_CONTAINER \
-                   /usr/local/lib/arvbox/runsu.sh \
-                   /var/lib/arvbox/service/api/run-service --only-setup
+            if test "$need_setup" = 1 ; then
+                docker run \
+                       --detach \
+                       --name=$ARVBOX_CONTAINER \
+                       --privileged \
+                       "--volume=$ARVADOS_ROOT:/usr/src/arvados:rw" \
+                       "--volume=$SSO_ROOT:/usr/src/sso:rw" \
+                       "--volume=$PG_DATA:/var/lib/postgresql:rw" \
+                       "--volume=$VAR_DATA:/var/lib/arvados:rw" \
+                       "--volume=$PASSENGER:/var/lib/passenger:rw" \
+                       "--volume=$GEMS:/var/lib/gems:rw" \
+                       "--volume=$PIPCACHE:/var/lib/pip:rw" \
+                       "--volume=$GOSTUFF:/var/lib/gopath:rw" \
+                       arvados/arvbox-dev$TAG \
+                       /usr/local/bin/runsvinit -svdir=/etc/test-service
+
+                docker exec -ti \
+                       $ARVBOX_CONTAINER \
+                       /usr/local/lib/arvbox/runsu.sh \
+                       /usr/local/lib/arvbox/waitforpostgres.sh
+
+                docker exec -ti \
+                       $ARVBOX_CONTAINER \
+                       /usr/local/lib/arvbox/runsu.sh \
+                       /var/lib/arvbox/service/sso/run-service --only-setup
+
+                docker exec -ti \
+                       $ARVBOX_CONTAINER \
+                       /usr/local/lib/arvbox/runsu.sh \
+                       /var/lib/arvbox/service/api/run-service --only-setup
+            fi
 
             docker exec -ti \
                    $ARVBOX_CONTAINER \

commit 005595fb1a7da851a863118fba7e3d00026fb3a3
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Wed Mar 8 15:33:00 2017 -0500

    Arvbox now uses Go websockets server instead of Puma. no issue #

diff --git a/tools/arvbox/lib/arvbox/docker/service/websockets/run-service b/tools/arvbox/lib/arvbox/docker/service/websockets/run-service
index d0c0b5d..d2f010b 100755
--- a/tools/arvbox/lib/arvbox/docker/service/websockets/run-service
+++ b/tools/arvbox/lib/arvbox/docker/service/websockets/run-service
@@ -5,26 +5,31 @@ set -ex -o pipefail
 
 . /usr/local/lib/arvbox/common.sh
 
-cd /usr/src/arvados/services/api
-export RAILS_ENV=development
+mkdir -p /var/lib/gopath
+cd /var/lib/gopath
 
-run_bundler --without=development
+export GOPATH=$PWD
+mkdir -p "$GOPATH/src/git.curoverse.com"
+ln -sfn "/usr/src/arvados" "$GOPATH/src/git.curoverse.com/arvados.git"
+flock /var/lib/gopath/gopath.lock go get -t "git.curoverse.com/arvados.git/services/ws"
+install bin/ws /usr/local/bin/arvados-ws
 
 if test "$1" = "--only-deps" ; then
     exit
 fi
 
-flock /var/lib/arvados/api.lock /usr/local/lib/arvbox/api-setup.sh
-
-set +u
-if test "$1" = "--only-setup" ; then
-    exit
-fi
-
-export ARVADOS_WEBSOCKETS=ws-only
-
-# serving ssl directly doesn't work, gets
-# Rack app error: #<TypeError: no implicit conversion of Puma::MiniSSL::Socket into Integer>
-#exec bundle exec puma -b "ssl://0.0.0.0:${services[websockets]}?cert=/var/lib/arvados/self-signed.pem&key=/var/lib/arvados/self-signed.key"
-
-exec bundle exec puma -p${services[websockets]}
+database_pw=$(cat /var/lib/arvados/api_database_pw)
+
+cat >/var/lib/arvados/arvados-ws.yml <<EOF
+Client:
+  APIHost: $localip:${services[api]}
+  Insecure: true
+Postgres:
+  dbname: arvados_development
+  user: arvados
+  password: $database_pw
+  host: localhost
+Listen: :8002
+EOF
+
+exec /usr/local/bin/arvados-ws -config /var/lib/arvados/arvados-ws.yml

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list