Skip to content

Commit 687a411

Browse files
authored
Merge pull request #50977 from pneedle-rh/osdocs-4223-update-rosa-cli-procedures
OSDOCS-4223 - Update the ROSA CLI procedures
2 parents 4cf1ce6 + 092cca6 commit 687a411

File tree

2 files changed

+96
-15
lines changed

2 files changed

+96
-15
lines changed

modules/rosa-getting-started-install-configure-cli-tools.adoc

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ $ aws sts get-caller-identity
4343
----
4444

4545
. Install and configure the latest ROSA CLI (`rosa`).
46-
.. Download the latest version of the `rosa` CLI for your operating system from the link:https://console.redhat.com/openshift/downloads[*Downloads*] page on the {cluster-manager-url}.
46+
.. 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}.
4747
.. Extract the `rosa` binary file from the downloaded archive. The following example extracts the binary from a Linux tar archive:
4848
+
4949
[source,terminal]
@@ -69,18 +69,22 @@ $ rosa version
6969
1.1.7
7070
----
7171
+
72-
.. Optional: Generate the command completion scripts for the `rosa` CLI. The following example generates the Bash completion scripts for a Linux machine:
72+
.. 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.
7373
+
74-
[source,terminal]
75-
----
76-
$ rosa completion bash | sudo tee /etc/bash_completion.d/rosa
77-
----
78-
.. Optional: Enable `rosa` command completion from your existing terminal. The following example enables Bash completion for `rosa` in an existing terminal on a Linux machine:
74+
`rosa` tab completion is available for different shell types. The following example enables persistent tab completion for Bash on a Linux host. The command generates a `rosa` tab completion configuration file for Bash and saves it to the `/etc/bash_completion.d/` directory:
7975
+
8076
[source,terminal]
8177
----
82-
$ source /etc/bash_completion.d/rosa
78+
# rosa completion bash > /etc/bash_completion.d/rosa
8379
----
80+
+
81+
You must open a new terminal to activate the configuration.
82+
+
83+
[NOTE]
84+
====
85+
For steps to configure `rosa` tab completion for different shell types, see the help menu by running `rosa completion --help`.
86+
====
87+
8488
.. Log in to your Red Hat account by using the `rosa` CLI:
8589
+
8690
[source,terminal]

modules/rosa-setting-up-cli.adoc

Lines changed: 84 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,97 @@
88
[id="rosa-setting-up-cli_{context}"]
99
= Setting up the rosa CLI
1010

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.
1312

1413
.Procedure
1514

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+
----
1763
+
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:
1967
+
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+
----
2172
+
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:
2374
+
2475
[source,terminal]
2576
----
26-
$ . <(rosa completion)
77+
$ rosa completion zsh > "${fpath[1]}/_rosa"
2778
----
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

Comments
 (0)