|
8 | 8 | [id="rosa-setting-up-cli_{context}"]
|
9 | 9 | = Setting up the rosa CLI
|
10 | 10 |
|
11 |
| - |
12 |
| -To set up the `rosa` CLI, download the latest release, then configure and initialize `rosa`: |
| 11 | +Use the following steps to install and configure the {product-title} (ROSA) CLI (`rosa`) on your installation host. |
13 | 12 |
|
14 | 13 | .Procedure
|
15 | 14 |
|
16 |
| -. Download the latest release of the `rosa` CLI for your operating system from the *Download* page of link:https://console.redhat.com/openshift/downloads?quickstart=getting-started#tool-rosa[{product-title}]. |
| 15 | +. Download the latest version of the `rosa` CLI for your operating system from the link:https://console.redhat.com/openshift/downloads[*Downloads*] page on {cluster-manager}. |
| 16 | + |
| 17 | +. Extract the `rosa` binary file from the downloaded archive. The following example extracts the binary from a Linux tar archive: |
| 18 | ++ |
| 19 | +[source,terminal] |
| 20 | +---- |
| 21 | +$ tar xvf rosa-linux.tar.gz |
| 22 | +---- |
| 23 | + |
| 24 | +. Add `rosa` to your path. In the following example, the `/usr/local/bin` directory is included in the path of the user: |
| 25 | ++ |
| 26 | +[source,terminal] |
| 27 | +---- |
| 28 | +$ sudo mv rosa /usr/local/bin/rosa |
| 29 | +---- |
| 30 | + |
| 31 | +. Verify if the `rosa` CLI tool is installed correctly by querying the `rosa` version: |
| 32 | ++ |
| 33 | +[source,terminal] |
| 34 | +---- |
| 35 | +$ rosa version |
| 36 | +---- |
| 37 | ++ |
| 38 | +.Example output |
| 39 | +[source,terminal] |
| 40 | +---- |
| 41 | +1.2.6 |
| 42 | +---- |
| 43 | + |
| 44 | +. Optional: Enable tab completion for the `rosa` CLI. With tab completion enabled, you can press the `Tab` key twice to automatically complete subcommands and receive command suggestions: |
| 45 | ++ |
| 46 | +-- |
| 47 | +** To enable persistent tab completion for Bash on a Linux host: |
| 48 | +.. Generate a `rosa` tab completion configuration file for Bash and save it to your `/etc/bash_completion.d/` directory: |
| 49 | ++ |
| 50 | +[source,terminal] |
| 51 | +---- |
| 52 | +# rosa completion bash > /etc/bash_completion.d/rosa |
| 53 | +---- |
| 54 | ++ |
| 55 | +.. Open a new terminal to activate the configuration. |
| 56 | +** To enable persistent tab completion for Bash on a macOS host: |
| 57 | +.. Generate a `rosa` tab completion configuration file for Bash and save it to your `/usr/local/etc/bash_completion.d/` directory: |
| 58 | ++ |
| 59 | +[source,terminal] |
| 60 | +---- |
| 61 | +$ rosa completion bash > /usr/local/etc/bash_completion.d/rosa |
| 62 | +---- |
17 | 63 | +
|
18 |
| -. It is recommended that after you download the release, you rename the executable file that you downloaded to `rosa`, and then add `rosa` to your path. |
| 64 | +.. Open a new terminal to activate the configuration. |
| 65 | +** To enable persistent tab completion for Zsh: |
| 66 | +.. If tab completion is not enabled for your Zsh environment, enable it by running the following command: |
19 | 67 | +
|
20 |
| -. Optional: After downloading `rosa`, enable Bash completion for `rosa`. Bash completion helps to automatically complete commands and suggest options when you press `Tab`. The command generates a Bash completion file for `rosa` and sources it to your current shell session. |
| 68 | +[source,terminal] |
| 69 | +---- |
| 70 | +$ echo "autoload -U compinit; compinit" >> ~/.zshrc |
| 71 | +---- |
21 | 72 | +
|
22 |
| -To configure your Bash shell to load `rosa` completions for each session, add the following command to your `Bashrc` file (`~/.Bashrc` or `~/.profile`). |
| 73 | +.. Generate a `rosa` tab completion configuration file for Zsh and save it to the first directory in your functions path: |
23 | 74 | +
|
24 | 75 | [source,terminal]
|
25 | 76 | ----
|
26 |
| -$ . <(rosa completion) |
| 77 | +$ rosa completion zsh > "${fpath[1]}/_rosa" |
27 | 78 | ----
|
| 79 | ++ |
| 80 | +.. Open a new terminal to activate the configuration. |
| 81 | +** To enable persistent tab completion for fish: |
| 82 | +.. Generate a `rosa` tab completion configuration file for fish and save it to your `~/.config/fish/completions/` directory: |
| 83 | ++ |
| 84 | +[source,terminal] |
| 85 | +---- |
| 86 | +$ rosa completion fish > ~/.config/fish/completions/rosa.fish |
| 87 | +---- |
| 88 | ++ |
| 89 | +.. Open a new terminal to activate the configuration. |
| 90 | +** To enable persistent tab completion for PowerShell: |
| 91 | +.. Generate a `rosa` tab completion configuration file for PowerShell and save it to a file named `rosa.ps1`: |
| 92 | ++ |
| 93 | +[source,terminal] |
| 94 | +---- |
| 95 | +PS> rosa completion powershell | Out-String | Invoke-Expression |
| 96 | +---- |
| 97 | ++ |
| 98 | +.. Source the `rosa.ps1` file from your PowerShell profile. |
| 99 | +-- |
| 100 | ++ |
| 101 | +[NOTE] |
| 102 | +==== |
| 103 | +For more information about configuring `rosa` tab completion, see the help menu by running `rosa completion --help`. |
| 104 | +==== |
0 commit comments