[ARVADOS] created: 4225d058e0bc4380203fe5959e7e54febc91e83b

Git user git at public.curoverse.com
Fri Nov 11 13:34:14 EST 2016


        at  4225d058e0bc4380203fe5959e7e54febc91e83b (commit)


commit 4225d058e0bc4380203fe5959e7e54febc91e83b
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date:   Fri Nov 11 10:03:22 2016 -0500

    10410: Build Ruby from source instead using Debian package in order to install a more recent Ruby.

diff --git a/tools/arvbox/lib/arvbox/docker/Dockerfile.base b/tools/arvbox/lib/arvbox/docker/Dockerfile.base
index 0b92673..2c5cf3b 100644
--- a/tools/arvbox/lib/arvbox/docker/Dockerfile.base
+++ b/tools/arvbox/lib/arvbox/docker/Dockerfile.base
@@ -2,31 +2,55 @@ FROM debian:8
 
 RUN apt-get update
 
+# Break up the package installation over multiple layers so that a download
+# hiccup doesn't require starting over.
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get -yq --no-install-recommends install \
+    postgresql-9.4 git build-essential runit curl libpq-dev
+
 RUN DEBIAN_FRONTEND=noninteractive apt-get -yq --no-install-recommends install \
-    postgresql-9.4 git build-essential runit \
-    ruby rake bundler curl libpq-dev ruby-dev \
     libcurl4-openssl-dev libssl-dev zlib1g-dev libpcre3-dev \
     openssh-server python-setuptools netcat-traditional \
     python-epydoc graphviz bzip2 less sudo virtualenv
 
 RUN DEBIAN_FRONTEND=noninteractive apt-get -yq --no-install-recommends install \
     libpython-dev fuse libfuse-dev python-pip python-yaml \
-    pkg-config libattr1-dev python-llfuse python-pycurl \
+    pkg-config libattr1-dev python-llfuse python-pycurl
+
+RUN DEBIAN_FRONTEND=noninteractive apt-get -yq --no-install-recommends install \
     libwww-perl libio-socket-ssl-perl libcrypt-ssleay-perl \
-    libjson-perl nginx gitolite3 lsof \
+    libjson-perl nginx gitolite3 lsof libreadline-dev \
     apt-transport-https ca-certificates slurm-wlm
 
-RUN apt-get update && \
-    DEBIAN_FRONTEND=noninteractive apt-get -yq --no-install-recommends install \
+RUN DEBIAN_FRONTEND=noninteractive apt-get -yq --no-install-recommends install \
     linkchecker python3-virtualenv python-virtualenv xvfb iceweasel
 
+ENV GOVERSION 1.7.3
+
+# Install golang binary
 RUN cd /usr/local && \
-    GOVERSION=1.7.1 && \
     curl -O http://storage.googleapis.com/golang/go${GOVERSION}.linux-amd64.tar.gz && \
     tar -xzf go${GOVERSION}.linux-amd64.tar.gz && \
-    rm go${GOVERSION}.linux-amd64.tar.gz && \
-    cd bin && \
-    ln -s /usr/local/go/bin/* .
+    rm go${GOVERSION}.linux-amd64.tar.gz
+
+ENV PATH ${PATH}:/usr/local/go/bin
+
+ENV RUBYVERSION 2.1.8
+
+# Install RVM
+RUN cd /usr/local/lib && \
+ curl -O http://cache.ruby-lang.org/pub/ruby/2.1/ruby-${RUBYVERSION}.tar.gz && \
+ tar xzf ruby-${RUBYVERSION}.tar.gz && \
+ cd ruby-${RUBYVERSION} && \
+ ./configure --disable-install-doc && \
+ make && \
+ make install && \
+ cd /usr/local/lib && \
+ rm -rf ruby-${RUBYVERSION}.tar.gz ruby-${RUBYVERSION}
+
+ENV GEM_HOME /var/lib/gems
+ENV GEM_PATH /var/lib/gems
+ENV PATH $PATH:/var/lib/gems/bin
 
 VOLUME /var/lib/docker
 VOLUME /var/log/nginx
diff --git a/tools/arvbox/lib/arvbox/docker/common.sh b/tools/arvbox/lib/arvbox/docker/common.sh
index 742658f..b3dfedc 100644
--- a/tools/arvbox/lib/arvbox/docker/common.sh
+++ b/tools/arvbox/lib/arvbox/docker/common.sh
@@ -6,9 +6,6 @@ else
     localip=$(ip addr show $defaultdev | grep 'inet ' | sed 's/ *inet \(.*\)\/.*/\1/')
 fi
 
-export GEM_HOME=/var/lib/gems
-export GEM_PATH=/var/lib/gems
-
 declare -A services
 services=(
   [workbench]=80
@@ -38,6 +35,9 @@ run_bundler() {
     else
         frozen=""
     fi
+    if ! test -x bundle ; then
+        gem install --no-document bundler
+    fi
     if ! flock /var/lib/gems/gems.lock bundle install --path $GEM_HOME --local --no-deployment $frozen "$@" ; then
         flock /var/lib/gems/gems.lock bundle install --path $GEM_HOME --no-deployment $frozen "$@"
     fi
diff --git a/tools/arvbox/lib/arvbox/docker/service/ready/run-service b/tools/arvbox/lib/arvbox/docker/service/ready/run-service
index 977f612..c248773 100755
--- a/tools/arvbox/lib/arvbox/docker/service/ready/run-service
+++ b/tools/arvbox/lib/arvbox/docker/service/ready/run-service
@@ -70,11 +70,11 @@ if ! [[ -z "$waiting" ]] ; then
                      /usr/src/arvados/apps/workbench/Gemfile.lock \
                      /usr/src/sso/Gemfile.lock ; do
             gc=$(cat $l \
-                        | grep -vE "(GEM|PLATFORMS|DEPENDENCIES|$^|remote:|specs:)" \
+                        | grep -vE "(GEM|PLATFORMS|DEPENDENCIES|BUNDLED|GIT|$^|remote:|specs:|revision:)" \
                         | sed 's/^ *//' | sed 's/(.*)//' | sed 's/ *$//' | sort | uniq | wc -l)
             gemlockcount=$(($gemlockcount + $gc))
         done
-        waiting="$waiting (installing ruby gems $gemcount/$gemlockcount)"
+        waiting="$waiting (installing ruby gems $gemcount of about $gemlockcount)"
     fi
 
     if ps x | grep -v grep | grep "c++.*/var/lib/passenger" > /dev/null ; then

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list