[ARVADOS] updated: 28fb859d989c295e1f44aed96a7478e8454db4d5

Git user git at public.curoverse.com
Tue Apr 12 13:45:11 EDT 2016


Summary of changes:
 doc/install/arvbox.html.textile.liquid | 11 +++++------
 tools/arvbox/bin/arvbox                | 27 ++++++++++++++++++---------
 2 files changed, 23 insertions(+), 15 deletions(-)

       via  28fb859d989c295e1f44aed96a7478e8454db4d5 (commit)
      from  207136fe4f9787ac7f99cba448ed5a2a05a6f8dd (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 28fb859d989c295e1f44aed96a7478e8454db4d5
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Tue Apr 12 13:45:08 2016 -0400

    Rename "rebuild" back to "reboot" and change "rebuild" to mean "build
    --no-cache". "arvbox start" no longer fails if the container is already
    running. Update docs.  no issue #

diff --git a/doc/install/arvbox.html.textile.liquid b/doc/install/arvbox.html.textile.liquid
index 3ddc7c8..9c8cd49 100644
--- a/doc/install/arvbox.html.textile.liquid
+++ b/doc/install/arvbox.html.textile.liquid
@@ -26,9 +26,8 @@ h2. Usage
 $ arvbox
 Arvados-in-a-box                      http://arvados.org
 
-arvbox (build|start|run|open|shell|ip|stop|rebuild|reset|destroy|log|svrestart)
-
-build <config>      build arvbox Docker image
+build   <config>      build arvbox Docker image
+rebuild <config>      build arvbox Docker image, no layer cache
 start|run <config>  start arvbox container
 open       open arvbox workbench in a web browser
 shell      enter arvbox shell
@@ -37,7 +36,7 @@ host       print arvbox published host
 status     print some information about current arvbox
 stop       stop arvbox container
 restart <config>  stop, then run again
-rebuild  <config>  stop, build arvbox Docker image, run
+reboot  <config>  stop, build arvbox Docker image, run
 reset      delete arvbox arvados data (be careful!)
 destroy    delete all arvbox code and data (be careful!)
 log <service> tail log of specified service
@@ -122,14 +121,14 @@ h2. Making Arvbox accessible from other hosts
 In "dev" and "localdemo" mode, Arvbox can only be accessed on the same host it is running.  To publish Arvbox service ports to the host's service ports and advertise the host's IP address for services, use @publicdev@ or @publicdemo@:
 
 <pre>
-$ arvbox rebuild publicdemo
+$ arvbox start publicdemo
 </pre>
 
 This attempts to auto-detect the correct IP address to use by taking the IP address of the default route device.  If the auto-detection is wrong, you want to publish a hostname instead of a raw address, or you need to access it through a different device (such as a router or firewall), set @ARVBOX_PUBLISH_IP@ to the desire hostname or IP address.
 
 <pre>
 $ export ARVBOX_PUBLISH_IP=example.com
-$ arvbox rebuild publicdemo
+$ arvbox start publicdemo
 </pre>
 
 Note: this expects to bind the host's port 80 (http) for workbench, so you cannot have a conflicting web server already running on the host.  It does not attempt to take bind the host's port 22 (ssh), as a result the arvbox ssh port is not published.
diff --git a/tools/arvbox/bin/arvbox b/tools/arvbox/bin/arvbox
index 928adf8..2e46886 100755
--- a/tools/arvbox/bin/arvbox
+++ b/tools/arvbox/bin/arvbox
@@ -101,8 +101,13 @@ wait_for_arvbox() {
 }
 
 run() {
+    if docker ps -a --filter "status=running" | grep -E "$ARVBOX_CONTAINER$" -q ; then
+        echo "Container $ARVBOX_CONTAINER is already running"
+        exit 0
+    fi
+
     if docker ps -a | grep -E "$ARVBOX_CONTAINER$" -q ; then
-        echo "Container $ARVBOX_CONTAINER is already running, use stop, restart or rebuild"
+        echo "Container $ARVBOX_CONTAINER already exists but is not running; use restart or rebuild"
         exit 1
     fi
 
@@ -247,11 +252,11 @@ build() {
         echo "Could not find Dockerfile (expected it at $ARVBOX_DOCKER/Dockerfile.base)"
         exit 1
     fi
-    docker build -t arvados/arvbox-base -f "$ARVBOX_DOCKER/Dockerfile.base" "$ARVBOX_DOCKER"
+    docker build $NO_CACHE -t arvados/arvbox-base -f "$ARVBOX_DOCKER/Dockerfile.base" "$ARVBOX_DOCKER"
     if test "$1" = localdemo -o "$1" = publicdemo ; then
-        docker build -t arvados/arvbox-demo -f "$ARVBOX_DOCKER/Dockerfile.demo" "$ARVBOX_DOCKER"
+        docker build $NO_CACHE -t arvados/arvbox-demo -f "$ARVBOX_DOCKER/Dockerfile.demo" "$ARVBOX_DOCKER"
     else
-        docker build -t arvados/arvbox-dev -f "$ARVBOX_DOCKER/Dockerfile.dev" "$ARVBOX_DOCKER"
+        docker build $NO_CACHE -t arvados/arvbox-dev -f "$ARVBOX_DOCKER/Dockerfile.dev" "$ARVBOX_DOCKER"
     fi
 }
 
@@ -277,6 +282,11 @@ case "$subcmd" in
         build $@
         ;;
 
+    rebuild)
+        check $@
+        NO_CACHE=--no-cache build $@
+        ;;
+
     start|run)
         check $@
         run $@
@@ -300,7 +310,7 @@ case "$subcmd" in
         run $@
         ;;
 
-    rebuild)
+    reboot)
         check $@
         stop
         build $@
@@ -413,9 +423,8 @@ case "$subcmd" in
     *)
         echo "Arvados-in-a-box                      http://arvados.org"
         echo
-        echo "$(basename $0) (build|start|run|open|shell|ip|stop|rebuild|reset|destroy|log|svrestart)"
-        echo
-        echo "build <config>      build arvbox Docker image"
+        echo "build   <config>      build arvbox Docker image"
+        echo "rebuild <config>      build arvbox Docker image, no layer cache"
         echo "start|run <config>  start $ARVBOX_CONTAINER container"
         echo "open       open arvbox workbench in a web browser"
         echo "shell      enter arvbox shell"
@@ -424,7 +433,7 @@ case "$subcmd" in
         echo "status     print some information about current arvbox"
         echo "stop       stop arvbox container"
         echo "restart <config>  stop, then run again"
-        echo "rebuild <config>  stop, build arvbox Docker image, run"
+        echo "reboot  <config>  stop, build arvbox Docker image, run"
         echo "reset      delete arvbox arvados data (be careful!)"
         echo "destroy    delete all arvbox code and data (be careful!)"
         echo "log <service> tail log of specified service"

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list