5 if test -f /root/finished_arvados_setup ; then
9 . /etc/profile.d/rvm.sh
11 export ARVADOS_API_HOST=api
12 export ARVADOS_API_HOST_INSECURE=yes
13 export ARVADOS_API_TOKEN=@@API_SUPERUSER_SECRET@@
16 # Wait for API server to come up.
17 while ! arv user current ; do sleep 1 ; done
19 # Arvados repository object
20 all_users_group_uuid="@@API_HOSTNAME@@-j7d0g-fffffffffffffff"
22 arv user update --uuid @@API_HOSTNAME@@-tpzed-000000000000000 --user '{"username":"root"}'
23 repo_uuid=`arv --format=uuid repository create --repository '{"owner_uuid":"@@API_HOSTNAME@@-tpzed-000000000000000", "name":"arvados"}'`
24 echo "Arvados repository uuid is $repo_uuid"
26 read -rd $'\000' newlink <<EOF; arv link create --link "$newlink"
28 "tail_uuid":"$all_users_group_uuid",
29 "head_uuid":"$repo_uuid",
30 "link_class":"permission",
35 # Make sure the necessary keep_service objects exist
36 arv keep_service list > /tmp/keep_service.list
38 grep -q keep_server_0 /tmp/keep_service.list
39 if [[ "$?" != "0" ]]; then
40 arv keep_service create --keep-service "$(cat /root/keep_server_0.json)"
43 grep -q keep_server_1 /tmp/keep_service.list
44 if [[ "$?" != "0" ]]; then
45 arv keep_service create --keep-service "$(cat /root/keep_server_1.json)"
48 grep -q keep_proxy /tmp/keep_service.list
49 if [[ "$?" != "0" ]]; then
50 arv keep_service create --keep-service "$(cat /root/keep_proxy.json)"
53 # User repository object
54 # user_uuid=`arv --format=uuid user current`
55 # repo_uuid=`arv --format=uuid repository create --repository '{"name":"@@ARVADOS_USER_NAME@@","fetch_url":"git@api.dev.arvados:@@ARVADOS_USER_NAME@@.git","push_url":"git@api.dev.arvados:@@ARVADOS_USER_NAME@@.git"}'`
57 # echo "User repository uuid is $repo_uuid"
59 # read -rd $'\000' newlink <<EOF; arv link create --link "$newlink"
61 # "tail_uuid":"$user_uuid",
62 # "head_uuid":"$repo_uuid",
63 # "link_class":"permission",
68 # # Shell machine object
69 shell_uuid=`arv --format=uuid virtual_machine create --virtual-machine '{"hostname":"shell"}'`
70 arv virtual_machine create --virtual-machine '{"hostname":"shell.dev", "uuid": "@@API_HOSTNAME@@-2x53u-csbtkecoa669vkz"}'
72 # read -rd $'\000' newlink <<EOF; arv link create --link "$newlink"
74 # "tail_uuid":"$user_uuid",
75 # "head_uuid":"$shell_uuid",
76 # "link_class":"permission",
78 # "properties": {"username": "@@ARVADOS_USER_NAME@@"}
82 touch /root/finished_arvados_setup