Skip to content

Latest commit

 

History

History
68 lines (56 loc) · 1.92 KB

File metadata and controls

68 lines (56 loc) · 1.92 KB

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 Hat Advanced Cluster Management. You can also install {mce-short} without Red Hat Advanced Management as an Operator from the {product-title} software catalog.

Procedure
  1. Get the URL to download the hcp binary by running the following command:

    $ oc get ConsoleCLIDownload hcp-cli-download -o json | jq -r ".spec"
  2. Download the hcp binary by running the following command:

    $ wget <hcp_cli_download_url>

    Replace hcp_cli_download_url with the URL that you obtained from the previous step.

  3. Unpack the downloaded archive by running the following command:

    $ tar xvzf hcp.tar.gz
  4. Make the hcp binary file executable by running the following command:

    $ chmod +x hcp
  5. Move the hcp binary file to a directory in your path by running the following command:

    $ 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:

    $ hcp create cluster <platform> --help

    You can use the hcp create cluster command to create and manage hosted clusters. The supported platforms are aws, agent, and kubevirt.