The Wayback Machine - https://web.archive.org/web/20190715170648/https://github.com/redhat-developer/odo-fork
Skip to content
Please note that GitHub no longer supports your web browser.

We recommend upgrading to the latest Google Chrome or Firefox.

EXPERIMENTAL FORK. Please go to original repository - github.com/openshift/odo
Branch: master
Clone or download
Pull request Compare This branch is 27 commits behind openshift:master.
cdrage and openshift-merge-robot Fix weird subcommand missing output (openshift#1858)
Removes the odd missing subcommand output. Now it outputs like so:

```sh
 ✗  Subcommand not found, use one of the available commands: app, catalog, component, config, create, delete, describe, help, link, list, log, login, logout, preference, project, push, service, storage, unlink, update, url, utils, version, watch
```

Closes openshift#1800
Latest commit 0f2b414 Jun 25, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.circleci redhat-developer/odo -> openshift/odo (openshift#1505) Mar 21, 2019
.github Typo in documentation issue templates (openshift#1564) Apr 8, 2019
build Bumps the version in build/version (openshift#1820) Jun 14, 2019
cmd Update the CLI reference doc generation script (openshift#1716) May 14, 2019
docs Run json format test in parallel (openshift#1789) Jun 25, 2019
openshift-ci/build-root redhat-developer/odo -> openshift/odo (openshift#1505) Mar 21, 2019
pkg Fix weird subcommand missing output (openshift#1858) Jun 25, 2019
scripts
site Change Odo References to odo (openshift#1833) Jun 25, 2019
tests Add benchmark tests (openshift#1841) Jun 25, 2019
vendor Organize the tests in a proper way (openshift#1612) May 9, 2019
.codecov.yml Update codecov.io configuration. Sep 20, 2018
.gitignore Adds the odo website to the master branch (openshift#1644) Apr 25, 2019
.travis.yml Run storage command test in parallel (openshift#1816) Jun 24, 2019
.wwhrd.yml updated wwhrd for license check Nov 13, 2018
LICENSE
Makefile
OWNERS Add dharmit to OWNERS file (openshift#1732) May 15, 2019
README.adoc
appveyor.yml add step to compress before publishing artifacts to appveyor (openshi… Nov 22, 2018
glide.lock Organize the tests in a proper way (openshift#1612) May 9, 2019
glide.yaml
plugin.yaml Renaming ocdev to odo Apr 12, 2018

README.adoc

odo - Developer-focused CLI for OpenShift

Build Status codecov CircleCI

Overview

OpenShift Do (odo) is a fast, iterative, and straightforward CLI tool for developers who write, build, and deploy applications on OpenShift.

Existing tools such as oc are more operations-focused and require a deep-understanding of Kubernetes and OpenShift concepts. odo abstracts away complex Kubernetes and OpenShift concepts, thus allowing developers to focus on what is most important to them: code.

Key features

odo is designed to be simple and concise with the following key features:

  • Simple syntax and design centered around concepts familiar to developers, such as project, application, and component.

  • Completely client based. No server is required within the OpenShift cluster for deployment.

  • Supports multiple languages and frameworks such as Node.js, Java, Ruby, Perl, PHP, and Python.

  • Detects changes to local code and deploys it to the cluster automatically, giving instant feedback to validate changes in real-time.

  • Lists all available components and services from the OpenShift cluster.

Installing odo

Prerequisites:

OpenShift 3.10.0 or above is required.

Procedure:

Mac and Linux

OS-independent automated installation for Mac and Linux systems

Use this bash script to quickly install odo. It will automatically detect your operating system and install odo accordingly.

$ curl -L https://github.com/openshift/odo/raw/master/scripts/installer.sh | bash
Binary installation for Mac OS
# curl -L https://github.com/openshift/odo/releases/latest/download/odo-darwin-amd64 -o /usr/local/bin/odo && chmod +x /usr/local/bin/odo
Binary installation for Linux
# curl -L https://github.com/openshift/odo/releases/latest/download/odo-linux-amd64 -o /usr/local/bin/odo && chmod +x /usr/local/bin/odo

For more installation options please refer the installation page.

Windows

In order to correctly use odo you must download it and add it to your PATH environment variable:

  1. Download the odo-windows-amd64.exe.gz file from the GitHub releases page.

  2. Extract the file.

  3. Add the location of extracted binary to your PATH environment variable by following the steps listed in this Wiki page.

Visit the installation page for instructions to set the PATH environment variable on Windows 7, 8 or 10.

Demonstration

The following demonstration provides an overview of odo:

asciicast

Deploying an application using odo

After installing odo, follow these steps to build, push, and deploy a Node.js application. Examples for other supported languages and runtimes can be found here.

These steps recommend using Minishift for running an OpenShift 3.10.0 or above cluster locally. More information on how to install and use Minishift can be found here.

  1. Start a local OpenShift development cluster by using Minishift.

    $ minishift start
  2. Log into the OpenShift cluster.

    $ odo login -u developer -p developer
  3. Download the Node.js sample code and change directory to the location of the sample code.

    $ git clone https://github.com/openshift/nodejs-ex
    $ cd nodejs-ex
  4. Add a component of type nodejs to your application.

    $ odo create nodejs
  5. Deploy your application.

    $ odo push
  6. Create a URL to access the application and visit it to test it.

    $ odo url create --port <application port>
    $ curl <generated URL>
  7. When finished, remove your component from Minishift and stop your Minishift cluster.

    $ odo delete <component>
    $ minishift stop

For more in-depth information and advanced use-cases such as adding storage to a component or linking components, see the interactive tutorial or the Getting Started Guide.

Community, discussion, contribution, and support

Discussions: For any discussions or help with odo, open a GitHub issue.

Issues: If you have an issue with odo, please file it.

Contributing: Want to become a contributor and submit your own code? Have a look at our Development Guide.

Glossary

Application: An application consists of multiple microservices or components that work individually to build the entire application.

Component: A component is similar to a microservice. Multiple components make up an application. A component has different attributes like storage. odo supports multiple component types like nodejs, perl, php, python, and ruby.

Service: Typically a service is a database or a service that a component links to or depends on. For example: MariaDB, Jenkins, MySQL. This comes from the OpenShift Service Catalog and must be enabled within your cluster.

You can’t perform that action at this time.