[ARVADOS] created: 295882a5097a938c1192e933afafb98ef39564fe

git at public.curoverse.com git at public.curoverse.com
Mon Jun 30 00:35:44 EDT 2014


        at  295882a5097a938c1192e933afafb98ef39564fe (commit)


commit 295882a5097a938c1192e933afafb98ef39564fe
Author: Ward Vandewege <ward at curoverse.com>
Date:   Mon Jun 30 04:24:06 2014 +0000

    docker: bump up passenger version. This is highly unsatisfactory, and needs
    proper fixing.

diff --git a/docker/api/passenger.conf b/docker/api/passenger.conf
index b3ad02a..39327f9 100644
--- a/docker/api/passenger.conf
+++ b/docker/api/passenger.conf
@@ -1,3 +1,3 @@
-LoadModule passenger_module /usr/local/rvm/gems/ruby-2.1.0/gems/passenger-4.0.23/buildout/apache2/mod_passenger.so
-PassengerRoot /usr/local/rvm/gems/ruby-2.1.0/gems/passenger-4.0.23
+LoadModule passenger_module /usr/local/rvm/gems/ruby-2.1.0/gems/passenger-4.0.41/buildout/apache2/mod_passenger.so
+PassengerRoot /usr/local/rvm/gems/ruby-2.1.0/gems/passenger-4.0.41
 PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-2.1.0/ruby
diff --git a/docker/sso/passenger.conf b/docker/sso/passenger.conf
index b3ad02a..39327f9 100644
--- a/docker/sso/passenger.conf
+++ b/docker/sso/passenger.conf
@@ -1,3 +1,3 @@
-LoadModule passenger_module /usr/local/rvm/gems/ruby-2.1.0/gems/passenger-4.0.23/buildout/apache2/mod_passenger.so
-PassengerRoot /usr/local/rvm/gems/ruby-2.1.0/gems/passenger-4.0.23
+LoadModule passenger_module /usr/local/rvm/gems/ruby-2.1.0/gems/passenger-4.0.41/buildout/apache2/mod_passenger.so
+PassengerRoot /usr/local/rvm/gems/ruby-2.1.0/gems/passenger-4.0.41
 PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-2.1.0/ruby
diff --git a/docker/workbench/passenger.conf b/docker/workbench/passenger.conf
index b3ad02a..39327f9 100644
--- a/docker/workbench/passenger.conf
+++ b/docker/workbench/passenger.conf
@@ -1,3 +1,3 @@
-LoadModule passenger_module /usr/local/rvm/gems/ruby-2.1.0/gems/passenger-4.0.23/buildout/apache2/mod_passenger.so
-PassengerRoot /usr/local/rvm/gems/ruby-2.1.0/gems/passenger-4.0.23
+LoadModule passenger_module /usr/local/rvm/gems/ruby-2.1.0/gems/passenger-4.0.41/buildout/apache2/mod_passenger.so
+PassengerRoot /usr/local/rvm/gems/ruby-2.1.0/gems/passenger-4.0.41
 PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-2.1.0/ruby

commit 6bc625cbc09a69ca4d9379894d463b9c021f5ec0
Author: Ward Vandewege <ward at curoverse.com>
Date:   Mon Jun 30 04:23:15 2014 +0000

    docker: fix up the link between workbench and the API server, work around the
    lack of ERB parsing in application.yml

diff --git a/docker/workbench/apache2_foreground.sh b/docker/workbench/apache2_foreground.sh
index c3facfe..37650ab 100755
--- a/docker/workbench/apache2_foreground.sh
+++ b/docker/workbench/apache2_foreground.sh
@@ -8,5 +8,10 @@ if [[ ! "$ENABLE_SSH" =~ (0|false|no|f|^$) ]]; then
   /etc/init.d/ssh start
 fi
 
+# Override the default API server address if necessary.
+if [[ "$API_PORT_443_TCP_ADDR" != "" ]]; then 
+  sed -i "s/localhost:9900/$API_PORT_443_TCP_ADDR/" /usr/src/arvados/apps/workbench/config/application.yml
+fi
+
 source /etc/apache2/envvars
 /usr/sbin/apache2 -D FOREGROUND
