Installing odo

You can install the odo CLI on Linux, Windows, or macOS by downloading a binary. You can also install the OpenShift VS Code extension, which uses both the odo and the oc binaries to interact with your OpenShift Container Platform cluster. For Fedora, you can install the odo CLI as an RPM.

Currently, odo does not support installation in a restricted network environment.

Installing odo on Linux

The odo CLI is available to download as a binary and as a tarball for multiple operating systems and architectures including:

Operating SystemBinaryTarball

Linux

odo-linux-amd64

odo-linux-amd64.tar.gz

Linux on IBM Power

odo-linux-ppc64le

odo-linux-ppc64le.tar.gz

Linux on IBM Z and LinuxONE

odo-linux-s390x

odo-linux-s390x.tar.gz

Procedure

  1. Navigate to the content gateway and download the appropriate file for your operating system and architecture.

    • If you download the binary, rename it to odo:

      1. $ curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-linux-amd64 -o odo
    • If you download the tarball, extract the binary:

      1. $ curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-linux-amd64.tar.gz -o odo.tar.gz
      2. $ tar xvzf odo.tar.gz
  2. Change the permissions on the binary:

    1. $ chmod +x <filename>
  3. Place the odo binary in a directory that is on your PATH.

    To check your PATH, execute the following command:

    1. $ echo $PATH
  4. Verify that odo is now available on your system:

    1. $ odo version

Installing odo on Windows

The odo CLI for Windows is available to download as a binary and as an archive.

Operating SystemBinaryTarball

Windows

odo-windows-amd64.exe

odo-windows-amd64.exe.zip

Procedure

  1. Navigate to the content gateway and download the appropriate file:

    • If you download the binary, rename it to odo.exe.

    • If you download the archive, unzip the binary with a ZIP program and then rename it to odo.exe.

  2. Move the odo.exe binary to a directory that is on your PATH.

    To check your PATH, open the command prompt and execute the following command:

    1. C:\> path
  3. Verify that odo is now available on your system:

    1. C:\> odo version

Installing odo on macOS

The odo CLI for macOS is available to download as a binary and as a tarball.

Operating SystemBinaryTarball

macOS

odo-darwin-amd64

odo-darwin-amd64.tar.gz

Procedure

  1. Navigate to the content gateway and download the appropriate file:

    • If you download the binary, rename it to odo:

      1. $ curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-darwin-amd64 -o odo
    • If you download the tarball, extract the binary:

      1. $ curl -L https://developers.redhat.com/content-gateway/rest/mirror/pub/openshift-v4/clients/odo/latest/odo-darwin-amd64.tar.gz -o odo.tar.gz
      2. $ tar xvzf odo.tar.gz
  2. Change the permissions on the binary:

    1. # chmod +x odo
  3. Place the odo binary in a directory that is on your PATH.

    To check your PATH, execute the following command:

    1. $ echo $PATH
  4. Verify that odo is now available on your system:

    1. $ odo version

Installing odo on VS Code

The OpenShift VS Code extension uses both odo and the oc binary to interact with your OKD cluster. To work with these features, install the OpenShift VS Code extension on VS Code.

Prerequisites

  • You have installed VS Code.

Procedure

  1. Open VS Code.

  2. Launch VS Code Quick Open with Ctrl+P.

  3. Enter the following command:

    1. $ ext install redhat.vscode-openshift-connector

Installing odo on Fedora using an RPM

For Fedora, you can install the odo CLI as an RPM.

Procedure

  1. Register with Red Hat Subscription Manager:

    1. # subscription-manager register
  2. Pull the latest subscription data:

    1. # subscription-manager refresh
  3. List the available subscriptions:

    1. # subscription-manager list --available --matches '*OpenShift Developer Tools and Services*'
  4. In the output of the previous command, find the Pool ID field for your OKD subscription and attach the subscription to the registered system:

    1. # subscription-manager attach --pool=<pool_id>
  5. Enable the repositories required by odo:

    1. # subscription-manager repos --enable="ocp-tools-4.11-for-rhel-8-x86_64-rpms"
  6. Install the odo package:

    1. # yum install odo
  7. Verify that odo is now available on your system:

    1. $ odo version