odo - Developer-focused CLI for OpenShift
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.
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.
OpenShift 3.10.0 or above is required.
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
$ curl -L https://github.com/openshift/odo/raw/master/scripts/install.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.
In order to correctly use
odo you must download it and add it
PATH environment variable:
Visit the installation page for instructions to set the
PATH environment variable on Windows 7, 8 or 10.
Deploying an application using
odo, follow these steps to build, push, and
deploy a Node.js application. Examples for other supported languages and runtimes can be found here.
Start a local OpenShift development cluster by using
$ minishift start
Log into the OpenShift cluster.
$ odo login -u developer -p developer
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
Add a component of type
nodejsto your application.
$ odo create nodejs
Deploy your application.
$ odo push
Create a URL to access the application and visit it to test it.
$ odo url create --port <application port> $ curl <generated URL>
When finished, remove your component from
Minishiftand stop your
$ odo delete <component> $ minishift stop
Community, discussion, contribution, and support
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.