mirror of
https://github.com/openshift/openshift-docs.git
synced 2026-02-05 12:46:18 +01:00
106 lines
3.1 KiB
Plaintext
106 lines
3.1 KiB
Plaintext
|
|
// Module included in the following assemblies:
|
|
//
|
|
// * rosa_cli/rosa-get-started-cli.adoc
|
|
|
|
|
|
:_mod-docs-content-type: PROCEDURE
|
|
[id="rosa-setting-up-cli_{context}"]
|
|
= Setting up the ROSA CLI
|
|
|
|
Use the following steps to install and configure the ROSA CLI (`rosa`) on your installation host.
|
|
|
|
.Procedure
|
|
|
|
. Download the latest version of the ROSA CLI (`rosa`) for your operating system from the link:https://console.redhat.com/openshift/downloads[*Downloads*] page on {cluster-manager}.
|
|
|
|
. Extract the `rosa` binary file from the downloaded archive. The following example extracts the binary from a Linux tar archive:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ tar xvf rosa-linux.tar.gz
|
|
----
|
|
|
|
. Add `rosa` to your path. In the following example, the `/usr/local/bin` directory is included in the path of the user:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ sudo mv rosa /usr/local/bin/rosa
|
|
----
|
|
|
|
. Verify if the ROSA CLI is installed correctly by querying the `rosa` version:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ rosa version
|
|
----
|
|
+
|
|
.Example output
|
|
[source,terminal]
|
|
----
|
|
1.2.15
|
|
Your ROSA CLI is up to date.
|
|
----
|
|
|
|
. 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:
|
|
+
|
|
--
|
|
** To enable persistent tab completion for Bash on a Linux host:
|
|
.. Generate a `rosa` tab completion configuration file for Bash and save it to your `/etc/bash_completion.d/` directory:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
# rosa completion bash > /etc/bash_completion.d/rosa
|
|
----
|
|
+
|
|
.. Open a new terminal to activate the configuration.
|
|
** To enable persistent tab completion for Bash on a macOS host:
|
|
.. Generate a `rosa` tab completion configuration file for Bash and save it to your `/usr/local/etc/bash_completion.d/` directory:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ rosa completion bash > /usr/local/etc/bash_completion.d/rosa
|
|
----
|
|
+
|
|
.. Open a new terminal to activate the configuration.
|
|
** To enable persistent tab completion for Zsh:
|
|
.. If tab completion is not enabled for your Zsh environment, enable it by running the following command:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ echo "autoload -U compinit; compinit" >> ~/.zshrc
|
|
----
|
|
+
|
|
.. Generate a `rosa` tab completion configuration file for Zsh and save it to the first directory in your functions path:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ rosa completion zsh > "${fpath[1]}/_rosa"
|
|
----
|
|
+
|
|
.. Open a new terminal to activate the configuration.
|
|
** To enable persistent tab completion for fish:
|
|
.. Generate a `rosa` tab completion configuration file for fish and save it to your `~/.config/fish/completions/` directory:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
$ rosa completion fish > ~/.config/fish/completions/rosa.fish
|
|
----
|
|
+
|
|
.. Open a new terminal to activate the configuration.
|
|
** To enable persistent tab completion for PowerShell:
|
|
.. Generate a `rosa` tab completion configuration file for PowerShell and save it to a file named `rosa.ps1`:
|
|
+
|
|
[source,terminal]
|
|
----
|
|
PS> rosa completion powershell | Out-String | Invoke-Expression
|
|
----
|
|
+
|
|
.. Source the `rosa.ps1` file from your PowerShell profile.
|
|
--
|
|
+
|
|
[NOTE]
|
|
====
|
|
For more information about configuring `rosa` tab completion, see the help menu by running the `rosa completion --help` command.
|
|
====
|