[ARVADOS] created: 60c18cbf3175fb7300af732466c3b0be2c974d16

git at public.curoverse.com git at public.curoverse.com
Thu Jul 10 11:12:24 EDT 2014


        at  60c18cbf3175fb7300af732466c3b0be2c974d16 (commit)


commit 60c18cbf3175fb7300af732466c3b0be2c974d16
Author: Ward Vandewege <ward at curoverse.com>
Date:   Thu Jul 10 11:07:56 2014 -0400

    Be consistent about the version of ruby that is installed by rvm and
    used by the various containers. Be consistent about using rvm-exec and
    bundle exec in every command that uses ruby.
    
    Add documentation and warning about --realclean option to build.sh
    
    refs #3219

diff --git a/doc/install/install-docker.html.textile.liquid b/doc/install/install-docker.html.textile.liquid
index 94b4838..3cac173 100644
--- a/doc/install/install-docker.html.textile.liquid
+++ b/doc/install/install-docker.html.textile.liquid
@@ -80,6 +80,16 @@ arvados/debian      latest              6e32119ffcd0        8 minutes ago
 arvados/debian      wheezy              6e32119ffcd0        8 minutes ago        116.8 MB
 </code></pre></notextile>
 
+h2. Updating the Arvados Docker containers
+
+If there has been an update to the Arvados Docker building code, it is safest to rebuild the Arvados Docker images from scratch. All build information can be cleared with the '--realclean' option to build.sh.
+
+WARNING: this will remove *all* docker containers and images on your system!
+
+<notextile>
+<pre><code>~$ <span class="userinput">./build.sh --realclean</span></code></pre>
+</notextile>
+
 h2. Running the Arvados Docker containers
 
 The @arvdock@ command can be used to start and stop the docker containers. It has a number of options:
diff --git a/docker/api/Dockerfile b/docker/api/Dockerfile
index 22d6727..4d10aaa 100644
--- a/docker/api/Dockerfile
+++ b/docker/api/Dockerfile
@@ -27,21 +27,20 @@ ADD generated/apache2_vhost /etc/apache2/sites-available/arvados
 ENV RAILS_ENV production
 ADD generated/config_databases.sh /tmp/config_databases.sh
 ADD generated/superuser_token /tmp/superuser_token
-RUN bundle install --gemfile=/usr/src/arvados/services/api/Gemfile && \
+RUN /usr/local/rvm/bin/rvm-exec default bundle install --gemfile=/usr/src/arvados/services/api/Gemfile && \
     sh /tmp/config_databases.sh && \
     rm /tmp/config_databases.sh && \
     /etc/init.d/postgresql start && \
     cd /usr/src/arvados/services/api && \
-    rake db:setup && \
-    rake assets:precompile && \
-    ./script/create_superuser_token.rb $(cat /tmp/superuser_token) && \
+    /usr/local/rvm/bin/rvm-exec default bundle exec rake db:setup && \
+    /usr/local/rvm/bin/rvm-exec default bundle exec rake assets:precompile && \
+    /usr/local/rvm/bin/rvm-exec default ./script/create_superuser_token.rb $(cat /tmp/superuser_token) && \
     chown www-data:www-data config.ru && \
     chown www-data:www-data log -R && \
     mkdir -p tmp && \
     chown www-data:www-data tmp -R
 
 # Configure Apache and Passenger.
-ADD passenger.conf /etc/apache2/conf.d/passenger
 RUN a2dissite default && \
     a2ensite arvados && \
     a2enmod rewrite && \
diff --git a/docker/api/passenger.conf b/docker/api/passenger.conf
deleted file mode 100644
index 39327f9..0000000
--- a/docker/api/passenger.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-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/base/Dockerfile b/docker/base/Dockerfile
index e6ec0f9..f1defce 100644
--- a/docker/base/Dockerfile
+++ b/docker/base/Dockerfile
@@ -18,25 +18,19 @@ RUN apt-get update && \
     /bin/sed -ri 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
     /usr/sbin/locale-gen && \
     curl -L https://get.rvm.io | bash -s stable && \
