[ARVADOS] updated: 2.1.0-1834-g40aff12f4
Git user
git at public.arvados.org
Mon Feb 7 15:41:30 UTC 2022
Summary of changes:
tools/arvbox/bin/arvbox | 11 +++--------
tools/arvbox/lib/arvbox/docker/Dockerfile.base | 3 ---
tools/arvbox/lib/arvbox/docker/api-setup.sh | 6 +++---
tools/arvbox/lib/arvbox/docker/common.sh | 17 ++++++++++-------
tools/arvbox/lib/arvbox/docker/createusers.sh | 6 ++----
tools/arvbox/lib/arvbox/docker/service/api/run-service | 6 +++---
tools/arvbox/lib/arvbox/docker/service/doc/run-service | 2 +-
.../lib/arvbox/docker/service/gitolite/run-service | 2 +-
.../arvbox/lib/arvbox/docker/service/ready/run-service | 2 +-
tools/arvbox/lib/arvbox/docker/service/sdk/run-service | 4 ++--
.../lib/arvbox/docker/service/workbench/run-service | 12 ++++++------
11 files changed, 32 insertions(+), 39 deletions(-)
via 40aff12f447f1d4c314972e85531b4a9bb835d95 (commit)
via 16bb0d2584757280f2a2de102f1bc53fa92179b7 (commit)
from 0b89b2747dc6a2fdbfd84b0cb27690e781c61d07 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 40aff12f447f1d4c314972e85531b4a9bb835d95
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Mon Feb 7 10:41:06 2022 -0500
18657: What if we get rid of setting GEM_HOME entirely
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/tools/arvbox/bin/arvbox b/tools/arvbox/bin/arvbox
index ca98ff63f..dd53d89c0 100755
--- a/tools/arvbox/bin/arvbox
+++ b/tools/arvbox/bin/arvbox
@@ -72,7 +72,6 @@ NPMCACHE="$ARVBOX_DATA/npm"
GOSTUFF="$ARVBOX_DATA/gopath"
RLIBS="$ARVBOX_DATA/Rlibs"
ARVADOS_CONTAINER_PATH="/var/lib/arvados-arvbox"
-GEM_HOME="/var/lib/arvados/lib/ruby/gems/2.7.0"
getip() {
docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $ARVBOX_CONTAINER
@@ -144,7 +143,6 @@ docker_run_dev() {
"--volume=$PG_DATA:/var/lib/postgresql:rw" \
"--volume=$VAR_DATA:$ARVADOS_CONTAINER_PATH:rw" \
"--volume=$PASSENGER:/var/lib/passenger:rw" \
- "--volume=$GEMS:$GEM_HOME:rw" \
"--volume=$PIPCACHE:/var/lib/pip:rw" \
"--volume=$NPMCACHE:/var/lib/npm:rw" \
"--volume=$GOSTUFF:/var/lib/gopath:rw" \
@@ -295,7 +293,6 @@ run() {
-e COLUMNS=$(tput cols) \
-e TERM=$TERM \
-e WORKSPACE=/usr/src/arvados \
- -e GEM_HOME=$GEM_HOME \
-e CONFIGSRC=$ARVADOS_CONTAINER_PATH/run_tests \
$ARVBOX_CONTAINER \
/usr/local/lib/arvbox/runsu.sh \
@@ -469,7 +466,6 @@ case "$subcmd" in
-e LINES=$(tput lines) \
-e COLUMNS=$(tput cols) \
-e TERM=$TERM \
- -e GEM_HOME=$GEM_HOME \
$ARVBOX_CONTAINER /bin/bash
;;
@@ -478,14 +474,13 @@ case "$subcmd" in
-e LINES=$(tput lines) \
-e COLUMNS=$(tput cols) \
-e TERM=$TERM \
- -e GEM_HOME=$GEM_HOME \
-u arvbox \
-w /usr/src/arvados \
$ARVBOX_CONTAINER /bin/bash --login
;;
pipe)
- exec docker exec -i $ARVBOX_CONTAINER /usr/bin/env GEM_HOME=$GEM_HOME /bin/bash -
+ exec docker exec -i $ARVBOX_CONTAINER /usr/bin/env /bin/bash -
;;
stop)
@@ -650,7 +645,7 @@ case "$subcmd" in
;;
hotreset)
- exec docker exec -i $ARVBOX_CONTAINER /usr/bin/env GEM_HOME=$GEM_HOME /bin/bash - <<EOF
+ exec docker exec -i $ARVBOX_CONTAINER /usr/bin/env /bin/bash - <<EOF
sv stop api
sv stop controller
sv stop websockets
@@ -660,7 +655,7 @@ sv stop keepproxy
cd /usr/src/arvados/services/api
export DISABLE_DATABASE_ENVIRONMENT_CHECK=1
export RAILS_ENV=development
-flock $GEM_HOME/gems.lock bin/bundle exec rake db:drop
+bin/bundle exec rake db:drop
rm $ARVADOS_CONTAINER_PATH/api_database_setup
rm $ARVADOS_CONTAINER_PATH/superuser_token
sv start api
diff --git a/tools/arvbox/lib/arvbox/docker/Dockerfile.base b/tools/arvbox/lib/arvbox/docker/Dockerfile.base
index 822eda0ad..b984aeb7f 100644
--- a/tools/arvbox/lib/arvbox/docker/Dockerfile.base
+++ b/tools/arvbox/lib/arvbox/docker/Dockerfile.base
@@ -98,9 +98,6 @@ RUN /etc/init.d/postgresql start && \
su postgres -c 'createuser -s arvbox' && \
/etc/init.d/postgresql stop
-ENV GEM_HOME /var/lib/arvados/lib/ruby/gems/2.7.0
-ENV PATH $PATH:$GEM_HOME/bin
-
VOLUME /var/lib/docker
VOLUME /var/log/nginx
VOLUME /etc/ssl/private
diff --git a/tools/arvbox/lib/arvbox/docker/api-setup.sh b/tools/arvbox/lib/arvbox/docker/api-setup.sh
index 6e455b829..9bc8ac076 100755
--- a/tools/arvbox/lib/arvbox/docker/api-setup.sh
+++ b/tools/arvbox/lib/arvbox/docker/api-setup.sh
@@ -56,16 +56,16 @@ EOF
fi
if ! test -f $ARVADOS_CONTAINER_PATH/api_database_setup ; then
- flock $GEM_HOME/gems.lock bin/rake db:setup
+ bin/rake db:setup
touch $ARVADOS_CONTAINER_PATH/api_database_setup
fi
if ! test -s $ARVADOS_CONTAINER_PATH/superuser_token ; then
- superuser_tok=$(flock $GEM_HOME/gems.lock bin/bundle exec ./script/create_superuser_token.rb)
+ superuser_tok=$(bin/bundle exec ./script/create_superuser_token.rb)
echo "$superuser_tok" > $ARVADOS_CONTAINER_PATH/superuser_token
fi
rm -rf tmp
mkdir -p tmp/cache
-flock $GEM_HOME/gems.lock bin/rake db:migrate
+bin/rake db:migrate
diff --git a/tools/arvbox/lib/arvbox/docker/common.sh b/tools/arvbox/lib/arvbox/docker/common.sh
index 14e850ed3..54379a5ed 100644
--- a/tools/arvbox/lib/arvbox/docker/common.sh
+++ b/tools/arvbox/lib/arvbox/docker/common.sh
@@ -6,8 +6,7 @@ export RUBY_VERSION=2.7.0
export BUNDLER_VERSION=2.2.19
export DEBIAN_FRONTEND=noninteractive
-export GEM_HOME=/var/lib/arvados/lib/ruby/gems/$RUBY_VERSION
-export PATH=${PATH}:/usr/local/go/bin:$GEM_HOME/bin:/var/lib/arvados/bin
+export PATH=${PATH}:/usr/local/go/bin:/var/lib/arvados/bin
export npm_config_cache=/var/lib/npm
export npm_config_cache_min=Infinity
export R_LIBS=/var/lib/Rlibs
@@ -74,8 +73,8 @@ run_bundler() {
# If present, use the one associated with rails workbench or API
BUNDLER=$PWD/bin/bundle
fi
- if ! flock $GEM_HOME/gems.lock $BUNDLER install --verbose --local --no-deployment $frozen "$@" ; then
- flock $GEM_HOME/gems.lock $BUNDLER install --verbose --no-deployment $frozen "$@"
+ if ! $BUNDLER install --verbose --local --no-deployment $frozen "$@" ; then
+ $BUNDLER install --verbose --no-deployment $frozen "$@"
fi
}
diff --git a/tools/arvbox/lib/arvbox/docker/createusers.sh b/tools/arvbox/lib/arvbox/docker/createusers.sh
index 6aeea1f07..f5cbc72e0 100755
--- a/tools/arvbox/lib/arvbox/docker/createusers.sh
+++ b/tools/arvbox/lib/arvbox/docker/createusers.sh
@@ -5,14 +5,13 @@
set -e -o pipefail
-export GEM_HOME=/var/lib/arvados/lib/ruby/gems/2.7.0
export ARVADOS_CONTAINER_PATH=/var/lib/arvados-arvbox
if ! grep "^arvbox:" /etc/passwd >/dev/null 2>/dev/null ; then
HOSTUID=$(ls -nd /usr/src/arvados | sed 's/ */ /' | cut -d' ' -f4)
HOSTGID=$(ls -nd /usr/src/arvados | sed 's/ */ /' | cut -d' ' -f5)
- mkdir -p $ARVADOS_CONTAINER_PATH/git $GEM_HOME \
+ mkdir -p $ARVADOS_CONTAINER_PATH/git \
/var/lib/passenger /var/lib/gopath \
/var/lib/pip /var/lib/npm
@@ -32,7 +31,7 @@ if ! grep "^arvbox:" /etc/passwd >/dev/null 2>/dev/null ; then
useradd --groups docker crunch
if [[ "$1" != --no-chown ]] ; then
- chown arvbox:arvbox -R /usr/local $ARVADOS_CONTAINER_PATH $GEM_HOME \
+ chown arvbox:arvbox -R /usr/local $ARVADOS_CONTAINER_PATH \
/var/lib/passenger /var/lib/postgresql \
/var/lib/nginx /var/log/nginx /etc/ssl/private \
/var/lib/gopath /var/lib/pip /var/lib/npm \
@@ -53,7 +52,6 @@ if ! grep "^arvbox:" /etc/passwd >/dev/null 2>/dev/null ; then
cat <<EOF > /etc/profile.d/paths.sh
export PATH=/var/lib/arvados/bin:/usr/local/bin:/usr/bin:/bin
-export GEM_HOME=/var/lib/arvados/lib/ruby/gems/2.7.0
export npm_config_cache=/var/lib/npm
export npm_config_cache_min=Infinity
export R_LIBS=/var/lib/Rlibs
diff --git a/tools/arvbox/lib/arvbox/docker/service/api/run-service b/tools/arvbox/lib/arvbox/docker/service/api/run-service
index e93dfec9b..974ac9865 100755
--- a/tools/arvbox/lib/arvbox/docker/service/api/run-service
+++ b/tools/arvbox/lib/arvbox/docker/service/api/run-service
@@ -17,8 +17,8 @@ else
fi
run_bundler --without=development --binstubs
-flock $GEM_HOME/gems.lock bin/passenger-config build-native-support
-flock $GEM_HOME/gems.lock bin/passenger-config install-standalone-runtime
+bin/passenger-config build-native-support
+bin/passenger-config install-standalone-runtime
if test "$1" = "--only-deps" ; then
exit
diff --git a/tools/arvbox/lib/arvbox/docker/service/doc/run-service b/tools/arvbox/lib/arvbox/docker/service/doc/run-service
index 36566c9d9..aa7e0822e 100755
--- a/tools/arvbox/lib/arvbox/docker/service/doc/run-service
+++ b/tools/arvbox/lib/arvbox/docker/service/doc/run-service
@@ -29,4 +29,4 @@ if test "$1" = "--only-deps" ; then
fi
cd /usr/src/arvados/doc
-flock $GEM_HOME/gems.lock bundle exec rake generate baseurl=http://$localip:${services[doc]} arvados_api_host=$localip:${services[controller-ssl]} arvados_workbench_host=http://$localip
+bundle exec rake generate baseurl=http://$localip:${services[doc]} arvados_api_host=$localip:${services[controller-ssl]} arvados_workbench_host=http://$localip
diff --git a/tools/arvbox/lib/arvbox/docker/service/gitolite/run-service b/tools/arvbox/lib/arvbox/docker/service/gitolite/run-service
index 698367b8a..55aff375f 100755
--- a/tools/arvbox/lib/arvbox/docker/service/gitolite/run-service
+++ b/tools/arvbox/lib/arvbox/docker/service/gitolite/run-service
@@ -125,6 +125,6 @@ $RAILS_ENV:
EOF
while true ; do
- flock $GEM_HOME/gems.lock bundle exec script/arvados-git-sync.rb $RAILS_ENV
+ bundle exec script/arvados-git-sync.rb $RAILS_ENV
sleep 120
done
diff --git a/tools/arvbox/lib/arvbox/docker/service/ready/run-service b/tools/arvbox/lib/arvbox/docker/service/ready/run-service
index f49e9ea26..6aab29500 100755
--- a/tools/arvbox/lib/arvbox/docker/service/ready/run-service
+++ b/tools/arvbox/lib/arvbox/docker/service/ready/run-service
@@ -63,7 +63,7 @@ fi
if ! [[ -z "$waiting" ]] ; then
if ps x | grep -v grep | grep "bundle install" > /dev/null; then
- gemcount=$(ls $GEM_HOME/gems 2>/dev/null | wc -l)
+ gemcount=0 # $(ls $GEM_HOME/gems 2>/dev/null | wc -l)
gemlockcount=0
for l in /usr/src/arvados/services/api/Gemfile.lock \
diff --git a/tools/arvbox/lib/arvbox/docker/service/workbench/run-service b/tools/arvbox/lib/arvbox/docker/service/workbench/run-service
index dde101e63..84d3017de 100755
--- a/tools/arvbox/lib/arvbox/docker/service/workbench/run-service
+++ b/tools/arvbox/lib/arvbox/docker/service/workbench/run-service
@@ -23,8 +23,8 @@ else
fi
run_bundler --without=development --binstubs
-flock $GEM_HOME/gems.lock bin/passenger-config build-native-support
-flock $GEM_HOME/gems.lock bin/passenger-config install-standalone-runtime
+bin/passenger-config build-native-support
+bin/passenger-config install-standalone-runtime
mkdir -p /usr/src/arvados/apps/workbench/tmp
if test "$1" = "--only-deps" ; then
@@ -34,7 +34,7 @@ cat >config/application.yml <<EOF
$RAILS_ENV:
keep_web_url: https://example.com/c=%{uuid_or_pdh}
EOF
- RAILS_GROUPS=assets flock $GEM_HOME/gems.lock bin/rake npm:install
+ RAILS_GROUPS=assets bin/rake npm:install
rm config/application.yml
exit
fi
@@ -43,5 +43,5 @@ set -u
secret_token=$(cat $ARVADOS_CONTAINER_PATH/workbench_secret_token)
-RAILS_GROUPS=assets flock $GEM_HOME/gems.lock bin/rake npm:install
-flock $GEM_HOME/gems.lock bin/rake assets:precompile
+RAILS_GROUPS=assets bin/rake npm:install
+bin/rake assets:precompile
commit 16bb0d2584757280f2a2de102f1bc53fa92179b7
Author: Peter Amstutz <peter.amstutz at curii.com>
Date: Mon Feb 7 10:31:34 2022 -0500
18657: Almost working again, stupid Ruby
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz at curii.com>
diff --git a/tools/arvbox/lib/arvbox/docker/Dockerfile.base b/tools/arvbox/lib/arvbox/docker/Dockerfile.base
index c93c1a10a..822eda0ad 100644
--- a/tools/arvbox/lib/arvbox/docker/Dockerfile.base
+++ b/tools/arvbox/lib/arvbox/docker/Dockerfile.base
@@ -98,7 +98,7 @@ RUN /etc/init.d/postgresql start && \
su postgres -c 'createuser -s arvbox' && \
/etc/init.d/postgresql stop
-ENV GEM_HOME /var/lib/arvados/lib/ruby/gems/2.5.0
+ENV GEM_HOME /var/lib/arvados/lib/ruby/gems/2.7.0
ENV PATH $PATH:$GEM_HOME/bin
VOLUME /var/lib/docker
diff --git a/tools/arvbox/lib/arvbox/docker/api-setup.sh b/tools/arvbox/lib/arvbox/docker/api-setup.sh
index b1b6d37c0..6e455b829 100755
--- a/tools/arvbox/lib/arvbox/docker/api-setup.sh
+++ b/tools/arvbox/lib/arvbox/docker/api-setup.sh
@@ -56,7 +56,7 @@ EOF
fi
if ! test -f $ARVADOS_CONTAINER_PATH/api_database_setup ; then
- flock $GEM_HOME/gems.lock bin/bundle exec rake db:setup
+ flock $GEM_HOME/gems.lock bin/rake db:setup
touch $ARVADOS_CONTAINER_PATH/api_database_setup
fi
@@ -68,4 +68,4 @@ fi
rm -rf tmp
mkdir -p tmp/cache
-flock $GEM_HOME/gems.lock bin/bundle exec rake db:migrate
+flock $GEM_HOME/gems.lock bin/rake db:migrate
diff --git a/tools/arvbox/lib/arvbox/docker/common.sh b/tools/arvbox/lib/arvbox/docker/common.sh
index 423cb463f..14e850ed3 100644
--- a/tools/arvbox/lib/arvbox/docker/common.sh
+++ b/tools/arvbox/lib/arvbox/docker/common.sh
@@ -2,8 +2,11 @@
#
# SPDX-License-Identifier: AGPL-3.0
+export RUBY_VERSION=2.7.0
+export BUNDLER_VERSION=2.2.19
+
export DEBIAN_FRONTEND=noninteractive
-export GEM_HOME=/var/lib/arvados/lib/ruby/gems/2.5.0
+export GEM_HOME=/var/lib/arvados/lib/ruby/gems/$RUBY_VERSION
export PATH=${PATH}:/usr/local/go/bin:$GEM_HOME/bin:/var/lib/arvados/bin
export npm_config_cache=/var/lib/npm
export npm_config_cache_min=Infinity
@@ -60,18 +63,19 @@ else
fi
run_bundler() {
+ /var/lib/arvados/bin/gem install --no-document bundler:$BUNDLER_VERSION
if test -f Gemfile.lock ; then
frozen=--frozen
else
frozen=""
fi
- BUNDLER=bundler
- if test -x $PWD/bin/bundler ; then
+ BUNDLER=bundle
+ if test -x $PWD/bin/bundle ; then
# If present, use the one associated with rails workbench or API
- BUNDLER=$PWD/bin/bundler
+ BUNDLER=$PWD/bin/bundle
fi
- if ! flock $GEM_HOME/gems.lock $BUNDLER install --binstubs --verbose --local --no-deployment $frozen "$@" ; then
- flock $GEM_HOME/gems.lock $BUNDLER install --binstubs --verbose --no-deployment $frozen "$@"
+ if ! flock $GEM_HOME/gems.lock $BUNDLER install --verbose --local --no-deployment $frozen "$@" ; then
+ flock $GEM_HOME/gems.lock $BUNDLER install --verbose --no-deployment $frozen "$@"
fi
}
diff --git a/tools/arvbox/lib/arvbox/docker/createusers.sh b/tools/arvbox/lib/arvbox/docker/createusers.sh
index 66a4ff474..6aeea1f07 100755
--- a/tools/arvbox/lib/arvbox/docker/createusers.sh
+++ b/tools/arvbox/lib/arvbox/docker/createusers.sh
@@ -5,7 +5,7 @@
set -e -o pipefail
-export GEM_HOME=/var/lib/arvados/lib/ruby/gems/2.5.0
+export GEM_HOME=/var/lib/arvados/lib/ruby/gems/2.7.0
export ARVADOS_CONTAINER_PATH=/var/lib/arvados-arvbox
if ! grep "^arvbox:" /etc/passwd >/dev/null 2>/dev/null ; then
@@ -53,7 +53,7 @@ if ! grep "^arvbox:" /etc/passwd >/dev/null 2>/dev/null ; then
cat <<EOF > /etc/profile.d/paths.sh
export PATH=/var/lib/arvados/bin:/usr/local/bin:/usr/bin:/bin
-export GEM_HOME=/var/lib/arvados/lib/ruby/gems/2.5.0
+export GEM_HOME=/var/lib/arvados/lib/ruby/gems/2.7.0
export npm_config_cache=/var/lib/npm
export npm_config_cache_min=Infinity
export R_LIBS=/var/lib/Rlibs
diff --git a/tools/arvbox/lib/arvbox/docker/service/api/run-service b/tools/arvbox/lib/arvbox/docker/service/api/run-service
index ad18e3cc8..e93dfec9b 100755
--- a/tools/arvbox/lib/arvbox/docker/service/api/run-service
+++ b/tools/arvbox/lib/arvbox/docker/service/api/run-service
@@ -16,7 +16,7 @@ else
export RAILS_ENV=development
fi
-run_bundler --without=development
+run_bundler --without=development --binstubs
flock $GEM_HOME/gems.lock bin/passenger-config build-native-support
flock $GEM_HOME/gems.lock bin/passenger-config install-standalone-runtime
diff --git a/tools/arvbox/lib/arvbox/docker/service/sdk/run-service b/tools/arvbox/lib/arvbox/docker/service/sdk/run-service
index d66bf315b..d98afe823 100755
--- a/tools/arvbox/lib/arvbox/docker/service/sdk/run-service
+++ b/tools/arvbox/lib/arvbox/docker/service/sdk/run-service
@@ -15,8 +15,8 @@ download_cache = /var/lib/pip
EOF
cd /usr/src/arvados/sdk/cli
-run_bundler --binstubs=$PWD/binstubs
-ln -sf /usr/src/arvados/sdk/cli/binstubs/arv /usr/local/bin/arv
+run_bundler --binstubs
+ln -sf /usr/src/arvados/sdk/cli/bin/arv /usr/local/bin/arv
export PYCMD=python3
diff --git a/tools/arvbox/lib/arvbox/docker/service/workbench/run-service b/tools/arvbox/lib/arvbox/docker/service/workbench/run-service
index 008054376..dde101e63 100755
--- a/tools/arvbox/lib/arvbox/docker/service/workbench/run-service
+++ b/tools/arvbox/lib/arvbox/docker/service/workbench/run-service
@@ -22,7 +22,7 @@ else
export RAILS_ENV=development
fi
-run_bundler --without=development
+run_bundler --without=development --binstubs
flock $GEM_HOME/gems.lock bin/passenger-config build-native-support
flock $GEM_HOME/gems.lock bin/passenger-config install-standalone-runtime
mkdir -p /usr/src/arvados/apps/workbench/tmp
@@ -34,7 +34,7 @@ cat >config/application.yml <<EOF
$RAILS_ENV:
keep_web_url: https://example.com/c=%{uuid_or_pdh}
EOF
- RAILS_GROUPS=assets flock $GEM_HOME/gems.lock bin/bundle exec rake npm:install
+ RAILS_GROUPS=assets flock $GEM_HOME/gems.lock bin/rake npm:install
rm config/application.yml
exit
fi
@@ -43,5 +43,5 @@ set -u
secret_token=$(cat $ARVADOS_CONTAINER_PATH/workbench_secret_token)
-RAILS_GROUPS=assets flock $GEM_HOME/gems.lock bin/bundle exec rake npm:install
-flock $GEM_HOME/gems.lock bin/bundle exec rake assets:precompile
+RAILS_GROUPS=assets flock $GEM_HOME/gems.lock bin/rake npm:install
+flock $GEM_HOME/gems.lock bin/rake assets:precompile
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list