Code Monkey home page Code Monkey logo

hello-openshift's Introduction

Hello OpenShift

This is an example to demonstrate build and deployment of container applications in OpenShift Container Platform.

The application is made up of two pods:

  • heart: A Java application that responds to HTTP requests on port 8080
  • monitor: A NodeJS application that consumes heart's REST API and notifies the heart-monitor application in the browser using websockets.

This has been tested on Red Hat CDK 3.2.0-1 (minishift v1.7.0+204ce19) and CDK v3.6.0-1 (minishift v1.24.0+aa3dd4c).

Setup

This repo is used to show how different applications are set up on OpenShift. As such, multiple methods are used.

Before beginning, create a new project:

oc new-project hello-openshift

Setup heart using OpenShift Console

  • Choose Add to Project menu item and go to the Catalogue.
  • Search and use Red Hat OpenJDK image for the app.
  • Use this repo's HTTPS URL and heart as context path.

Setup monitor using OpenShift Console

  • Choose Add to Project menu item and go to the Catalogue.
  • Search and use NodeJS 6 image for the app.
  • Use this repo's HTTPS URL and monitor as context path.
  • Set PORT environment variable to 8080.

Setup monitor using command line

oc new-app openshift/nodejs:6~https://github.com/sohrab-/hello-openshift.git \
  --name=monitor-omega \
  --context-dir=monitor \
  --env PORT=8080

Setup monitor using YAML

oc apply -f another-monitor.yaml

Setup monitor using OpenShift Template

Add the template to OpenShift:

oc apply -f monitor-template.yaml

Then search for the template in the Catalog and create the app.

hello-openshift's People

Contributors

sohrab- avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.