Merge branch '18947-keep-balance'
[arvados.git] / doc / admin / user-activity.html.textile.liquid
index 08d4877720767d06afdba2ffb7f4a0697fa60853..01715ff6e3484877598834e985fdb1576fc0c505 100644 (file)
@@ -17,21 +17,27 @@ h2. Option 1: Install from a distribution package
 
 This installation method is recommended to make the CLI tools available system-wide. It can coexist with the installation method described in option 2, below.
 
-First, configure the "Arvados package repositories":../../install/packages.html
+First, configure the "Arvados package repositories":{{ site.baseurl }}/install/packages.html
 
 {% assign arvados_component = 'python3-arvados-user-activity' %}
 
 {% include 'install_packages' %}
 
-h2. Option 2: Install with pip
+h2. Option 2: Install from source
 
-Run @pip install arvados-user-activity'@ in an appropriate installation environment, such as a @virtualenv@.
+Step 1: Check out the arvados source code
 
-Note: depends on the "Arvados Python SDK":../sdk/python/sdk-python.html and its associated build prerequisites (e.g. @pycurl@).
+Step 2: Change directory to @arvados/tools/user-activity@
+
+Step 3: Run @pip install .@ in an appropriate installation environment, such as a @virtualenv@.
+
+Note: depends on the "Arvados Python SDK":{{ site.baseurl }}/sdk/python/sdk-python.html and its associated build prerequisites (e.g. @pycurl@).
 
 h2. Usage
 
-Set your Arvados environment, then run the tool giving it the number of days to report for.  It will query the logs and generate a summary report on standard output.
+Set ARVADOS_API_HOST to the api server of the cluster for which the report should be generated. ARVADOS_API_TOKEN needs to be a "v2 token":../admin/scoped-tokens.html for an admin user, or a superuser token (e.g. generated with @script/create_superuser_token.rb@). Please note that in a login cluster federation, the token needs to be issued by the login cluster, but the report should be generated against the API server of the cluster for which it is desired. In other words, ARVADOS_API_HOST would point at the satellite cluster for which the report is desired, but ARVADOS_API_TOKEN would be a token that belongs to a login cluster user.
+
+Run the tool with the option @--days@ giving the number of days to report on.  It will request activity logs from the API and generate a summary report on standard output.
 
 Example run:
 
@@ -79,7 +85,7 @@ Peter Amstutz <peter.amstutz@curii.com> (https://workbench.pirca.arvadosapi.com/
   2020-11-23 14:53-05:00 to 2020-11-24 11:58-05:00 (21:05) Account activity
   2020-11-24 15:06-05:00 to 2020-11-24 16:38-05:00 (01:32) Account activity
 
-Marc Rubenfield <mrubenfield@gmail.com> (https://workbench.pirca.arvadosapi.com/users/jutro-tpzed-v9s9q97pgydh1yf)
+Marc Rubenfield <mrubenfield@curii.com> (https://workbench.pirca.arvadosapi.com/users/jutro-tpzed-v9s9q97pgydh1yf)
   2020-11-11 12:27-05:00 Untagged pirca-4zz18-xmq257bsla4kdco
   2020-11-11 12:27-05:00 Deleted collection "Output of main" (pirca-4zz18-xmq257bsla4kdco)