8784: Fix test for latest firefox.
[arvados.git] / doc / install / create-standard-objects.html.textile.liquid
1 ---
2 layout: default
3 navsection: installguide
4 title: Create standard objects
5
6 ...
7
8 In these steps we use the Arvados CLI tools on the <strong>shell server</strong> to create a few Arvados objects. The CLI tools require an ARVADOS_API_TOKEN environment variable with a valid admin token. If you haven't already done so, set that up as shown in the "API token guide":../user/reference/api-tokens.html.
9
10 h3. Arvados repository
11
12 Here we create a repository object which will be used to set up a hosted clone of the arvados repository on this cluster.
13
14 <notextile>
15 <pre><code>~$ <span class="userinput">prefix=`arv --format=uuid user current | cut -d- -f1`</span>
16 ~$ <span class="userinput">echo "Site prefix is '$prefix'"</span>
17 ~$ <span class="userinput">all_users_group_uuid="$prefix-j7d0g-fffffffffffffff"</span>
18 ~$ <span class="userinput">repo_uuid=`arv --format=uuid repository create --repository "{\"owner_uuid\":\"$prefix-tpzed-000000000000000\", \"name\":\"arvados\"}"`</span>
19 ~$ <span class="userinput">echo "Arvados repository uuid is '$repo_uuid'"</span>
20 </code></pre></notextile>
21
22 Create a link object to make the repository object readable by the "All users" group, and therefore by every active user. This makes it possible for users to run the bundled Crunch scripts by specifying @"script_version":"master","repository":"arvados"@ rather than pulling the Arvados source tree into their own repositories.
23
24 <notextile>
25 <pre><code>~$ <span class="userinput">read -rd $'\000' newlink &lt;&lt;EOF; arv link create --link "$newlink"</span>
26 <span class="userinput">{
27  "tail_uuid":"$all_users_group_uuid",
28  "head_uuid":"$repo_uuid",
29  "link_class":"permission",
30  "name":"can_read"
31 }
32 EOF</span>
33 </code></pre></notextile>
34
35 In a couple of minutes, your arvados-git-sync cron job will create an empty repository on your git server. Seed it with the real arvados repository. If your git credential helpers were configured correctly when you "set up your shell server":install-shell-server.html, the "git push" command will use your API token instead of prompting you for a username and password.
36
37 <notextile>
38 <pre><code>~$ <span class="userinput">cd /tmp</span>
39 /tmp$ <span class="userinput">git clone --bare https://github.com/curoverse/arvados.git</span>
40 /tmp <span class="userinput">git --git-dir arvados.git push https://git.<b>uuid_prefix.your.domain</b>/arvados.git '*:*'</span>
41 </code></pre>
42 </notextile>
43
44 If you did not set up a HTTPS service, you can push to <code>git@git.uuid_prefix.your.domain:arvados.git</code> using your SSH key, or by logging in to your git server and using sudo.
45
46 <notextile>
47 <pre><code>gitserver:~$ <span class="userinput">sudo -u git -i bash</span>
48 git@gitserver:~$ <span class="userinput">git clone --bare https://github.com/curoverse/arvados.git /tmp/arvados.git</span>
49 git@gitserver:~$ <span class="userinput">cd /tmp/arvados.git</span>
50 git@gitserver:/tmp/arvados.git$ <span class="userinput">gitolite push /var/lib/arvados/git/repositories/<b>your_arvados_repo_uuid</b>.git '*:*'</span>
51 </code></pre>
52 </notextile>
53
54 h3. Default project for docker images
55
56 Here we create a default project for the standard Arvados Docker images, and give all users read access to it. The project is owned by the system user.
57
58 <notextile>
59 <pre><code>~$ <span class="userinput">project_uuid=`arv --format=uuid group create --group "{\"owner_uuid\":\"$prefix-tpzed-000000000000000\", \"name\":\"Arvados Standard Docker Images\"}"`</span>
60 ~$ <span class="userinput">echo "Arvados project uuid is '$project_uuid'"</span>
61 ~$ <span class="userinput">read -rd $'\000' newlink &lt;&lt;EOF; arv link create --link "$newlink"</span>
62 <span class="userinput">{
63  "tail_uuid":"$all_users_group_uuid",
64  "head_uuid":"$project_uuid",
65  "link_class":"permission",
66  "name":"can_read"
67 }
68 EOF</span>
69 </code></pre></notextile>
70
71 h3. Download and tag the latest arvados/jobs docker image
72
73 The @arvados-cwl-runner@ needs access to an arvados/jobs image that is tagged as 'latest'. The following command downloads the latest arvados/jobs image from Docker Hub, loads it into Keep, and tags it as 'latest'.
74
75 <notextile>
76 <pre><code>~$ <span class="userinput">arv-keepdocker --pull arvados/jobs latest</span>
77 </code></pre></notextile>
78
79 If the image needs to be downloaded from Docker Hub, the command can take a few minutes to complete, depending on available network bandwidth.