Merge branch 'master' into 6676-document-sso
[arvados.git] / doc / user / topics / arv-web.html.textile.liquid
index d902216c437654fdc9aa8d69ecad5dfe44bab47b..44e5fd8f3e6e677a98fbd26d099f3ce3d5bb2700 100644 (file)
@@ -6,18 +6,23 @@ title: "Using arv-web"
 
 @arv-web@ enables you to run a custom web service from the contents of an Arvados collection.
 
+{% include 'tutorial_expectations_workstation' %}
+
 h2. Usage
 
 @arv-web@ enables you to set up a web service based on the most recent collection in a project.  An arv-web application is a reproducible, immutable application bundle where the web app is packaged with both the code to run and the data to serve.  Because Arvados Collections can be updated with minimum duplication, it is efficient to produce a new application bundle when the code or data needs to be updated; retaining old application bundles makes it easy to go back and run older versions of your web app.
 
 <pre>
-usage: arv-web.py [-h] --project PROJECT [--port PORT] [--image IMAGE]
+$ cd $HOME/arvados/services/arv-web
+usage: arv-web.py [-h] --project-uuid PROJECT_UUID [--port PORT]
+                  [--image IMAGE]
 
 optional arguments:
-  -h, --help         show this help message and exit
-  --project PROJECT  Project to watch
-  --port PORT        Local bind port
-  --image IMAGE      Docker image to run
+  -h, --help            show this help message and exit
+  --project-uuid PROJECT_UUID
+                        Project uuid to watch
+  --port PORT           Host port to listen on (default 8080)
+  --image IMAGE         Docker image to run
 </pre>
 
 At startup, @arv-web@ queries an Arvados project and mounts the most recently modified collection into a temporary directory.  It then runs a Docker image with the collection bound to @/mnt@ inside the container.  When a new collection is added to the project, or an existing project is updated, it will stop the running Docker container, unmount the old collection, mount the new most recently modified collection, and restart the Docker container with the new mount.
@@ -36,7 +41,7 @@ To build the Docker image:
 
 h2. Running sample applications
 
-First, in Arvados Workbench, create a new project.  Copy the project UUID from the URL bar (this is the part of the URL after @projects/...@)
+First, in Arvados Workbench, create a new project.  Copy the project UUID from the URL bar (this is the part of the URL after @projects/...@).
 
 Now upload a collection containing a "Python WSGI web app:":http://wsgi.readthedocs.org/en/latest/
 
@@ -89,4 +94,8 @@ You can also serve static content from the @public@ directory of the collection.
 
 h3. Custom images
 
-You can provide your own Docker image.  The Docker image that will be used create the web application container is specified in the "docker_image" file in the root of the collection.  Specify @--image@ on the command @arv-web@ line to override the contents of "docker_image".
+You can provide your own Docker image.  The Docker image that will be used create the web application container is specified in the @docker_image@ file in the root of the collection.  You can also specify @--image@ on the command @arv-web@ line to choose the docker image (this will override the contents of @docker_image@).
+
+h3. Reloading the web service
+
+Stopping the Docker container and starting it again can result in a small amount of downtime.  When the collection containing a new or updated web application uses the same Docker image as the currently running web application, it is possible to avoid this downtime by keeping the existing container and only reloading the web server.  This is accomplished by providing a file called @reload@ in the root of the collection, which should contain the commands necessary to reload the web server inside the container.