Removed h1. titles from pages because it is now part of the page template.
[arvados.git] / doc / admin / cheat_sheet.html.textile.liquid
1 ---
2 layout: default
3 navsection: admin
4 title: Cheat Sheet
5 ...
6
7
8
9 h3. CLI setup
10
11 <pre>
12 ARVADOS_API_HOST={{ site.arvados_api_host }}
13 ARVADOS_API_TOKEN=1234567890qwertyuiopasdfghjklzxcvbnm1234567890zzzz
14 </pre>
15
16 h3. Create VM
17
18 <pre>
19 arv virtual_machine create --virtual-machine '{"hostname":"xxxxxxxchangeme.example.com"}'
20 </pre>
21
22 h3. Activate user
23
24 <pre>
25 user_uuid=xxxxxxxchangeme
26
27 arv user update --uuid "$user_uuid" --user '{"is_active":true}'
28 </pre>
29
30 h3. User &rarr; VM
31
32 Give @$user_uuid@ permission to log in to @$vm_uuid@ as @$target_username@
33
34 <pre>
35 user_uuid=xxxxxxxchangeme
36 vm_uuid=xxxxxxxchangeme
37 target_username=xxxxxxxchangeme
38
39 read -rd $'\000' newlink <<EOF; arv link create --link "$newlink"
40 {
41 "tail_kind":"arvados#user",
42 "tail_uuid":"$user_uuid",
43 "head_kind":"arvados#virtualMachine",
44 "head_uuid":"$vm_uuid",
45 "link_class":"permission",
46 "name":"can_login",
47 "properties":{"username":"$target_username"}
48 }
49 EOF
50 </pre>
51
52 h3. User &rarr; repo
53
54 Give @$user_uuid@ permission to commit to @$repo_uuid@ as @$repo_username@
55
56 <pre>
57 user_uuid=xxxxxxxchangeme
58 repo_uuid=xxxxxxxchangeme
59 repo_username=xxxxxxxchangeme
60
61 read -rd $'\000' newlink <<EOF; arv link create --link "$newlink"
62 {
63 "tail_kind":"arvados#user",
64 "tail_uuid":"$user_uuid",
65 "head_kind":"arvados#repository",
66 "head_uuid":"$repo_uuid",
67 "link_class":"permission",
68 "name":"can_write",
69 "properties":{"username":"$repo_username"}
70 }
71 EOF
72 </pre>