Skip to content

Latest commit

 

History

History
54 lines (35 loc) · 2.24 KB

README.md

File metadata and controls

54 lines (35 loc) · 2.24 KB

demoapp

demoapp is a simple NodeJS-based application used in the Break & Fix workshop. It will be deployed using the demoapp-template.yaml file on OpenShift and the manager-app will then make some changes on the cluster or the application objects to make it unavailable.

The build and deployment process

The BuildConfig defines how the application should be built before being deployed. The S2I builder image will clone the repository on the path specified in the contextDir and run npm install. The result is used to create the image that will be later deployed.

The DeploymentConfig defines where to pull the image from and how it is deployed. How many replicas, how to deploy a new image, how to check the application is successfully deployed (Health checks using probes).

Once the application is marked as ready (i.e. deployed and healthy), the Service starts serving requests and load balancing across all the pods matching the selector. The Route provides external access through the router and will forward requests to the service being exposed.

Source code

Repository:

  • Type: Git
  • URL: https://github.com/ruromero/break-fix
  • Context dir: demoapp

Code:

  • Language: Javascript
  • Server: NodeJS

Build:

  • Type: Source to Image (s2i)
  • Builder image: centos/nodejs-6-centos7:latest

HTTP Requests

Request

  • PORT: 8080
  • Path: /
  • Method: GET

Reply

  • Status code: 200 OK
  • Body: Hello Break & Fix!

Deployment

  • Replicas: 1
  • Strategy: Recreate
  • Labels: app=demoapp
  • readinessProbe and livenessProbe
    • HTTP Verb: GET
    • Path: '/'
    • Port: 8080
  • Resources Limits/Requests: none