Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add odo installation docs #4923

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
78 changes: 78 additions & 0 deletions website/docs/getting-started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,81 @@
title: Installation
sidebar_position: 4
---

odo can be used as a CLI tool and as an IDE plugin; it can be run on Linux, Windows and Mac systems.

## CLI Binary installation
valaparthvi marked this conversation as resolved.
Show resolved Hide resolved

### Installing odo on Linux
```shell
$ curl -L https://mirror.openshift.com/pub/openshift-v4/clients/odo/latest/odo-linux-amd64 -o /usr/local/bin/odo
feloy marked this conversation as resolved.
Show resolved Hide resolved
$ chmod +x /usr/local/bin/odo
```

### Installing odo on Linux on IBM Power
```shell
$ curl -L https://mirror.openshift.com/pub/openshift-v4/clients/odo/latest/odo-linux-ppc64le -o /usr/local/bin/odo
$ chmod +x /usr/local/bin/odo
```

### Installing odo on Linux on IBM Z
```shell
$ curl -L https://mirror.openshift.com/pub/openshift-v4/clients/odo/latest/odo-linux-s390x -o /usr/local/bin/odo
$ chmod +x /usr/local/bin/odo
```

### Installing odo on macOS
```shell
$ curl -L https://mirror.openshift.com/pub/openshift-v4/clients/odo/latest/odo-darwin-amd64 -o /usr/local/bin/odo
$ chmod +x /usr/local/bin/odo
```

### Installing odo on Windows
1. Download the latest odo-windows-amd64.exe file.
valaparthvi marked this conversation as resolved.
Show resolved Hide resolved
2. Rename the downloaded file to odo.exe and move it to a folder of choice, for example C:\odo
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. Rename the downloaded file to odo.exe and move it to a folder of choice, for example C:\odo
2. Rename the downloaded file to odo.exe and move it to a folder of choice, for example `C:\odo`.

3. Add the location of odo.exe to %PATH%.
valaparthvi marked this conversation as resolved.
Show resolved Hide resolved

#### Setting the PATH variable in Windows 10
1. Click **Search** and type `env` or `environment`.
2. Select **Edit environment variables for your account**.
3. Select **Path** from the **Variable** section and click **Edit**.
4. Click **New** and type `<location_of_odo_binary>` into the field or click **Browse** and select the directory, and click **OK**.
valaparthvi marked this conversation as resolved.
Show resolved Hide resolved

#### Setting the PATH variable in Windows 7/8
1. Click **Start** and in the Search box types `Advance System Settings`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. Click **Start** and in the Search box types `Advance System Settings`.
1. Click **Start** and in the Search box type `Advanced System Settings`.

2. Select **Advanced systems settings** and click the **Environment Variables** button at the bottom.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. Select **Advanced systems settings** and click the **Environment Variables** button at the bottom.
2. Select **Advanced Systems Settings** and click the **Environment Variables** button at the bottom.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

3. Select the **Path** variable from the **System variable** section and click **Edit**.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it really "System variable"? I don't know, so I'm asking. But I think it might be "System Variables".

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure. I copy-pasted this from the old website.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is System variables. See the 4th image here https://www.groovypost.com/howto/set-path-system-variable-windows-7-8/.

4. Scroll to the end of the **Variable Value** and add `;<location_of_odo_binary>` and click **OK**.
valaparthvi marked this conversation as resolved.
Show resolved Hide resolved
5. Click **OK** to close the **Environment Variable** dialog.
6. Click **OK** to close the **Systems Properties** dialog.

## Installing odo in Visual Studio Code (VSCode)
The OpenShift VSCode extension uses both odo and the oc binary to interact with Kubernetes or OpenShift cluster.
feloy marked this conversation as resolved.
Show resolved Hide resolved
1. Open VS Code.
2. Launch VS Code Quick Open (Ctrl+P)
3. Paste the following command:
```shell
$ ext install redhat.vscode-openshift-connector
```

## Installation from source
valaparthvi marked this conversation as resolved.
Show resolved Hide resolved
1. Clone the repository and cd.
valaparthvi marked this conversation as resolved.
Show resolved Hide resolved
```shell
valaparthvi marked this conversation as resolved.
Show resolved Hide resolved
$ git clone https://github.com/openshift/odo.git; cd odo
valaparthvi marked this conversation as resolved.
Show resolved Hide resolved
```
2. Install tools used by the build and test system.
```shell
make goget-tools
```
3. Build the executable in `cmd/odo`.
feloy marked this conversation as resolved.
Show resolved Hide resolved
```shell
make bin
```
4. Install the executable in the system's GOPATH.
```shell
make install
```
5. Run the command to verify that it was installed properly.
```shell
odo
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running odo version would help the user check that he doesn't have a previously installed one he completely forgot in another PATH's directory.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To run the odo binary built from the source, the user would have to do ./odo and not odo.

  • ./odo refers to the one built using steps mentioned here.
  • odo refers to a previously installed binary that is already present in PATH.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./odo would this also be true for windows?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To run the odo binary built from the source, the user would have to do ./odo and not odo.

  • ./odo refers to the one built using steps mentioned here.
  • odo refers to a previously installed binary that is already present in PATH.

But the step make install has installed odo in $GOPATH/bin, which is, probably, in the PATH

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But the step make install has installed odo in $GOPATH/bin, which is, probably, in the PATH

Ah. Totally missed that. I use make && cp -f odo ~/bin/odo on my local system so I was under that mindset.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am a little confused about this discussion. Does the current content look okay?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.

```