diff --git a/docker/workbench/application.yml.in b/docker/workbench/application.yml.in
index 499dfc6..3140188 100644
--- a/docker/workbench/application.yml.in
+++ b/docker/workbench/application.yml.in
@@ -15,8 +15,8 @@ common:
   secret_token: @@WORKBENCH_SECRET@@
 
   # You probably also want to point to your API server.
-  arvados_login_base: 'https://' + ENV['API_PORT_443_TCP_ADDR'].to_s + '/login'
-  arvados_v1_base: 'https://' + ENV['API_PORT_443_TCP_ADDR'].to_s + '/arvados/v1'
+  arvados_login_base: 'https://localhost:9900/login'
+  arvados_v1_base: 'https://localhost:9900/arvados/v1'
   arvados_insecure_https: @@WORKBENCH_INSECURE_HTTPS@@
 
   data_import_dir: @@WORKBENCH_DATA_IMPORT_DIR@@

commit b5352280e200fcecc39a8705151a0a3eb6be6e81
Author: Ward Vandewege <ward at curoverse.com>
Date:   Mon Jun 30 03:43:31 2014 +0000

    docker: a bunch of tweaks to bring the docker setup up to snuff with the latest
    version of our codebase.

diff --git a/docker/api/Dockerfile b/docker/api/Dockerfile
index 3c1a5af..22d6727 100644
--- a/docker/api/Dockerfile
+++ b/docker/api/Dockerfile
@@ -18,9 +18,9 @@ ADD generated/api.tar.gz /usr/src/arvados/services/
 
 # Install generated config files
 ADD generated/database.yml /usr/src/arvados/services/api/config/database.yml
-ADD generated/secret_token.rb /usr/src/arvados/services/api/config/initializers/secret_token.rb
 ADD generated/omniauth.rb /usr/src/arvados/services/api/config/initializers/omniauth.rb
-ADD generated/production.rb /usr/src/arvados/services/api/config/environments/production.rb
+RUN /bin/cp /usr/src/arvados/services/api/config/environments/production.rb.example /usr/src/arvados/services/api/config/environments/production.rb
+ADD generated/application.yml /usr/src/arvados/services/api/config/application.yml
 ADD generated/apache2_vhost /etc/apache2/sites-available/arvados
 
 # Configure Rails databases.
