fi
;;
- svrestart)
+ sv)
if test -n "$1" ; then
- docker exec -ti $ARVBOX_CONTAINER sv restart "$1"
- docker exec -ti $ARVBOX_CONTAINER sv restart ready
+ docker exec -ti $ARVBOX_CONTAINER sv "$1" "$2"
else
echo "Usage: $0 $subcmd <service>"
echo "Available services:"
echo "reset delete arvbox arvados data (be careful!)"
echo "destroy delete all arvbox code and data (be careful!)"
echo "log <service> tail log of specified service"
- echo "svrestart <service> restart specified service inside arvbox"
+ echo "sv <start|stop|restart> <service> change state of service inside arvbox"
echo "clone <from> <to> clone an arvbox"
;;
esac
pkg-config libattr1-dev python-llfuse python-pycurl \
libwww-perl libio-socket-ssl-perl libcrypt-ssleay-perl \
libjson-perl nginx gitolite3 lsof python-epydoc graphviz \
- apt-transport-https ca-certificates
+ apt-transport-https ca-certificates slurm-wlm
VOLUME /var/lib/docker
VOLUME /var/log/nginx
application_yml_override.py \
/usr/local/lib/arvbox/
-ADD service/ /var/lib/arvbox/service
-RUN rmdir /etc/service && ln -sf /var/lib/arvbox/service /etc
-
# Start the supervisor.
CMD ["/usr/local/bin/runsvinit"]
git clone https://github.com/curoverse/arvados.git && \
git clone https://github.com/curoverse/sso-devise-omniauth-provider.git sso
+ADD service/ /var/lib/arvbox/service
+RUN rmdir /etc/service && ln -sf /var/lib/arvbox/service /etc
+
RUN chown -R 1000:1000 /usr/src && /usr/local/lib/arvbox/createusers.sh
RUN sudo -u arvbox /var/lib/arvbox/service/sso/run-service --only-deps
tar -C /usr/local -xjf /tmp/$PJS.tar.bz2 && \
ln -s ../$PJS/bin/phantomjs /usr/local/bin/
+ADD service/ /var/lib/arvbox/service
+RUN rmdir /etc/service && ln -sf /var/lib/arvbox/service /etc
+
RUN mkdir /etc/test-service && ln -sf /var/lib/arvbox/service/postgres /etc/test-service
--- /dev/null
+/usr/local/lib/arvbox/logger
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+
+exec 2>&1
+set -eux -o pipefail
+
+. /usr/local/lib/arvbox/common.sh
+
+cat > /etc/slurm-llnl/slurm.conf <<EOF
+ControlMachine=$HOSTNAME
+ControlAddr=$HOSTNAME
+AuthType=auth/munge
+DefaultStorageLoc=/var/log/slurm-llnl
+SelectType=select/cons_res
+SelectTypeParameters=CR_CPU_Memory
+SlurmUser=arvbox
+SlurmdUser=arvbox
+SlurmctldPort=7002
+SlurmctldTimeout=300
+SlurmdPort=7003
+SlurmdSpoolDir=/var/tmp/slurmd.spool
+SlurmdTimeout=300
+StateSaveLocation=/var/tmp/slurm.state
+NodeName=$HOSTNAME
+PartitionName=compute State=UP Default=YES Nodes=$HOSTNAME
+EOF
+
+mkdir -p /var/run/munge
+
+/usr/sbin/munged -f
+
+exec /usr/sbin/slurmctld -v -D
--- /dev/null
+/usr/local/lib/arvbox/logger
\ No newline at end of file
--- /dev/null
+#!/bin/bash
+
+exec 2>&1
+set -eux -o pipefail
+
+exec /usr/local/lib/arvbox/runsu.sh /usr/sbin/slurmd -v -D
git config --system "credential.http://$localip:${services[arv-git-httpd]}/.username" none
git config --system "credential.http://$localip:${services[arv-git-httpd]}/.helper" '!cred(){ cat >/dev/null; if [ "$1" = get ]; then echo password=$ARVADOS_API_TOKEN; fi; };cred'
-exec /usr/local/lib/arvbox/runsu.sh $0-service
+/usr/local/lib/arvbox/runsu.sh $0-service
+
+cd /usr/src/arvados/services/login-sync
+
+export ARVADOS_API_HOST=$localip:${services[api]}
+export ARVADOS_API_HOST_INSECURE=1
+export ARVADOS_API_TOKEN=$(cat /var/lib/arvados/superuser_token)
+export ARVADOS_VIRTUAL_MACHINE_UUID=$(cat /var/lib/arvados/vm-uuid)
+
+while true ; do
+ bundle exec arvados-login-sync
+ sleep 120
+done
else
arv virtual_machine create --virtual-machine "$vm"
fi
-
-while true ; do
- bundle exec arvados-login-sync
- sleep 120
-done
# If there's a config file in /var/www identical to the one in /etc,
# overwrite it with a symlink after porting its permissions.
elif cmp --quiet "$release_conffile" "$etc_conffile"; then
- local ownership="$(stat -c "%U:%G" "$release_conffile")"
+ local ownership="$(stat -c "%u:%g" "$release_conffile")"
+ local owning_group="${ownership#*:}"
+ if [ 0 != "$owning_group" ]; then
+ chgrp "$owning_group" "$CONFIG_PATH" /etc/arvados
+ fi
chown "$ownership" "$etc_conffile"
chmod --reference="$release_conffile" "$etc_conffile"
- chgrp "${ownership#*:}" "$CONFIG_PATH" /etc/arvados
- chmod g+rx "$CONFIG_PATH" /etc/arvados
ln --force -s "$etc_conffile" "$release_conffile"
fi
fi
if [ "$1" = 'purge' ]; then
# This is a debian-based system and purge was requested
purge
-elif [ "$1" = "0" ] || [ "$1" = "1" ] || [ "$1" = "2" ]; then
+elif [ "$1" = "0" ]; then
# This is an rpm-based system, no guarantees are made, always purge
# Apparently yum doesn't actually remember what it installed.
# Clean those files up here, then purge.
local -a pos_args=("$srcdir/=$railsdir" "$pkgname" "Curoverse, Inc." dir
"$(cat "$version_file")")
local license_arg="$license_path=$railsdir/$(basename "$license_path")"
- # --iteration=3 accommodates the package scripts change from #8014.
- # --iteration=4 accommodates the packaging changes (inclusion of vendor/cache) from #8008.
- local -a switches=(--iteration=4
+ # --iteration=5 accommodates the package script bugfixes #8371 and #8413.
+ local -a switches=(--iteration=5
--after-install "$scripts_dir/postinst"
--before-remove "$scripts_dir/prerm"
--after-remove "$scripts_dir/postrm")