-    /usr/local/rvm/bin/rvm install 2.1.0 && \
+    /usr/local/rvm/bin/rvm install 2.1 && \
+    /usr/local/rvm/bin/rvm alias create default ruby && \
     /bin/mkdir -p /usr/src/arvados
 
 ADD generated/arvados.tar.gz /usr/src/arvados/
 
-# Set up RVM environment. These are just the env variables created by
-# /usr/local/rvm/scripts/rvm, which can't be run from a non-login shell.
-# TODO(twp): figure out a less awful solution.
-ENV GEM_HOME /usr/local/rvm/gems/ruby-2.1.0
-ENV GEM_PATH /usr/local/rvm/gems/ruby-2.1.0:/usr/local/rvm/gems/ruby-2.1.0 at global
-ENV PATH /usr/local/rvm/gems/ruby-2.1.0/bin:/usr/local/rvm/gems/ruby-2.1.0 at global/bin:/usr/local/rvm/rubies/ruby-2.1.0/bin:/usr/local/rvm/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
-
 # Update gem. This (hopefully) fixes
 # https://github.com/rubygems/rubygems.org/issues/613.
-RUN gem update --system && \
-    gem install bundler && \
-    bundle install --gemfile=/usr/src/arvados/apps/workbench/Gemfile && \
-    bundle install --gemfile=/usr/src/arvados/services/api/Gemfile && \
-    bundle install --gemfile=/usr/src/arvados/doc/Gemfile
+RUN /usr/local/rvm/bin/rvm-exec default gem update --system && \
+    /usr/local/rvm/bin/rvm-exec default gem install bundler && \
+    /usr/local/rvm/bin/rvm-exec default bundle install --gemfile=/usr/src/arvados/apps/workbench/Gemfile && \
+    /usr/local/rvm/bin/rvm-exec default bundle install --gemfile=/usr/src/arvados/services/api/Gemfile && \
+    /usr/local/rvm/bin/rvm-exec default bundle install --gemfile=/usr/src/arvados/doc/Gemfile
 
 ADD generated/id_rsa.pub /root/.ssh/authorized_keys
 RUN chown root:root /root/.ssh/authorized_keys
diff --git a/docker/build_tools/Makefile b/docker/build_tools/Makefile
index d01f955..6288310 100644
--- a/docker/build_tools/Makefile
+++ b/docker/build_tools/Makefile
@@ -33,12 +33,11 @@ API_DEPS = api/Dockerfile $(API_GENERATED)
 DOC_DEPS = doc/Dockerfile doc/apache2_vhost
 
 WORKBENCH_DEPS = workbench/Dockerfile \
-                 workbench/passenger.conf \
                  $(WORKBENCH_GENERATED)
 
 KEEP_DEPS = keep/Dockerfile
 
-SSO_DEPS = sso/passenger.conf $(SSO_GENERATED)
+SSO_DEPS = $(SSO_GENERATED)
 
 BCBIO_NEXTGEN_DEPS = bcbio-nextgen/Dockerfile
 
diff --git a/docker/doc/Dockerfile b/docker/doc/Dockerfile
index 6e4d1aa..783874f 100644
--- a/docker/doc/Dockerfile
+++ b/docker/doc/Dockerfile
@@ -11,10 +11,10 @@ RUN /bin/mkdir -p /usr/src/arvados && \
 ADD generated/doc.tar.gz /usr/src/arvados/
 
 # Build static site
-RUN bundle install --gemfile=/usr/src/arvados/doc/Gemfile && \
+RUN /usr/local/rvm/bin/rvm-exec default bundle install --gemfile=/usr/src/arvados/doc/Gemfile && \
     /bin/sed -ri 's/^baseurl: .*$/baseurl: /' /usr/src/arvados/doc/_config.yml && \
     cd /usr/src/arvados/doc && \
-    LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" rake
+    LANG="en_US.UTF-8" LC_ALL="en_US.UTF-8" /usr/local/rvm/bin/rvm-exec default bundle exec rake
 
 # Configure Apache
 ADD apache2_vhost /etc/apache2/sites-available/doc
diff --git a/docker/passenger/Dockerfile b/docker/passenger/Dockerfile
index 2db48ab..049ce2d 100644
--- a/docker/passenger/Dockerfile
+++ b/docker/passenger/Dockerfile
@@ -8,5 +8,7 @@ RUN apt-get update && \
     apt-get install -q -y apt-utils git curl procps apache2-mpm-worker \
                           libcurl4-openssl-dev apache2-threaded-dev \
                           libapr1-dev libaprutil1-dev && \
