Sample applications

odo offers partial compatibility with any language or runtime listed within the OKD catalog of component types. For example:

  1. NAME PROJECT TAGS
  2. dotnet openshift 3.1,latest
  3. httpd openshift 2.4,latest
  4. java openshift 8,latest
  5. nginx openshift 1.10,1.12,1.8,latest
  6. nodejs openshift 0.10,4,6,8,latest
  7. perl openshift 5.16,5.20,5.24,latest
  8. php openshift 5.5,5.6,7.0,7.1,latest
  9. python openshift 2.7,3.3,3.4,3.5,3.6,latest
  10. ruby openshift 2.0,2.2,2.3,2.4,latest
  11. wildfly openshift 10.0,10.1,8.1,9.0,latest

For odo Java and Node.js are the officially supported component types. Run odo catalog list components to verify the officially supported component types.

To access the component over the web, create a URL using odo url create.

Examples from Git repositories

httpd

This example helps build and serve static content using httpd on CentOS 7. For more information about using this builder image, including OKD considerations, see the Apache HTTP Server container image repository.

  1. $ odo create httpd --git https://github.com/openshift/httpd-ex.git

java

This example helps build and run fat JAR Java applications on CentOS 7. For more information about using this builder image, including OKD considerations, see the Java S2I Builder image.

  1. $ odo create java --git https://github.com/spring-projects/spring-petclinic.git

nodejs

Build and run Node.js applications on CentOS 7. For more information about using this builder image, including OKD considerations, see the Node.js 8 container image.

  1. $ odo create nodejs --git https://github.com/openshift/nodejs-ex.git

perl

This example helps build and run Perl applications on CentOS 7. For more information about using this builder image, including OKD considerations, see the Perl 5.26 container image.

  1. $ odo create perl --git https://github.com/openshift/dancer-ex.git

php

This example helps build and run PHP applications on CentOS 7. For more information about using this builder image, including OKD considerations, see the PHP 7.1 Docker image.

  1. $ odo create php --git https://github.com/openshift/cakephp-ex.git

python

This example helps build and run Python applications on CentOS 7. For more information about using this builder image, including OKD considerations, see the Python 3.6 container image.

  1. $ odo create python --git https://github.com/openshift/django-ex.git

ruby

This example helps build and run Ruby applications on CentOS 7. For more information about using this builder image, including OKD considerations, see Ruby 2.5 container image.

  1. $ odo create ruby --git https://github.com/openshift/ruby-ex.git

Binary examples

java

Java can be used to deploy a binary artifact as follows:

  1. $ git clone https://github.com/spring-projects/spring-petclinic.git
  2. $ cd spring-petclinic
  3. $ mvn package
  4. $ odo create java test3 --binary target/*.jar
  5. $ odo push