diff --git a/docker/api/application.yml.in b/docker/api/application.yml.in
new file mode 100644
index 0000000..056d4b9
--- /dev/null
+++ b/docker/api/application.yml.in
@@ -0,0 +1,61 @@
+# Copy this file to application.yml and edit to suit.
+#
+# Consult application.default.yml for the full list of configuration
+# settings.
+#
+# The order of precedence is:
+# 1. config/environments/{RAILS_ENV}.rb (deprecated)
+# 2. Section in application.yml corresponding to RAILS_ENV (e.g., development)
+# 3. Section in application.yml called "common"
+# 4. Section in application.default.yml corresponding to RAILS_ENV
+# 5. Section in application.default.yml called "common"
+
+development:
+  # The blob_signing_key is a string of alphanumeric characters used
+  # to sign permission hints for Keep locators. It must be identical
+  # to the permission key given to Keep.  If you run both apiserver
+  # and Keep in development, change this to a hardcoded string and
+  # make sure both systems use the same value.
+  blob_signing_key: ~
+
+production:
+  # At minimum, you need a nice long randomly generated secret_token here.
+  # Use a long string of alphanumeric characters (at least 36).
+  secret_token: @@API_SECRET@@
+
+  # blob_signing_key is required and must be identical to the
+  # permission secret provisioned to Keep.
+  # Use a long string of alphanumeric characters (at least 36).
+  blob_signing_key: @@KEEP_SIGNING_SECRET@@
+
+  uuid_prefix: @@API_HOSTNAME@@
+
+  # The e-mail address of the user you would like to become marked as an admin
+  # user on their first login.
+  # In the default configuration, authentication happens through the Arvados SSO
+  # server, which uses openid against Google's servers, so in that case this
+  # should be an address associated with a Google account.
+  auto_admin_user: @@API_AUTO_ADMIN_USER@@
+
+  # compute_node_domain: example.org
+  # compute_node_nameservers:
+  #   - 127.0.0.1
+  #   - 192.168.1.1
+  #
+  # The version below is suitable for AWS.
+  # Uncomment and change <%# to <%= to use it.
+  # compute_node_nameservers: <%#
+  #   require 'net/http'
+  #   ['local', 'public'].collect do |iface|
+  #     Net::HTTP.get(URI("http://169.254.169.254/latest/meta-data/#{iface}-ipv4")).match(/^[\d\.]+$/)[0]
+  #   end << '172.16.0.23'
+  # %>
+
+test:
+  uuid_prefix: zzzzz
+  secret_token: <%= rand(2**512).to_s(36) %>
+
+common:
+  #git_repositories_dir: /var/cache/git
+  #git_internal_dir: /var/cache/arvados/internal.git
+
diff --git a/docker/api/production.rb.in b/docker/api/production.rb.in
deleted file mode 100644
index 967d185..0000000
--- a/docker/api/production.rb.in
+++ /dev/null
@@ -1,100 +0,0 @@
-Server::Application.configure do
-  # Settings specified here will take precedence over those in config/application.rb
-
-  # Code is not reloaded between requests
-  config.cache_classes = true
-
-  # Full error reports are disabled and caching is turned on
-  config.consider_all_requests_local       = false
-  config.action_controller.perform_caching = true
-
-  # Disable Rails's static asset server (Apache or nginx will already do this)
-  config.serve_static_assets = false
-
-  # Compress JavaScripts and CSS
-  config.assets.compress = true
-
-  # Don't fallback to assets pipeline if a precompiled asset is missed
-  config.assets.compile = false
-
-  # Generate digests for assets URLs
-  config.assets.digest = true
-
-  # Defaults to Rails.root.join("public/assets")
-  # config.assets.manifest = YOUR_PATH
-
-  # Specifies the header that your server uses for sending files
-  # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
-  # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
-
-  # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
-  # config.force_ssl = true
-
-  # See everything in the log (default is :info)
-  # config.log_level = :debug
-
-  # Use a different logger for distributed setups
-  # config.logger = SyslogLogger.new
-
-  # Use a different cache store in production
-  # config.cache_store = :mem_cache_store
-
-  # Enable serving of images, stylesheets, and JavaScripts from an asset server
-  # config.action_controller.asset_host = "http://assets.example.com"
-
-  # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
-  # config.assets.precompile += %w( search.js )
-
-  # Disable delivery errors, bad email addresses will be ignored
-  # config.action_mailer.raise_delivery_errors = false
-  config.action_mailer.raise_delivery_errors = true
-  config.action_mailer.perform_deliveries = true
-
-  # Enable threaded mode
-  # config.threadsafe!
-
-  # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
-  # the I18n.default_locale when a translation can not be found)
-  config.i18n.fallbacks = true
-
-  # Send deprecation notices to registered listeners
-  config.active_support.deprecation = :notify
-
-  config.git_repositories_dir = '/var/cache/git'
-
-  config.crunch_job_wrapper = :slurm_immediate
-  config.crunch_job_user = 'crunch' # if false, do not set uid when running jobs
-
-  # The web service must be able to create/write this file, and
-  # crunch-job must be able to stat() it.
-  config.crunch_refresh_trigger = '/tmp/crunch_refresh_trigger'
-
-  # config.dnsmasq_conf_dir = '/etc/dnsmasq.d'
-
-  # config.compute_node_ami = 'ami-cbca41a2'
-  # config.compute_node_ec2run_args = '-g arvados-compute'
-  # config.compute_node_spot_bid = 0.11
-
-  # config.compute_node_domain = `hostname --domain`.strip
-
-  # config.compute_node_nameservers = ['1.2.3.4', '1.2.3.5']
-  require 'net/http'
-  config.compute_node_nameservers = [ '@@ARVADOS_DNS_SERVER@@' ]
-  config.compute_node_domain = false
-  config.uuid_prefix = '@@API_HOSTNAME@@'
-
-  # Authentication stub: hard code pre-approved API tokens.
-  # config.accept_api_token = { rand(2**256).to_s(36) => true }
-  config.accept_api_token = {}
-
-  config.new_users_are_active = false
-  config.admin_notifier_email_from = 'arvados at example.com'
-  config.email_subject_prefix = '[ARVADOS] '
-
-  # The e-mail address of the user you would like to become marked as an admin
-  # user on their first login.
-  # In the default configuration, authentication happens through the Arvados SSO
-  # server, which uses openid against Google's servers, so in that case this
-  # should be an address associated with a Google account.
-  config.auto_admin_user = '@@API_AUTO_ADMIN_USER@@'
-end
diff --git a/docker/api/secret_token.rb.in b/docker/api/secret_token.rb.in
deleted file mode 100644
index 3008480..0000000
--- a/docker/api/secret_token.rb.in
+++ /dev/null
@@ -1,12 +0,0 @@
-# Be sure to restart your server when you modify this file.
-
-# Your secret key for verifying the integrity of signed cookies.
-# If you change this key, all old signed cookies will become invalid!
-# Make sure the secret is at least 30 characters and all random,
-# no regular words or you'll be exposed to dictionary attacks.
-Server::Application.config.secret_token = '@@API_SECRET@@'
-
-# The blob_signing_key is a string of alphanumeric characters used
-# to sign permission hints for Keep locators. It must be identical
-# to the permission key given to Keep.
-Server::Application.config.blob_signing_key = '@@KEEP_SIGNING_SECRET@@'
diff --git a/docker/build_tools/Makefile b/docker/build_tools/Makefile
index 2808bca..0a141df 100644
--- a/docker/build_tools/Makefile
+++ b/docker/build_tools/Makefile
@@ -47,8 +47,7 @@ API_GENERATED = \
         api/generated/config_databases.sh \
         api/generated/database.yml \
         api/generated/omniauth.rb \
