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@@
12 prefix=`arv --format=uuid user current | cut -d- -f1`
13 read -rd $'\000' newgroup <<EOF; arv group create --group "$newgroup"
15 "uuid":"$prefix-j7d0g-fffffffffffffff",
20 # Arvados repository object
21 all_users_group_uuid="$prefix-j7d0g-fffffffffffffff"
22 repo_uuid=`arv --format=uuid repository create --repository '{"name":"arvados","fetch_url":"git@api:arvados.git","push_url":"git@api:arvados.git"}'`
23 echo "Arvados repository uuid is $repo_uuid"
25 read -rd $'\000' newlink <<EOF; arv link create --link "$newlink"
27 "tail_uuid":"$all_users_group_uuid",
28 "head_uuid":"$repo_uuid",
29 "link_class":"permission",
34 # Make sure the necessary keep_service objects exist
35 arv keep_service list > /tmp/keep_service.list
37 grep -q keep_server_0 /tmp/keep_service.list
38 if [[ "$?" != "0" ]]; then
39 arv keep_service create --keep-service "$(cat /root/keep_server_0.json)"
42 grep -q keep_server_1 /tmp/keep_service.list
43 if [[ "$?" != "0" ]]; then
44 arv keep_service create --keep-service "$(cat /root/keep_server_1.json)"
47 # User repository object
48 user_uuid=`arv --format=uuid user current`
49 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"}'`
50 echo "User repository uuid is $repo_uuid"
52 read -rd $'\000' newlink <<EOF; arv link create --link "$newlink"
54 "tail_uuid":"$user_uuid",
55 "head_uuid":"$repo_uuid",
56 "link_class":"permission",
61 # Shell machine object
62 arv virtual_machine create --virtual-machine '{"hostname":"shell"}'