21388: Fill out arv-user-activity README
[arvados.git] / tools / user-activity / README.rst
1 .. Copyright (C) The Arvados Authors. All rights reserved.
2 ..
3 .. SPDX-License-Identifier: AGPL-3.0
4
5 =================
6 arv-user-activity
7 =================
8
9 Overview
10 --------
11
12 This package provides the ``arv-user-activity`` tool to provide a high-level report of user activity on Arvados_ clusters.
13
14 .. _Arvados: https://arvados.org/
15
16 Installation
17 ------------
18
19 Installing under your user account
20 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
21
22 This method lets you install the package without root access.  However,
23 other users on the same system will need to reconfigure their shell in order
24 to be able to use it. Run the following to install the package in an
25 environment at ``~/arvclients``::
26
27   python3 -m venv ~/arvclients
28   ~/arvclients/bin/pip install arvados-user-activity
29
30 Command line tools will be installed under ``~/arvclients/bin``. You can
31 test one by running::
32
33   ~/arvclients/bin/arv-user-activity --version
34
35 You can run these tools by specifying the full path every time, or you can
36 add the directory to your shell's search path by running::
37
38   export PATH="$PATH:$HOME/arvclients/bin"
39
40 You can make this search path change permanent by adding this command to
41 your shell's configuration, for example ``~/.bashrc`` if you're using bash.
42 You can test the change by running::
43
44   arv-user-activity --version
45
46 Installing on Debian and Ubuntu systems
47 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48
49 Arvados publishes packages for Debian 11 "bullseye," Debian 12 "bookworm," Ubuntu 20.04 "focal," and Ubuntu 22.04 "jammy." You can install the Python SDK package on any of these distributions by running the following commands::
50
51   sudo install -d /etc/apt/keyrings
52   sudo curl -fsSL -o /etc/apt/keyrings/arvados.asc https://apt.arvados.org/pubkey.gpg
53   sudo tee /etc/apt/sources.list.d/arvados.sources >/dev/null <<EOF
54   Types: deb
55   URIs: https://apt.arvados.org/$(lsb_release -cs)
56   Suites: $(lsb_release -cs)
57   Components: main
58   Signed-by: /etc/apt/keyrings/arvados.asc
59   EOF
60   sudo apt update
61   sudo apt install python3-arvados-user-activity
62
63 Installing on AlmaLinux, CentOS, RHEL, and Rocky Linux
64 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65
66 Arvados publishes packages for RHEL 8 and distributions based on it. Note that these packages depend on, and will automatically enable, the Python 3.9 module. You can install the Python SDK package on any of these distributions by running the following commands::
67
68   sudo tee /etc/yum.repos.d/arvados.repo >/dev/null <<EOF
69   [arvados]
70   name=Arvados
71   baseurl=http://rpm.arvados.org/CentOS/\$releasever/os/\$basearch/
72   gpgcheck=1
73   gpgkey=http://rpm.arvados.org/CentOS/RPM-GPG-KEY-arvados
74   EOF
75   sudo dnf install python3-arvados-user-activity
76
77 Configuration
78 -------------
79
80 This client software needs two pieces of information to connect to
81 Arvados: the DNS name of the API server, and an API authorization
82 token. `The Arvados user
83 documentation
84 <http://doc.arvados.org/user/reference/api-tokens.html>`_ describes
85 how to find this information in the Arvados Workbench, and install it
86 on your system.
87
88 Testing and Development
89 -----------------------
90
91 This package is one part of the Arvados source package, and it has
92 integration tests to check interoperability with other Arvados
93 components.  Our `hacking guide
94 <https://dev.arvados.org/projects/arvados/wiki/Hacking_Python_SDK>`_
95 describes how to set up a development environment and run tests.