[ARVADOS] updated: 1.3.0-1272-gdd0104a2e
Git user
git at public.curoverse.com
Tue Jul 9 14:01:49 UTC 2019
Summary of changes:
tools/arvbox/lib/arvbox/docker/api-setup.sh | 25 ++++++++++++----------
.../lib/arvbox/docker/service/controller/run | 8 +++++++
.../arvbox/docker/service/workbench/run-service | 8 +++++--
3 files changed, 28 insertions(+), 13 deletions(-)
via dd0104a2edb1619ba877b82d7f9d69bccd800d18 (commit)
from 94972ae20fa5d9dde7dc814695a970e9d5bad4a7 (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 dd0104a2edb1619ba877b82d7f9d69bccd800d18
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date: Mon Jul 8 16:40:42 2019 -0400
Arvbox won't create application.yml if arvados_config.rb exists.
refs #14812
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <pamstutz at veritasgenetics.com>
diff --git a/tools/arvbox/lib/arvbox/docker/api-setup.sh b/tools/arvbox/lib/arvbox/docker/api-setup.sh
index a64f2f928..f6191d63f 100755
--- a/tools/arvbox/lib/arvbox/docker/api-setup.sh
+++ b/tools/arvbox/lib/arvbox/docker/api-setup.sh
@@ -45,6 +45,19 @@ else
echo $vm_uuid > /var/lib/arvados/vm-uuid
fi
+if ! test -f /var/lib/arvados/api_database_pw ; then
+ ruby -e 'puts rand(2**128).to_s(36)' > /var/lib/arvados/api_database_pw
+fi
+database_pw=$(cat /var/lib/arvados/api_database_pw)
+
+if ! (psql postgres -c "\du" | grep "^ arvados ") >/dev/null ; then
+ psql postgres -c "create user arvados with password '$database_pw'"
+fi
+psql postgres -c "ALTER USER arvados WITH SUPERUSER;"
+
+if test -a /usr/src/arvados/services/api/config/arvados_config.rb ; then
+ rm -f config/application.yml config/database.yml
+else
cat >config/application.yml <<EOF
$RAILS_ENV:
uuid_prefix: $uuid_prefix
@@ -70,18 +83,8 @@ $RAILS_ENV:
EOF
(cd config && /usr/local/lib/arvbox/yml_override.py application.yml)
-
-if ! test -f /var/lib/arvados/api_database_pw ; then
- ruby -e 'puts rand(2**128).to_s(36)' > /var/lib/arvados/api_database_pw
-fi
-database_pw=$(cat /var/lib/arvados/api_database_pw)
-
-if ! (psql postgres -c "\du" | grep "^ arvados ") >/dev/null ; then
- psql postgres -c "create user arvados with password '$database_pw'"
-fi
-psql postgres -c "ALTER USER arvados WITH SUPERUSER;"
-
sed "s/password:.*/password: $database_pw/" <config/database.yml.example >config/database.yml
+fi
if ! test -f /var/lib/arvados/api_database_setup ; then
bundle exec rake db:setup
diff --git a/tools/arvbox/lib/arvbox/docker/service/controller/run b/tools/arvbox/lib/arvbox/docker/service/controller/run
index 799fc63e1..bf288dc0c 100755
--- a/tools/arvbox/lib/arvbox/docker/service/controller/run
+++ b/tools/arvbox/lib/arvbox/docker/service/controller/run
@@ -23,6 +23,8 @@ sso_app_secret=$(cat /var/lib/arvados/sso_app_secret)
vm_uuid=$(cat /var/lib/arvados/vm-uuid)
database_pw=$(cat /var/lib/arvados/api_database_pw)
+workbench_secret_key_base=$(cat /var/lib/arvados/workbench_secret_token)
+
if test -s /var/lib/arvados/api_rails_env ; then
database_env=$(cat /var/lib/arvados/api_rails_env)
else
@@ -50,6 +52,9 @@ Clusters:
ExternalURL: "http://$localip:${services[arv-git-httpd]}/"
WebDAV:
ExternalURL: "https://$localip:${services[keep-web-ssl]}/"
+ Composer:
+ ExternalURL: "http://$localip:${services[composer]}"
+
NodeProfiles: # to be deprecated in favor of "Services" section
"*":
arvados-controller:
@@ -82,6 +87,9 @@ Clusters:
AutoSetupNewUsers: true
AutoSetupNewUsersWithVmUUID: $vm_uuid
AutoSetupNewUsersWithRepository: true
+ Workbench:
+ SecretKeyBase: $workbench_secret_key_base
+ ArvadosDocsite: http://$localip:${services[doc]}/
EOF
/usr/local/lib/arvbox/yml_override.py /var/lib/arvados/cluster_config.yml
diff --git a/tools/arvbox/lib/arvbox/docker/service/workbench/run-service b/tools/arvbox/lib/arvbox/docker/service/workbench/run-service
index 6f13ee027..1f989f63d 100755
--- a/tools/arvbox/lib/arvbox/docker/service/workbench/run-service
+++ b/tools/arvbox/lib/arvbox/docker/service/workbench/run-service
@@ -33,6 +33,9 @@ if ! test -s /var/lib/arvados/workbench_secret_token ; then
fi
secret_token=$(cat /var/lib/arvados/workbench_secret_token)
+if test -a /usr/src/arvados/apps/workbench/config/arvados_config.rb ; then
+ rm -f config/application.yml
+else
cat >config/application.yml <<EOF
$RAILS_ENV:
secret_token: $secret_token
@@ -47,6 +50,7 @@ $RAILS_ENV:
workbench2_url: https://$localip:${services[workbench2-ssl]}
EOF
-bundle exec rake assets:precompile
-
(cd config && /usr/local/lib/arvbox/yml_override.py application.yml)
+fi
+
+bundle exec rake assets:precompile
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list