-        api/generated/production.rb \
-        api/generated/secret_token.rb \
+        api/generated/application.yml \
         api/generated/superuser_token
 
 API_GENERATED_IN = \
@@ -56,19 +55,16 @@ API_GENERATED_IN = \
         api/config_databases.sh.in \
         api/database.yml.in \
         api/omniauth.rb.in \
-        api/production.rb.in \
-        api/secret_token.rb.in \
+        api/application.yml.in \
         api/superuser_token.in
 
 WORKBENCH_GENERATED = \
         workbench/generated/apache2_vhost \
-        workbench/generated/production.rb \
-        workbench/generated/secret_token.rb
+        workbench/generated/application.yml
 
 WORKBENCH_GENERATED_IN = \
         workbench/apache2_vhost.in \
-        workbench/production.rb.in \
-        workbench/secret_token.rb.in
+        workbench/application.yml.in
 
 WAREHOUSE_GENERATED = warehouse/generated/warehouse.conf
 
diff --git a/docker/workbench/Dockerfile b/docker/workbench/Dockerfile
index bd0bf45..df306b3 100644
--- a/docker/workbench/Dockerfile
+++ b/docker/workbench/Dockerfile
@@ -6,8 +6,8 @@ MAINTAINER Ward Vandewege <ward at curoverse.com>
 # Update Arvados source
 RUN /bin/mkdir -p /usr/src/arvados/apps
 ADD generated/workbench.tar.gz /usr/src/arvados/apps/
-ADD generated/secret_token.rb /usr/src/arvados/apps/workbench/config/initializers/secret_token.rb
-ADD generated/production.rb /usr/src/arvados/apps/workbench/config/environments/production.rb
+RUN /bin/cp /usr/src/arvados/apps/workbench/config/environments/production.rb.example /usr/src/arvados/apps/workbench/config/environments/production.rb
+ADD generated/application.yml /usr/src/arvados/apps/workbench/config/application.yml
 ADD passenger.conf /etc/apache2/conf.d/passenger
 
 
@@ -15,7 +15,6 @@ RUN bundle install --gemfile=/usr/src/arvados/apps/workbench/Gemfile && \
     touch /usr/src/arvados/apps/workbench/log/production.log && \
     chmod 666 /usr/src/arvados/apps/workbench/log/production.log && \
     touch /usr/src/arvados/apps/workbench/db/production.sqlite3 && \
