github.com/NVIDIA/aistore@v1.3.23-0.20240517131212-7df6609be51d/cmd/README.md (about)

     1  ## Table of Contents
     2  - [Executables](#executables)
     3  - [Installing from GitHub](#installing-from-github)
     4  - [Installing from source](#installing-from-source)
     5  
     6  ## Executables
     7  
     8  | Directory | Binary name | Description  | README |
     9  |---|---|---|---|
    10  | `cmd/cli` | `ais` | AIS command line management utility | [CLI](/docs/cli.md) |
    11  | `cmd/aisloader` | `aisloader` | AIS integrated load generator | [aisloader](/docs/aisloader.md) |
    12  | `cmd/aisnode` | `aisnode` | AIS node (gateway or target) binary | |
    13  | `cmd/aisnodeprofile` | `aisnode` | ... with profiling enabled | |
    14  | `cmd/authn` | `authn` | Standalone server providing token-based secure access to AIS clusters | [AuthN](/docs/authn.md) |
    15  | `cmd/xmeta` | `xmeta` | Low-level tool to format (or extract in plain text) assorted AIS metadata and control structures | [xmeta](/cmd/xmeta/README.md) |
    16  
    17  **NOTE**: installed CLI executable is named `ais`.
    18  
    19  ## Installing from GitHub
    20  
    21  Generally, AIStore (cluster) requires at least some sort of [deployment](/deploy#contents) process or sequence.
    22  
    23  Standalone binaries, on the other hand, can be [built](Makefile) from source or installed directly from the latest or previous GitHub releases.
    24  
    25  **NOTE:** binary installation is supported only for the `linux-amd64` platform.
    26  
    27  In particular:
    28  
    29  ```console
    30  $ ./scripts/install_from_binaries.sh --help
    31  
    32  NAME:
    33    install_from_binaries.sh - install 'ais' (CLI) and 'aisloader' from release binaries
    34  
    35  USAGE:
    36    ./install_from_binaries.sh [options...]
    37  
    38  OPTIONS:
    39    --tmpdir <dir>        work directory, e.g. /root/tmp
    40    --dstdir <dir>        installation destination
    41    --release             e.g., v1.3.15, v1.3.16, latest (default: latest)
    42    --completions         install and enable _only_ CLI autocompletions (ie., skip installing binaries)
    43  ```
    44  
    45  **NOTE:** For CLI, the script will also enable auto-completions. CLI can be used without (bash, zsh) auto-completions but, generally, using using auto-completions is strongly recommended.
    46  
    47  ### Example: download 'ais' and 'aisloader' binaries from the latest release
    48  
    49  ```console
    50  $ ./install_from_binaries.sh --dstdir /tmp/qqq
    51  ```
    52  
    53  Upon execution, the two specific `linux-amd64` binaries, ready for usage, will be placed in `/tmp/qqq` destination.
    54  
    55  ## Installing from source
    56  
    57  ### CLI
    58  
    59  The preferable way is to use [Makefile](/Makefile):
    60  
    61  ```console
    62  $ make cli
    63  ```
    64  
    65  builds AIS CLI from the local aistore repository and installs it in your $GOPATH/bin.
    66  
    67  **NOTE**: installed CLI binary is named `ais`.
    68  
    69  Alternatively, you could also use `go install`:
    70  
    71  ```console
    72  $ go install github.com/NVIDIA/aistore/cmd/cli@latest` && mv $GOPATH/bin/cli $GOPATH/bin/ais
    73  ```
    74  
    75  To install CLI auto-completions, you could also, and separately, use `cmd/cli/install_autocompletions.sh`
    76  
    77  ### aisloader
    78  
    79  [Makefile](/Makefile) way:
    80  
    81  ```console
    82  $ make aisloader
    83  ```
    84  
    85  But again, you could also use `go install`:
    86  
    87  ```console
    88  $ go install github.com/NVIDIA/aistore/cmd/aisloader@latest
    89  ```
    90  
    91  ## xmeta
    92  
    93  `xmeta` is a low-level utility to format (or extract and show) assorted AIS control structures - see [usage](/cmd/xmeta/README.md).
    94  
    95  For command line options and usage examples, simply run `xmeta` with no arguments:
    96  
    97  ```console
    98  $ xmeta
    99  Usage of xmeta:
   100    -f string ...
   101  ...
   102  Examples:
   103          # Smap:
   104          xmeta -x -in=~/.ais0/.ais.smap      - extract Smap to STDOUT
   105  ...
   106  ```
   107  
   108  To install, run:
   109  
   110  ```console
   111  $ make xmeta
   112  ```
   113  
   114  OR, same:
   115  
   116  ```console
   117  $ cd cmd/xmeta
   118  $ go install
   119  ```