X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d030c2102a07c887b4736c88cb4747017eb47979..7f2449727f36a2687f22be1b3587674a2eb8c7ed:/doc/admin/cheat_sheet.textile

diff --git a/doc/admin/cheat_sheet.textile b/doc/admin/cheat_sheet.textile
index 839fff8293..78841f4349 100644
--- a/doc/admin/cheat_sheet.textile
+++ b/doc/admin/cheat_sheet.textile
@@ -10,24 +10,23 @@ h1. Cheat Sheet
 h3. CLI setup
 
 <pre>
-arv_base=https://9ujm1.arvados.org/arvados/v1
-arv_token=1234567890qwertyuiopasdfghjklzxcvbnm1234567890zzzz
-# arv_curlopts=-k  # only if you want insecure http
-arv_curl="curl -H 'Authorization: OAuth2 $arv_token' $arv_curlopts"
+ARVADOS_API_HOST={{ site.arvados_api_host }}
+ARVADOS_API_TOKEN=1234567890qwertyuiopasdfghjklzxcvbnm1234567890zzzz
 </pre>
 
 h3. Create VM
 
 <pre>
-vm_hostname=xxxxxxxchangeme
-
-eval $arv_curl -X POST --data-urlencode virtual_machine@/dev/stdin <<EOF $arv_base/virtual_machines
-{
-"hostname":"$vm_hostname"
-}
-EOF
+arv virtual_machine create --virtual-machine '{"hostname":"xxxxxxxchangeme.example.com"}'
 </pre>
 
+h3. Activate user
+
+<pre>
+user_uuid=xxxxxxxchangeme
+
+arv user update --uuid "$user_uuid" --user '{"is_active":true}'
+</pre>
 
 h3. User &rarr; VM
 
@@ -38,11 +37,11 @@ user_uuid=xxxxxxxchangeme
 vm_uuid=xxxxxxxchangeme
 target_username=xxxxxxxchangeme
 
-eval $arv_curl -X POST --data-urlencode link@/dev/stdin <<EOF $arv_base/links
+read -rd $'\000' newlink <<EOF; arv link create --link "$newlink"
 {
 "tail_kind":"arvados#user",
 "tail_uuid":"$user_uuid",
-"head_kind":"arvados#virtual_machine",
+"head_kind":"arvados#virtualMachine",
 "head_uuid":"$vm_uuid",
 "link_class":"permission",
 "name":"can_login",
@@ -60,7 +59,7 @@ user_uuid=xxxxxxxchangeme
 repo_uuid=xxxxxxxchangeme
 repo_username=xxxxxxxchangeme
 
-eval $arv_curl -X POST --data-urlencode link@/dev/stdin <<EOF $arv_base/links
+read -rd $'\000' newlink <<EOF; arv link create --link "$newlink"
 {
 "tail_kind":"arvados#user",
 "tail_uuid":"$user_uuid",
