Skip to content

Commit c972bc1

Browse files
committed
OSDOCS#11002: Migrating installing the HCP CLI
1 parent 636a2f1 commit c972bc1

File tree

4 files changed

+156
-2
lines changed

4 files changed

+156
-2
lines changed
Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
:_mod-docs-content-type: ASSEMBLY
22
[id="hcp-cli"]
33
include::_attributes/common-attributes.adoc[]
4-
= Installing the {hcp} command line interface
4+
= Installing the {hcp} command-line interface
55
:context: hcp-cli
66

7-
toc::[]
7+
toc::[]
8+
9+
The {hcp} command-line interface, `hcp`, is a tool that you can use to get started with {hcp}. For Day 2 operations, such as management and configuration, use GitOps or your own automation tool.
10+
11+
include::modules/hcp-cli-terminal.adoc[leveloffset=+1]
12+
include::modules/hcp-cli-console.adoc[leveloffset=+1]
13+
include::modules/hcp-cli-gateway.adoc[leveloffset=+1]

modules/hcp-cli-console.adoc

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
// Module included in the following assemblies:
2+
// * hosted-control-planes/hcp-prepare/hcp-cli.adoc
3+
4+
:_mod-docs-content-type: PROCEDURE
5+
[id="hcp-cli-console_{context}"]
6+
= Installing the {hcp} command-line interface by using the web console
7+
8+
You can install the {hcp} command-line interface (CLI), `hcp`, by using the {product-title} web console.
9+
10+
.Procedure
11+
12+
. From the {product-title} web console, click the *Help icon* -> *Command Line Tools*.
13+
14+
. Click *Download hcp CLI* for your platform.
15+
16+
. Unpack the downloaded archive by running the following command:
17+
+
18+
[source,terminal]
19+
----
20+
$ tar xvzf hcp.tar.gz
21+
----
22+
23+
. Run the following command to make the binary file executable:
24+
+
25+
[source,terminal]
26+
----
27+
$ chmod +x hcp
28+
----
29+
30+
. Run the following command to move the binary file to a directory in your path:
31+
+
32+
[source,terminal]
33+
----
34+
$ sudo mv hcp /usr/local/bin/.
35+
----
36+
37+
.Verification
38+
39+
* Verify that you see the list of available parameters by running the following command:
40+
+
41+
[source,terminal]
42+
----
43+
$ hcp create cluster <platform> --help <1>
44+
----
45+
+
46+
<1> You can use the `hcp create cluster` command to create and manage hosted clusters. The supported platforms are `aws`, `agent`, and `kubevirt`.

modules/hcp-cli-gateway.adoc

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// Module included in the following assemblies:
2+
// * hosted-control-planes/hcp-prepare/hcp-cli.adoc
3+
4+
:_mod-docs-content-type: PROCEDURE
5+
[id="hcp-cli-gateway_{context}"]
6+
= Installing the {hcp} command-line interface by using the content gateway
7+
8+
You can install the {hcp} command-line interface (CLI), `hcp`, by using the content gateway.
9+
10+
.Procedure
11+
12+
. Navigate to the link:https://developers.redhat.com/content-gateway/rest/browse/pub/mce/clients/hcp-cli/[content gateway] and download the `hcp` binary.
13+
14+
. Unpack the downloaded archive by running the following command:
15+
+
16+
[source,terminal]
17+
----
18+
$ tar xvzf hcp.tar.gz
19+
----
20+
21+
. Make the `hcp` binary file executable by running the following command:
22+
+
23+
[source,terminal]
24+
----
25+
$ chmod +x hcp
26+
----
27+
28+
. Move the `hcp` binary file to a directory in your path by running the following command:
29+
+
30+
[source,terminal]
31+
----
32+
$ sudo mv hcp /usr/local/bin/.
33+
----
34+
35+
.Verification
36+
37+
* Verify that you see the list of available parameters by running the following command:
38+
+
39+
[source,terminal]
40+
----
41+
$ hcp create cluster <platform> --help <1>
42+
----
43+
+
44+
<1> You can use the `hcp create cluster` command to create and manage hosted clusters. The supported platforms are `aws`, `agent`, and `kubevirt`.

modules/hcp-cli-terminal.adoc

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
// Module included in the following assemblies:
2+
// * hosted-control-planes/hcp-prepare/hcp-cli.adoc
3+
4+
:_mod-docs-content-type: PROCEDURE
5+
[id="hcp-cli-terminal_{context}"]
6+
= Installing the {hcp} command-line interface by using the CLI
7+
8+
You can install the {hcp} command-line interface (CLI), `hcp`, by using the CLI.
9+
10+
.Procedure
11+
12+
. Get the URL to download the `hcp` binary by running the following command:
13+
+
14+
[source,terminal]
15+
----
16+
$ oc get ConsoleCLIDownload hcp-cli-download -o json | jq -r ".spec"
17+
----
18+
19+
. Download the `hcp` binary by running the following command:
20+
+
21+
[source,terminal]
22+
----
23+
$ wget <hcp_cli_download_url> <1>
24+
----
25+
+
26+
<1> Replace `hcp_cli_download_url` with the URL that you obtained from the previous step.
27+
28+
. Unpack the downloaded archive by running the following command:
29+
+
30+
[source,terminal]
31+
----
32+
$ tar xvzf hcp.tar.gz
33+
----
34+
35+
. Make the `hcp` binary file executable by running the following command:
36+
+
37+
[source,terminal]
38+
----
39+
$ chmod +x hcp
40+
----
41+
42+
. Move the `hcp` binary file to a directory in your path by running the following command:
43+
+
44+
[source,terminal]
45+
----
46+
$ sudo mv hcp /usr/local/bin/.
47+
----
48+
49+
.Verification
50+
51+
* Verify that you see the list of available parameters by running the following command:
52+
+
53+
[source,terminal]
54+
----
55+
$ hcp create cluster <platform> --help <1>
56+
----
57+
+
58+
<1> You can use the `hcp create cluster` command to create and manage hosted clusters. The supported platforms are `aws`, `agent`, and `kubevirt`.

0 commit comments

Comments
 (0)