run_deploy.sh improvements:
authorWard Vandewege <ward@curoverse.com>
Mon, 13 Jul 2015 15:39:25 +0000 (11:39 -0400)
committerWard Vandewege <ward@curoverse.com>
Mon, 13 Jul 2015 15:39:25 +0000 (11:39 -0400)
* Make sure that group_class is included when creating the public docker
  images project.
* Document the required permissions for the arvados token needed to run
  run_deploy.sh

closes #6586

jenkins/run-deploy.sh

index 98e4359349f8e2e42a0b6f0750fcfbafc208adce..519c126d7c275dbeb8d25988b676c0fcf9cce8f1 100755 (executable)
@@ -12,6 +12,17 @@ function usage {
     echo >&2 "  -d, --debug                   Enable debug output"
     echo >&2 "  -h, --help                    Display this help and exit"
     echo >&2
+    echo >&2 "Note: this script requires an arvados token created with these permissions:"
+    echo >&2 '  arv api_client_authorization create_system_auth \'
+    echo >&2 '    --scopes "[\"GET /arvados/v1/virtual_machines\",'
+    echo >&2 '               \"GET /arvados/v1/keep_services\",'
+    echo >&2 '               \"GET /arvados/v1/groups\",'
+    echo >&2 '               \"GET /arvados/v1/links\",'
+    echo >&2 '               \"GET /arvados/v1/groups/\",'
+    echo >&2 '               \"GET /arvados/v1/keep_services/accessible\",'
+    echo >&2 '               \"POST /arvados/v1/collections\",'
+    echo >&2 '               \"POST /arvados/v1/links\"]"'
+    echo >&2
 }
 
 # NOTE: This requires GNU getopt (part of the util-linux package on Debian-based distros).
@@ -146,7 +157,7 @@ DOCKER_IMAGES_PROJECT=`ARVADOS_API_HOST=$ARVADOS_API_HOST ARVADOS_API_TOKEN=$ARV
 if [[ "$DOCKER_IMAGES_PROJECT" == "" ]]; then
   title "Warning: Arvados Standard Docker Images project not found. Creating it."
 
-  DOCKER_IMAGES_PROJECT=`ARVADOS_API_HOST=$ARVADOS_API_HOST ARVADOS_API_TOKEN=$ARVADOS_API_TOKEN arv --format=uuid group create --group "{\"owner_uuid\":\"$IDENTIFIER-tpzed-000000000000000\", \"name\":\"Arvados Standard Docker Images\"}"`
+  DOCKER_IMAGES_PROJECT=`ARVADOS_API_HOST=$ARVADOS_API_HOST ARVADOS_API_TOKEN=$ARVADOS_API_TOKEN arv --format=uuid group create --group "{\"owner_uuid\":\"$IDENTIFIER-tpzed-000000000000000\", \"name\":\"Arvados Standard Docker Images\", \"group_class\":\"project\"}"`
   ARVADOS_API_HOST=$ARVADOS_API_HOST ARVADOS_API_TOKEN=$ARVADOS_API_TOKEN arv link create --link "{\"tail_uuid\":\"$IDENTIFIER-j7d0g-fffffffffffffff\", \"head_uuid\":\"$DOCKER_IMAGES_PROJECT\", \"link_class\":\"permission\", \"name\":\"can_read\" }"
   if [[ "$?" != "0" ]]; then
     title "ERROR: could not create standard Docker images project Please create it, cf. http://doc.arvados.org/install/create-standard-objects.html"