-    bundle install --gemfile=/usr/src/arvados/apps/workbench/Gemfile && \
     cd /usr/src/arvados/apps/workbench && \
     rake assets:precompile && \
     chown -R www-data:www-data /usr/src/arvados/apps/workbench
diff --git a/docker/workbench/application.yml.in b/docker/workbench/application.yml.in
new file mode 100644
index 0000000..499dfc6
--- /dev/null
+++ b/docker/workbench/application.yml.in
@@ -0,0 +1,27 @@
+# Copy this file to application.yml and edit to suit.
+#
+# Consult application.default.yml for the full list of configuration
+# settings.
+#
+# The order of precedence is:
+# 1. config/environments/{RAILS_ENV}.rb (deprecated)
+# 2. Section in application.yml corresponding to RAILS_ENV (e.g., development)
+# 3. Section in application.yml called "common"
+# 4. Section in application.default.yml corresponding to RAILS_ENV
+# 5. Section in application.default.yml called "common"
+
+common:
+  # At minimum, you need a nice long randomly generated secret_token here.
+  secret_token: @@WORKBENCH_SECRET@@
+
+  # You probably also want to point to your API server.
+  arvados_login_base: 'https://' + ENV['API_PORT_443_TCP_ADDR'].to_s + '/login'
+  arvados_v1_base: 'https://' + ENV['API_PORT_443_TCP_ADDR'].to_s + '/arvados/v1'
+  arvados_insecure_https: @@WORKBENCH_INSECURE_HTTPS@@
+
+  data_import_dir: @@WORKBENCH_DATA_IMPORT_DIR@@
+  data_export_dir: @@WORKBENCH_DATA_EXPORT_DIR@@
+
+  site_name: @@WORKBENCH_SITE_NAME@@
+  activation_contact_link: @@WORKBENCH_ACTIVATION_CONTACT_LINK@@
+ 

commit 59fcc702a3394a53f3fc36c71e24454d8fd647be
Author: Ward Vandewege <ward at curoverse.com>
Date:   Mon Jun 30 03:43:13 2014 +0000

    docker: arvdock: support new Debian docker.io packages

diff --git a/docker/arvdock b/docker/arvdock
index b2fa4b2..9b9448b 100755
--- a/docker/arvdock
+++ b/docker/arvdock
@@ -1,6 +1,11 @@
 #!/bin/bash
 
 ENABLE_SSH=false