-    passenger-install-apache2-module --auto
+    /usr/local/rvm/bin/rvm-exec default passenger-install-apache2-module --auto
+
+RUN /usr/local/rvm/bin/rvm-exec default passenger-install-apache2-module --snippet > /etc/apache2/conf.d/passenger
 
diff --git a/docker/sso/Dockerfile b/docker/sso/Dockerfile
index 7ed8929..99e3f4e 100644
--- a/docker/sso/Dockerfile
+++ b/docker/sso/Dockerfile
@@ -4,7 +4,7 @@ FROM arvados/passenger
 MAINTAINER Ward Vandewege <ward at curoverse.com>
 
 RUN git clone git://github.com/curoverse/sso-devise-omniauth-provider.git /usr/src/sso-provider && \
-    bundle install --gemfile=/usr/src/sso-provider/Gemfile
+    /usr/local/rvm/bin/rvm-exec default bundle install --gemfile=/usr/src/sso-provider/Gemfile
 
 # Install generated config files
 ADD generated/secret_token.rb /usr/src/sso-provider/config/initializers/secret_token.rb
@@ -13,14 +13,13 @@ ADD generated/apache2_vhost /etc/apache2/sites-available/sso-provider
 ADD generated/apache2_vhost /etc/apache2/sites-available/sso-provider
 
 # Configure Apache and Passenger.
-ADD passenger.conf /etc/apache2/conf.d/passenger
 RUN a2dissite default && \
     a2ensite sso-provider && \
     a2enmod rewrite && \
     a2enmod ssl && \
     cd /usr/src/sso-provider && \
-    RAILS_ENV=production rake db:setup && \
-    rake assets:precompile && \
+    RAILS_ENV=production /usr/local/rvm/bin/rvm-exec default bundle exec rake db:setup && \
+    /usr/local/rvm/bin/rvm-exec default bundle exec rake assets:precompile && \
     chown www-data:www-data tmp_omniauth log config.ru -R && \
     chown www-data:www-data db db/production.sqlite3 && \
     /bin/mkdir /var/run/apache2
diff --git a/docker/sso/passenger.conf b/docker/sso/passenger.conf
deleted file mode 100644
index 39327f9..0000000
--- a/docker/sso/passenger.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-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/Dockerfile b/docker/workbench/Dockerfile
index df306b3..d9dfeff 100644
--- a/docker/workbench/Dockerfile
+++ b/docker/workbench/Dockerfile
@@ -8,15 +8,13 @@ RUN /bin/mkdir -p /usr/src/arvados/apps
 ADD generated/workbench.tar.gz /usr/src/arvados/apps/
 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
 
-
-RUN bundle install --gemfile=/usr/src/arvados/apps/workbench/Gemfile && \
+RUN /usr/local/rvm/bin/rvm-exec default 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 && \
     cd /usr/src/arvados/apps/workbench && \
-    rake assets:precompile && \
+    /usr/local/rvm/bin/rvm-exec default bundle exec rake assets:precompile && \
     chown -R www-data:www-data /usr/src/arvados/apps/workbench
 
 # Configure Apache
diff --git a/docker/workbench/passenger.conf b/docker/workbench/passenger.conf
deleted file mode 100644
index 39327f9..0000000
--- a/docker/workbench/passenger.conf
+++ /dev/null
@@ -1,3 +0,0 @@
-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 acc4448c1691661f9b0834e98d837b6a8d47a887
Author: Ward Vandewege <ward at curoverse.com>
Date:   Thu Jul 10 10:35:04 2014 -0400

    Whitespace fix.
    
    refs #3219

diff --git a/docker/arvdock b/docker/arvdock
index 372f322..f2edc19 100755
--- a/docker/arvdock
+++ b/docker/arvdock
@@ -170,7 +170,7 @@ function do_start {
                     *)  start_workbench=$2; shift 2 ;;
                 esac
                 ;;
-            -k | --keep )
+            -k | --keep)
                 start_keep=true
                 shift
                 ;;

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list