Giter VIP home page Giter VIP logo

hello-cf's Introduction

hello-cf

This simple application displays the request URL and the port number for the deployed application instance. Displaying the port number supports a demonstration where, when deployed to cloud foundry and the application crashes, a new warden container will be created and the app will be redeployed and started therein.

the script for the demo is as follows:

Clone this repo

Deploy the app

Deploy two instances - this will allow you to show that in the short time that one instance is crashed, the other is still serving traffic.

cf push -m 128M -i 2 <your unique app name>

Start tailing the logs

Recommend splitting your terminal and in one half start logging with:

cf logs <your unique app name>

Access the app in your browser

Hit refresh a few times and point out the two different port numbers displayed. Have audience remember the two port numbers

Kill one of the app instances

You can do this by accessing the url

http:\\<appurl>\broken

Look at log and app instances

You'll have to be quick - do a

cf apps

showing that one of the app instances is down. Highlight stack trace in the logs and then run this again showing the app is restarted:

cf apps

Refresh app in browser

Refresh until you show that one of the port numbers remains the same but one has been replaced with a new port number (warden container).

Reminder!!! Make sure you go back to the URL without the "/broken" suffix or you'll crash your app again.

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.