5 . /etc/profile.d/rvm.sh
7 export ARVADOS_API_HOST=api
8 export ARVADOS_API_HOST_INSECURE=yes
9 export ARVADOS_API_TOKEN=@@API_SUPERUSER_SECRET@@
11 # Arvados repository object
12 all_users_group_uuid="$prefix-j7d0g-fffffffffffffff"
13 repo_uuid=`arv --format=uuid repository create --repository '{"name":"arvados","fetch_url":"git@api:arvados.git","push_url":"git@api:arvados.git"}'`
14 echo "Arvados repository uuid is $repo_uuid"
16 read -rd $'\000' newlink <<EOF; arv link create --link "$newlink"
18 "tail_uuid":"$all_users_group_uuid",
19 "head_uuid":"$repo_uuid",
20 "link_class":"permission",
25 # Make sure the necessary keep_service objects exist
26 arv keep_service list > /tmp/keep_service.list
28 grep -q keep_server_0 /tmp/keep_service.list
29 if [[ "$?" != "0" ]]; then
30 arv keep_service create --keep-service "$(cat /root/keep_server_0.json)"
33 grep -q keep_server_1 /tmp/keep_service.list
34 if [[ "$?" != "0" ]]; then
35 arv keep_service create --keep-service "$(cat /root/keep_server_1.json)"
38 # User repository object
39 user_uuid=`arv --format=uuid user current`
40 repo_uuid=`arv --format=uuid repository create --repository '{"name":"@@ARVADOS_USER_NAME@@","fetch_url":"git@api:@@ARVADOS_USER_NAME@@.git","push_url":"git@api:@@ARVADOS_USER_NAME@@.git"}'`
41 echo "User repository uuid is $repo_uuid"
43 read -rd $'\000' newlink <<EOF; arv link create --link "$newlink"
45 "tail_uuid":"$user_uuid",
46 "head_uuid":"$repo_uuid",
47 "link_class":"permission",
52 # Shell machine object
53 arv virtual_machine create --virtual-machine '{"hostname":"shell"}'