diff --git a/cli_reference/openshift_cli/getting-started-cli.adoc b/cli_reference/openshift_cli/getting-started-cli.adoc index db886c76d3..d26a22148b 100644 --- a/cli_reference/openshift_cli/getting-started-cli.adoc +++ b/cli_reference/openshift_cli/getting-started-cli.adoc @@ -16,6 +16,18 @@ You can install the OpenShift CLI (`oc`) either by downloading the binary or by // Installing the CLI by downloading the binary include::modules/cli-installing-cli.adoc[leveloffset=+2] +// Installing the CLI by using the web console +include::modules/cli-installing-cli-web-console.adoc[leveloffset=+2] + +// Installing the CLI on Linux by using the web console +include::modules/cli-installing-cli-web-console-linux.adoc[leveloffset=+3] + +// Installing the CLI on Windows by using the web console +include::modules/cli-installing-cli-web-console-windows.adoc[leveloffset=+3] + +// Installing the CLI on macOS by using the web console +include::modules/cli-installing-cli-web-console-macos.adoc[leveloffset=+3] + ifndef::openshift-origin[] // Installing the CLI by using an RPM include::modules/cli-installing-cli-rpm.adoc[leveloffset=+2] diff --git a/images/CLI-list.png b/images/CLI-list.png new file mode 100644 index 0000000000..0e4c462d0e Binary files /dev/null and b/images/CLI-list.png differ diff --git a/images/click-question-mark.png b/images/click-question-mark.png new file mode 100644 index 0000000000..bf34abb4a2 Binary files /dev/null and b/images/click-question-mark.png differ diff --git a/modules/cli-installing-cli-web-console-linux.adoc b/modules/cli-installing-cli-web-console-linux.adoc new file mode 100644 index 0000000000..09313788be --- /dev/null +++ b/modules/cli-installing-cli-web-console-linux.adoc @@ -0,0 +1,44 @@ +ifeval::["{context}" == "updating-restricted-network-cluster"] +:restricted: +endif::[] + +[id="cli-installing-cli-web-console-macos-linux_{context}"] += Installing the OpenShift CLI on Linux using the web console + +You can install the OpenShift CLI (`oc`) binary on Linux by using the following procedure. + +.Procedure + +. From the web console, click *?*. ++ +image::click-question-mark.png[] +. Click *Command Line Tools*. ++ +image::CLI-list.png[] +. Select appropriate `oc` binary for your Linux platform, and then click *Download oc for Linux*. +. Save the file. +. Unpack the archive. ++ +[source,terminal] +---- +$ tar xvzf +---- +. Move the `oc` binary to a directory that is on your `PATH`. ++ +To check your `PATH`, execute the following command: ++ +[source,terminal] +---- +$ echo $PATH +---- + +After you install the OpenShift CLI, it is available using the `oc` command: + +[source,terminal] +---- +$ oc +---- + +ifeval::["{context}" == "updating-restricted-network-cluster"] +:!restricted: +endif::[] diff --git a/modules/cli-installing-cli-web-console-macos.adoc b/modules/cli-installing-cli-web-console-macos.adoc new file mode 100644 index 0000000000..bed7a16c85 --- /dev/null +++ b/modules/cli-installing-cli-web-console-macos.adoc @@ -0,0 +1,42 @@ +ifeval::["{context}" == "updating-restricted-network-cluster"] +:restricted: +endif::[] + +[id="cli-installing-cli-web-console-macos_{context}"] += Installing the OpenShift CLI on macOS using the web console +ifeval::["{context}" == "updating-restricted-network-cluster"] +:restricted: +endif::[] + +You can install the OpenShift CLI (`oc`) binary on macOS by using the following procedure. + +.Procedure + +. From the web console, click *?*. ++ +image::click-question-mark.png[] +. Click *Command Line Tools*. ++ +image::CLI-list.png[] +. Select the `oc` binary for macOS platform, and then click *Download oc for Mac for x86_64*. +. Save the file. +. Unpack and unzip the archive. +. Move the `oc` binary to a directory on your PATH. ++ +To check your `PATH`, open a terminal and execute the following command: ++ +[source,terminal] +---- +$ echo $PATH +---- + +After you install the OpenShift CLI, it is available using the `oc` command: + +[source,terminal] +---- +$ oc +---- + +ifeval::["{context}" == "updating-restricted-network-cluster"] +:!restricted: +endif::[] diff --git a/modules/cli-installing-cli-web-console-windows.adoc b/modules/cli-installing-cli-web-console-windows.adoc new file mode 100644 index 0000000000..43a49c6c49 --- /dev/null +++ b/modules/cli-installing-cli-web-console-windows.adoc @@ -0,0 +1,39 @@ +ifeval::["{context}" == "updating-restricted-network-cluster"] +:restricted: +endif::[] + +[id="cli-installing-cli-web-console-macos-windows_{context}"] += Installing the OpenShift CLI on Windows using the web console + +You can install the OpenShift CLI (`oc`) binary on Winndows by using the following procedure. + +.Procedure + +. From the web console, click *?*. ++ +image::click-question-mark.png[] +. Click *Command Line Tools*. ++ +image::CLI-list.png[] +. Select the `oc` binary for Windows platform, and then click *Download oc for Windows for x86_64*. +. Save the file. +. Unzip the archive with a ZIP program. +. Move the `oc` binary to a directory that is on your `PATH`. ++ +To check your `PATH`, open the command prompt and execute the following command: ++ +[source,terminal] +---- +C:\> path +---- + +After you install the OpenShift CLI, it is available using the `oc` command: + +[source,terminal] +---- +C:\> oc +---- + +ifeval::["{context}" == "updating-restricted-network-cluster"] +:!restricted: +endif::[] diff --git a/modules/cli-installing-cli-web-console.adoc b/modules/cli-installing-cli-web-console.adoc new file mode 100644 index 0000000000..c991721ea6 --- /dev/null +++ b/modules/cli-installing-cli-web-console.adoc @@ -0,0 +1,22 @@ +ifeval::["{context}" == "updating-restricted-network-cluster"] +:restricted: +endif::[] + +[id="cli-installing-cli-web-console_{context}"] += Installing the OpenShift CLI by using the web console + +You can install the OpenShift CLI (`oc`) to interact with {product-title} from a web console. You can install `oc` on Linux, Windows, or macOS. + +[IMPORTANT] +==== +If you installed an earlier version of `oc`, you cannot use it to complete all +of the commands in {product-title} {product-version}. Download and +install the new version of `oc`. +ifdef::restricted[] +If you are upgrading a cluster in a restricted network, install the `oc` version that you plan to upgrade to. +endif::restricted[] +==== + +ifeval::["{context}" == "updating-restricted-network-cluster"] +:!restricted: +endif::[]