+DOCKER=`which docker.io`
+
+if [[ "$DOCKER" == "" ]]; then
+    DOCKER=`which docker`
+fi
 
 function usage {
     echo >&2
@@ -23,7 +28,7 @@ function usage {
 
 function ip_address {
     local container=$1
-    echo `docker inspect $container  |grep IPAddress |cut -f4 -d\"`
+    echo `$DOCKER inspect $container  |grep IPAddress |cut -f4 -d\"`
 }
 
 function start_container {
@@ -51,18 +56,18 @@ function start_container {
       args="$args -e ENABLE_SSH=$ENABLE_SSH"
     fi
 
-    `docker ps |grep -P "$name[^/]" -q`
+    `$DOCKER ps |grep -P "$name[^/]" -q`
     if [[ "$?" == "0" ]]; then
       echo "You have a running container with name $name -- skipping."
       return
     fi
 
     # Remove any existing container by this name.
-    docker rm "$name" 2>/dev/null
+    $DOCKER rm "$name" 2>/dev/null
 
     echo "Starting container:"
-    echo "  docker run $args $image"
-    container=`docker run $args $image`
+    echo "  $DOCKER run $args $image"
+    container=`$DOCKER run $args $image`
     if [[ "$?" != "0" ]]; then
       echo "Unable to start container"
       exit 1
@@ -288,7 +293,7 @@ function do_stop {
 	stop_keep="keep_server_0 keep_server_1"
     fi
 
-    docker stop $stop_doc $stop_sso $stop_api $stop_workbench $stop_keep \
+    $DOCKER stop $stop_doc $stop_sso $stop_api $stop_workbench $stop_keep \
 	2>/dev/null
 }
 
@@ -313,7 +318,7 @@ function do_test {
 		python -m unittest discover ../sdk/python
 		;;
 	    api)
-		docker run -t -i arvados/api \
+		$DOCKER run -t -i arvados/api \
 		    /usr/src/arvados/services/api/script/rake_test.sh
 		;;
 	    *)

commit 756c42a9b68e7d826c30402f9bcaba3a56260848
Author: Ward Vandewege <ward at curoverse.com>
Date:   Mon Jun 30 01:02:13 2014 +0000

    docker: more changes to support new Debian docker.io packages

diff --git a/docker/build_tools/Makefile b/docker/build_tools/Makefile
index 298551f..2808bca 100644
--- a/docker/build_tools/Makefile
+++ b/docker/build_tools/Makefile
@@ -10,9 +10,9 @@ clean:
 # `make realclean' will also remove the docker images and force
 # subsequent makes to build the entire chain from the ground up
 realclean: clean
-	-[ -n "`docker ps -q`" ] && docker stop `docker ps -q`
-	-docker rm `docker ps -a -q`
-	-docker rmi `docker images -q`
+	-[ -n "`$(DOCKER) ps -q`" ] && $(DOCKER) stop `$(DOCKER) ps -q`
+	-$(DOCKER) rm `$(DOCKER) ps -a -q`
+	-$(DOCKER) rmi `$(DOCKER) images -q`
 
 # ============================================================
 # Dependencies for */generated files which are prerequisites
@@ -115,7 +115,7 @@ $(SSO_GENERATED): config.yml $(SSO_GENERATED_IN)
 # The docker build -q option suppresses verbose build output.
 # Necessary to prevent failure on building warehouse; see
 # https://github.com/dotcloud/docker/issues/3172
-DOCKER_BUILD = docker build -q
+DOCKER_BUILD = $(DOCKER) build -q
 
 # ============================================================
 # The main Arvados servers: api, doc, workbench, warehouse
diff --git a/docker/build_tools/build.rb b/docker/build_tools/build.rb
index 1a914b5..5e3b1ed 100755
--- a/docker/build_tools/build.rb
+++ b/docker/build_tools/build.rb
@@ -84,7 +84,7 @@ def main options
       debootstrap_ok? and
       File.exists? 'config.yml'
     warn "Building Arvados."
-    system '/usr/bin/make', '-f', options[:makefile], *ARGV
+    system({"DOCKER" => docker_path}, '/usr/bin/make', '-f', options[:makefile], *ARGV)
   end
 end
 
diff --git a/docker/mkimage-debootstrap.sh b/docker/mkimage-debootstrap.sh
index a078801..1eefac9 100755
--- a/docker/mkimage-debootstrap.sh
+++ b/docker/mkimage-debootstrap.sh
@@ -86,13 +86,17 @@ if [ ! "$repo" ] || [ ! "$suite" ]; then
 fi
 
 # some rudimentary detection for whether we need to "sudo" our docker calls
-docker=''
-if docker version > /dev/null 2>&1; then
-	docker='docker'
-elif sudo docker version > /dev/null 2>&1; then
-	docker='sudo docker'
-elif command -v docker > /dev/null 2>&1; then
-	docker='docker'
+docker=`which docker.io`
+if [[ "$docker" == "" ]]; then
+	docker=`which docker`
+fi
+
+if $docker version > /dev/null 2>&1; then
+	docker="$docker"
+elif sudo $docker version > /dev/null 2>&1; then
+	docker="sudo $docker"
+elif command -v $docker > /dev/null 2>&1; then
+	docker="$docker"
 else
 	echo >&2 "warning: either docker isn't installed, or your current user cannot run it;"
 	echo >&2 "         this script is not likely to work as expected"

commit c1bcfda11a5d439bf6e9eabf10ed360e917f0d43
Author: Ward Vandewege <ward at curoverse.com>
Date:   Mon Jun 30 00:25:48 2014 +0000

    docker: build_tools/build.rb: improve language around Google account.

diff --git a/docker/build_tools/build.rb b/docker/build_tools/build.rb
index b947d1d..1a914b5 100755
--- a/docker/build_tools/build.rb
+++ b/docker/build_tools/build.rb
@@ -53,7 +53,7 @@ def main options
     print "Generating config.yml.\n"
     print "Arvados needs to know the email address of the administrative user,\n"
     print "so that when that user logs in they are automatically made an admin.\n"
-    print "This should be the email address you use to log in to Google.\n"
+    print "This should be an email address associated with a Google account.\n"
     print "\n"
     admin_email_address = ""
     until is_valid_email? admin_email_address

commit 479724c95e77bb9b950879f0d90399e0abf56ddc
Author: Ward Vandewege <ward at curoverse.com>
Date:   Mon Jun 30 00:18:52 2014 +0000

    docker: build_tools/build.rb: support new Debian docker.io packages

diff --git a/docker/build_tools/build.rb b/docker/build_tools/build.rb
index fd5543c..b947d1d 100755
--- a/docker/build_tools/build.rb
+++ b/docker/build_tools/build.rb
@@ -18,7 +18,12 @@ def main options
   #      - TODO: mount cgroup automatically
   #      - TODO: start the docker service if not started
 
-  docker_path = %x(which docker).chomp
+  docker_path = %x(which docker.io).chomp
+
+  if docker_path.empty?
+    docker_path = %x(which docker).chomp
+  end
+
   if docker_path.empty?
     warn "Docker not found."
     warn ""
@@ -28,7 +33,7 @@ def main options
     warn "Installation instructions for a variety of platforms can be found at"
     warn "http://docs.docker.io/en/latest/installation/"
     exit 1
-  elsif not docker_ok?
+  elsif not docker_ok? docker_path
     warn "WARNING: docker could not be run."
     warn "Please make sure that:"
     warn "  * You have permission to read and write /var/run/docker.sock"
@@ -75,7 +80,7 @@ def main options
 
   # If all prerequisites are met, go ahead and build.
   if ip_forwarding_enabled? and
-      docker_ok? and
+      docker_ok? docker_path and
       debootstrap_ok? and
       File.exists? 'config.yml'
     warn "Building Arvados."
@@ -133,8 +138,8 @@ end
 # docker_ok?
 #   Returns 'true' if docker can be run as the current user.
 #
-def docker_ok?
-  return system 'docker images > /dev/null 2>&1'
+def docker_ok?(docker_path)
+  return system "#{docker_path} images > /dev/null 2>&1"
 end
 
 # find_or_create_ssh_key arvados_name

commit 6de4e2d16c3288ddda96fff8a8bc2b757e5765d7
Author: Ward Vandewege <ward at curoverse.com>
Date:   Mon Jun 30 00:08:10 2014 +0000

    docker: build_tools/build.rb: exit with non-zero exit code when something goes
    wrong.

diff --git a/docker/build_tools/build.rb b/docker/build_tools/build.rb
index b1c5543..fd5543c 100755
--- a/docker/build_tools/build.rb
+++ b/docker/build_tools/build.rb
@@ -27,14 +27,14 @@ def main options
     warn ""
     warn "Installation instructions for a variety of platforms can be found at"
     warn "http://docs.docker.io/en/latest/installation/"
-    exit
+    exit 1
   elsif not docker_ok?
     warn "WARNING: docker could not be run."
     warn "Please make sure that:"
     warn "  * You have permission to read and write /var/run/docker.sock"
     warn "  * a 'cgroup' volume is mounted on your machine"
     warn "  * the docker daemon is running"
-    exit
+    exit 2
   end
 
   # Check that debootstrap is installed.
@@ -169,7 +169,7 @@ def install_docker
     if not linux_release.match '^1[234]\.'
       warn "Arvados requires at least Ubuntu 12.04 (Precise Pangolin)."
       warn "Your system is Ubuntu #{linux_release}."
-      exit
+      exit 3
     end
     if linux_release.match '^12' and kernel_release.start_with? '3.2'
       # Ubuntu Precise ships with a 3.2 kernel and must be upgraded.
@@ -178,7 +178,7 @@ def install_docker
       warn "  sudo apt-get update"
       warn "  sudo apt-get install linux-image-generic-lts-raring linux-headers-generic-lts-raring"
       warn "  sudo reboot"
-      exit
+      exit 4
     else
       # install AUFS
       sudo 'apt-get', 'update'
@@ -203,7 +203,7 @@ def install_docker
   when 'Debian'
   else
     warn "Must be running a Debian or Ubuntu release in order to run Docker."
-    exit
+    exit 5
   end
 end
 

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list