|
1 |
| -# Install the Run:ai Administrator Command-line Interface |
| 1 | +# Administrator CLI |
2 | 2 |
|
3 |
| -The Run:ai Administrator Command-line Interface (Administrator CLI) allows performing administrative tasks on the Run:ai Cluster. |
| 3 | +The Run:ai Administrator (`runai-adm`) is a lightweight tool designed to support infrastructure administrators by simplifying two key tasks: |
4 | 4 |
|
5 |
| -The instructions below will guide you through the process of installing the Administrator CLI. |
| 5 | +* [Collecting logs](../troubleshooting/logs-collection.md) for troubleshooting and sharing with Run:ai support. |
| 6 | +* Configuring [node roles](../config/node-roles.md) in the cluster for optimal performance and reliability. |
6 | 7 |
|
7 |
| -!!! Tip |
8 |
| - Most of the functionality of the Run:ai Administrator CLI has been removed. It now serves the limited purpose of collecting logs and setting node roles. |
| 8 | +This article outlines the installation and usage of the Run:ai Administrator CLI to help you get started quickly. |
9 | 9 |
|
10 | 10 | ## Prerequisites
|
11 | 11 |
|
12 |
| -* Run:ai Administrator CLI runs on Mac and Linux. |
13 |
| -* Kubectl (Kubernetes command-line interface) is installed and configured to access your cluster. Please refer to [https://kubernetes.io/docs/tasks/tools/install-kubectl/](https://kubernetes.io/docs/tasks/tools/install-kubectl/){target=_blank} |
14 |
| -* A Kubernetes configuration file obtained from a computer previously connected to the Kubernetes cluster |
| 12 | +Before installing the CLI, review the following: |
15 | 13 |
|
| 14 | +* __Operating system:__ The CLI is supported on Mac and Linux. |
| 15 | +* __Kubectl:__ The Kubernetes command-line interface must be installed and configured to access your cluster. Follow the [official guide](https://kubernetes.io/docs/tasks/tools/){target=_blank}. |
| 16 | +* __Cluster administrative permissions:__ The CLI requires a Kubernetes profile with administrative privileges. |
16 | 17 |
|
17 |
| -## Kubernetes Configuration |
18 | 18 |
|
19 |
| -The Run:ai Administrator CLI requires a Kubernetes profile with cluster administrative rights. |
| 19 | +## Installation |
20 | 20 |
|
| 21 | +To install the Run:ai Administrator CLI, ensure that the CLI version matches the version of your Run:ai cluster. You can either install the latest version or a specific version from the [list](https://runai.jfrog.io/ui/native/cli/runai-admin-cli/){target=_blank}. |
21 | 22 |
|
22 |
| -## Installation |
| 23 | +### Installing the latest version |
23 | 24 |
|
24 |
| -Download the Run:ai Administrator Command-line Interface by running: |
| 25 | +Use the following commands to download and install the latest version of the CLI: |
25 | 26 |
|
26 | 27 | === "Mac"
|
27 | 28 | ``` bash
|
28 |
| - wget --content-disposition https://app.run.ai/v1/k8s/admin-cli/darwin # (1) |
29 |
| - chmod +x runai-adm |
| 29 | + wget --content-disposition https://app.run.ai/v1/k8s/admin-cli/darwin # (1) |
| 30 | + chmod +x runai-adm |
30 | 31 | sudo mv runai-adm /usr/local/bin/runai-adm
|
31 | 32 | ```
|
32 | 33 |
|
33 |
| - 1. In self-hosted environment, use the control-plane URL instead of `app.run.ai` |
| 34 | + 1. In self-hosted environment, use the control-plane URL instead of `app.run.ai` |
34 | 35 |
|
35 | 36 | === "Linux"
|
36 | 37 | ``` bash
|
37 |
| - wget --content-disposition https://app.run.ai/v1/k8s/admin-cli/linux # (1) |
38 |
| - chmod +x runai-adm |
| 38 | + wget --content-disposition https://app.run.ai/v1/k8s/admin-cli/linux # (1) |
| 39 | + chmod +x runai-adm |
39 | 40 | sudo mv runai-adm /usr/local/bin/runai-adm
|
40 | 41 | ```
|
41 | 42 |
|
42 | 43 | 1. In self-hosted environment, use the control-plane URL instead of `app.run.ai`
|
43 | 44 |
|
44 |
| -To verify the installation run: |
45 | 45 |
|
46 |
| -``` |
| 46 | + |
| 47 | +### Installing a specific version |
| 48 | + |
| 49 | +To install a specific version of the Administrator CLI that matches your Run:ai cluster version, append the version number to the download URL. Refer to the list of available versions linked above for the correct version number. |
| 50 | + |
| 51 | +=== "Mac" |
| 52 | + ``` bash |
| 53 | + wget --content-disposition https://app.run.ai/v1/k8s/admin-cli/<version>/darwin # Replace <version> with the desired version in the format vX.X.X (e.g., v2.19.5) |
| 54 | + chmod +x runai-adm |
| 55 | + sudo mv runai-adm /usr/local/bin/runai-adm |
| 56 | + ``` |
| 57 | + |
| 58 | +=== "Linux" |
| 59 | + ``` bash |
| 60 | + wget --content-disposition https://app.run.ai/v1/k8s/admin-cli/<version>/linux # Replace <version> with the desired version in the format vX.X.X (e.g., v2.19.5) |
| 61 | + chmod +x runai-adm |
| 62 | + sudo mv runai-adm /usr/local/bin/runai-adm |
| 63 | + ``` |
| 64 | + |
| 65 | +### Verifying installation |
| 66 | + |
| 67 | +Verify your installation completed successfully by running the following command: |
| 68 | + |
| 69 | +``` bash |
47 | 70 | runai-adm version
|
48 | 71 | ```
|
49 | 72 |
|
50 |
| -### Download a specific version |
| 73 | +## Reference |
51 | 74 |
|
52 |
| -To download a specific version of `runai-adm` add the version number to URL. For example: |
| 75 | +### Node roles |
53 | 76 |
|
| 77 | +To set or remove node rules using the `runai-adm` tool, run the following: |
| 78 | + |
| 79 | +``` bash |
| 80 | +runai-adm set node-role [--runai-system-worker | --gpu-worker | --cpu-worker] <node-name> |
54 | 81 | ```
|
55 |
| -wget --content-disposition https://app.run.ai/v1/k8s/admin-cli/v2.7.22/darwin |
| 82 | + |
| 83 | +``` bash |
| 84 | +runai-adm remove node-role [--runai-system-worker | --gpu-worker | --cpu-worker] <node-name> |
56 | 85 | ```
|
57 |
| -## Updating the Run:ai Administrator CLI |
58 | 86 |
|
59 |
| -To update the CLI to the latest version perform the same install process again. The command `runai-adm update` is no longer supported. |
| 87 | +!!! Note |
| 88 | + Use the `--all` flag to set or remove a role to all nodes. |
| 89 | + |
| 90 | +### Collect logs |
| 91 | + |
| 92 | +To collect logs using the `runai-adm` tool: |
| 93 | + |
| 94 | +1. Run the following command: |
| 95 | + |
| 96 | + ``` bash |
| 97 | + runai-adm collect-logs |
| 98 | + ``` |
| 99 | + |
| 100 | +2. Locate the generated compressed log file. |
| 101 | + |
| 102 | + |
0 commit comments