[ARVADOS] created: 1.1.0-39-g2778384
Git user
git at public.curoverse.com
Tue Oct 31 12:42:53 EDT 2017
at 2778384cf0c3315c261bc1d52e6c39dac017a3bd (commit)
commit 2778384cf0c3315c261bc1d52e6c39dac017a3bd
Author: Peter Amstutz <pamstutz at veritasgenetics.com>
Date: Tue Oct 31 12:40:27 2017 -0400
12377: Arvbox support for Composer
diff --git a/tools/arvbox/bin/arvbox b/tools/arvbox/bin/arvbox
index 6d535ea..f4a65da 100755
--- a/tools/arvbox/bin/arvbox
+++ b/tools/arvbox/bin/arvbox
@@ -46,6 +46,10 @@ if test -z "$SSO_ROOT" ; then
SSO_ROOT="$ARVBOX_DATA/sso-devise-omniauth-provider"
fi
+if test -z "$COMPOSER_ROOT" ; then
+ COMPOSER_ROOT="$ARVBOX_DATA/composer"
+fi
+
PG_DATA="$ARVBOX_DATA/postgres"
VAR_DATA="$ARVBOX_DATA/var"
PASSENGER="$ARVBOX_DATA/passenger"
@@ -193,6 +197,9 @@ run() {
if ! test -d "$SSO_ROOT" ; then
git clone https://github.com/curoverse/sso-devise-omniauth-provider.git "$SSO_ROOT"
fi
+ if ! test -d "$COMPOSER_ROOT" ; then
+ git clone https://github.com/curoverse/composer.git "$COMPOSER_ROOT"
+ fi
if test "$CONFIG" = test ; then
@@ -205,6 +212,7 @@ run() {
--privileged \
"--volume=$ARVADOS_ROOT:/usr/src/arvados:rw" \
"--volume=$SSO_ROOT:/usr/src/sso:rw" \
+ "--volume=$COMPOSER_ROOT:/usr/src/composer:rw" \
"--volume=$PG_DATA:/var/lib/postgresql:rw" \
"--volume=$VAR_DATA:/var/lib/arvados:rw" \
"--volume=$PASSENGER:/var/lib/passenger:rw" \
@@ -246,6 +254,7 @@ run() {
--privileged \
"--volume=$ARVADOS_ROOT:/usr/src/arvados:rw" \
"--volume=$SSO_ROOT:/usr/src/sso:rw" \
+ "--volume=$COMPOSER_ROOT:/usr/src/composer:rw" \
"--volume=$PG_DATA:/var/lib/postgresql:rw" \
"--volume=$VAR_DATA:/var/lib/arvados:rw" \
"--volume=$PASSENGER:/var/lib/passenger:rw" \
diff --git a/tools/arvbox/lib/arvbox/docker/Dockerfile.base b/tools/arvbox/lib/arvbox/docker/Dockerfile.base
index a12c107..cf46087 100644
--- a/tools/arvbox/lib/arvbox/docker/Dockerfile.base
+++ b/tools/arvbox/lib/arvbox/docker/Dockerfile.base
@@ -18,7 +18,8 @@ RUN apt-get update && \
libjson-perl nginx gitolite3 lsof libreadline-dev \
apt-transport-https ca-certificates slurm-wlm \
linkchecker python3-virtualenv python-virtualenv xvfb iceweasel \
- libgnutls28-dev python3-dev vim cadaver cython gnupg dirmngr && \
+ libgnutls28-dev python3-dev vim cadaver cython gnupg dirmngr \
+ libsecret-1-dev && \
apt-get clean
ENV RUBYVERSION_MINOR 2.3
diff --git a/tools/arvbox/lib/arvbox/docker/common.sh b/tools/arvbox/lib/arvbox/docker/common.sh
index 62225df..466ef1f 100644
--- a/tools/arvbox/lib/arvbox/docker/common.sh
+++ b/tools/arvbox/lib/arvbox/docker/common.sh
@@ -21,6 +21,7 @@ services=(
[workbench]=80
[api]=8000
[sso]=8900
+ [composer]=4200
[arv-git-httpd]=9001
[keep-web]=9002
[keepproxy]=25100
diff --git a/tools/arvbox/lib/arvbox/docker/createusers.sh b/tools/arvbox/lib/arvbox/docker/createusers.sh
index 3296a3c..a4689f0 100755
--- a/tools/arvbox/lib/arvbox/docker/createusers.sh
+++ b/tools/arvbox/lib/arvbox/docker/createusers.sh
@@ -19,6 +19,7 @@ if ! grep "^arvbox:" /etc/passwd >/dev/null 2>/dev/null ; then
--uid $HOSTUID --gid $HOSTGID \
--non-unique \
--groups docker \
+ --shell /bin/bash \
arvbox
useradd --home-dir /var/lib/arvados/git --uid $HOSTUID --gid $HOSTGID --non-unique git
useradd --groups docker crunch
diff --git a/tools/arvbox/lib/arvbox/docker/service/composer/log/main/.gitstub b/tools/arvbox/lib/arvbox/docker/service/composer/log/main/.gitstub
new file mode 100644
index 0000000..e69de29
diff --git a/tools/arvbox/lib/arvbox/docker/service/composer/log/run b/tools/arvbox/lib/arvbox/docker/service/composer/log/run
new file mode 120000
index 0000000..d6aef4a
--- /dev/null
+++ b/tools/arvbox/lib/arvbox/docker/service/composer/log/run
@@ -0,0 +1 @@
+/usr/local/lib/arvbox/logger
\ No newline at end of file
diff --git a/tools/arvbox/lib/arvbox/docker/service/composer/run b/tools/arvbox/lib/arvbox/docker/service/composer/run
new file mode 100755
index 0000000..cd2f86a
--- /dev/null
+++ b/tools/arvbox/lib/arvbox/docker/service/composer/run
@@ -0,0 +1,8 @@
+#!/bin/sh
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+set -e
+
+/usr/local/lib/arvbox/runsu.sh $0-service $1
diff --git a/tools/arvbox/lib/arvbox/docker/service/composer/run-service b/tools/arvbox/lib/arvbox/docker/service/composer/run-service
new file mode 100755
index 0000000..0c24ab9
--- /dev/null
+++ b/tools/arvbox/lib/arvbox/docker/service/composer/run-service
@@ -0,0 +1,21 @@
+#!/bin/bash
+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: AGPL-3.0
+
+exec 2>&1
+set -ex -o pipefail
+
+. /usr/local/lib/arvbox/common.sh
+
+cd /usr/src/composer
+
+npm install yarn
+
+PATH=$PATH:/usr/src/composer/node_modules/.bin
+
+yarn install
+
+if test "$1" != "--only-deps" ; then
+ exec ng serve --host 0.0.0.0 --port 4200
+fi
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list