1
0
mirror of https://github.com/openshift/openshift-docs.git synced 2026-02-05 21:46:22 +01:00
Files
openshift-docs/modules/hcp-cli-terminal.adoc
2025-10-07 12:26:32 -04:00

68 lines
1.9 KiB
Plaintext

// Module included in the following assemblies:
// * hosted-control-planes/hcp-prepare/hcp-cli.adoc
:_mod-docs-content-type: PROCEDURE
[id="hcp-cli-terminal_{context}"]
= Installing the {hcp} command-line interface from the terminal
You can install the {hcp} command-line interface (CLI), `hcp`, from the terminal.
.Prerequisites
* On an {product-title} cluster, you have installed {mce} 2.5 or later. The {mce-short} is automatically installed when you install Red{nbsp}Hat Advanced Cluster Management. You can also install {mce-short} without Red{nbsp}Hat Advanced Management as an Operator from the {product-title} software catalog.
.Procedure
. Get the URL to download the `hcp` binary by running the following command:
+
[source,terminal]
----
$ oc get ConsoleCLIDownload hcp-cli-download -o json | jq -r ".spec"
----
. Download the `hcp` binary by running the following command:
+
[source,terminal]
----
$ wget <hcp_cli_download_url> <1>
----
+
<1> Replace `hcp_cli_download_url` with the URL that you obtained from the previous step.
. Unpack the downloaded archive by running the following command:
+
[source,terminal]
----
$ tar xvzf hcp.tar.gz
----
. Make the `hcp` binary file executable by running the following command:
+
[source,terminal]
----
$ chmod +x hcp
----
. Move the `hcp` binary file to a directory in your path by running the following command:
+
[source,terminal]
----
$ sudo mv hcp /usr/local/bin/.
----
[NOTE]
====
If you download the CLI on a Mac computer, you might see a warning about the `hcp` binary file. You need to adjust your security settings to allow the binary file to be run.
====
.Verification
* Verify that you see the list of available parameters by running the following command:
+
[source,terminal]
----
$ hcp create cluster <platform> --help <1>
----
+
<1> You can use the `hcp create cluster` command to create and manage hosted clusters. The supported platforms are `aws`, `agent`, and `kubevirt`.