From: Tom Clegg Date: Tue, 6 May 2014 20:17:58 +0000 (-0400) Subject: Synchronize repository and crunch setup instructions with current behavior. X-Git-Tag: 1.1.0~2622^2~2^2~8 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/a2104e385abe47470dd42836a66360bf62afa57b?ds=sidebyside Synchronize repository and crunch setup instructions with current behavior. --- diff --git a/doc/install/install-crunch-dispatch.html.textile.liquid b/doc/install/install-crunch-dispatch.html.textile.liquid index 9cdebbc082..960a62e994 100644 --- a/doc/install/install-crunch-dispatch.html.textile.liquid +++ b/doc/install/install-crunch-dispatch.html.textile.liquid @@ -50,29 +50,16 @@ The crunch user should have the same UID, GID, and home directory on all compute h4. Repositories -Crunch scripts must be in Git repositories in @/var/cache/git/*/.git@ (or whatever is configured in @services/api/config/environments/production.rb@). +Crunch scripts must be in Git repositories in @/var/lib/arvados/git/*.git@ (or whatever is configured in @services/api/config/environments/production.rb@). -h4. Importing commits - -@services/api/script/import_commits.rb production@ must run periodically. Example @/var/service/arvados_import_commits/run@ script for daemontools or runit: - -
-#!/bin/sh
-set -e
-while sleep 60
-do
-  cd /path/to/arvados/services/api
-  setuidgid www-data env RAILS_ENV=production /usr/local/rvm/bin/rvm-exec 2.0.0 bundle exec ./script/import_commits.rb 2>&1
-done
-
- -Once you have imported some commits, you should be able to create a new job: +Once you have a repository with commits -- and you have read access to the repository -- you should be able to create a new job:
 read -rd $'\000' newjob <
 
@@ -94,8 +81,12 @@ Example @/var/service/arvados_crunch_dispatch/run@ script:
 
 #!/bin/sh
 set -e
+
+rvmexec=""
+## uncomment this line if you use rvm:
+#rvmexec="/usr/local/rvm/bin/rvm-exec 2.1.1"
+
 export PATH="$PATH":/path/to/arvados/services/crunch
-export PERLLIB=/path/to/arvados/sdk/perl/lib:/path/to/warehouse-apps/libwarehouse-perl/lib
 export ARVADOS_API_HOST={{ site.arvados_api_host }}
 export CRUNCH_DISPATCH_LOCKFILE=/var/lock/crunch-dispatch
 
@@ -106,5 +97,5 @@ fuser -TERM -k $CRUNCH_DISPATCH_LOCKFILE || true
 
 cd /path/to/arvados/services/api
 export RAILS_ENV=production
-exec /usr/local/rvm/bin/rvm-exec 2.0.0 bundle exec ./script/crunch-dispatch.rb 2>&1
+exec $rvmexec bundle exec ./script/crunch-dispatch.rb 2>&1
 
diff --git a/services/api/script/import_commits.rb b/services/api/script/import_commits.rb deleted file mode 100755 index 80c574892c..0000000000 --- a/services/api/script/import_commits.rb +++ /dev/null @@ -1,9 +0,0 @@ -#!/usr/bin/env ruby - -ENV["RAILS_ENV"] = ARGV[0] || ENV["RAILS_ENV"] || "development" - -require File.dirname(__FILE__) + '/../config/boot' -require File.dirname(__FILE__) + '/../config/environment' -require 'shellwords' - -Commit.import_all