3 . /etc/profile.d/rvm.sh
5 export ARVADOS_API_HOST=api
6 export ARVADOS_API_HOST_INSECURE=yes
7 export ARVADOS_API_TOKEN=@@API_SUPERUSER_SECRET@@
10 # Wait for API server to come up.
11 while ! arv user current ; do sleep 1 ; done
13 if ! test -f /root/node.json ; then
14 arv node create --node "{\"hostname\": \"$(hostname)\"}" > /root/node.json
16 # Make sure /dev/fuse permissions are correct (the device appears after fuse is loaded)
17 chmod 1660 /dev/fuse && chgrp fuse /dev/fuse
20 UUID=`grep \"uuid\" /root/node.json |cut -f4 -d\"`
21 PING_SECRET=`grep \"ping_secret\" /root/node.json |cut -f4 -d\"`
23 if ! test -f /etc/cron.d/node_ping ; then
24 echo "*/5 * * * * root /usr/bin/curl -k -d ping_secret=$PING_SECRET https://api/arvados/v1/nodes/$UUID/ping" > /etc/cron.d/node_ping
27 /usr/bin/curl -k -d ping_secret=$PING_SECRET https://api/arvados/v1/nodes/$UUID/ping?ping_secret=$PING_SECRET