Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time


an interactive Cloud Foundry tutorial in your terminal

The tutorial will walk and talk you through the deployment of a simple chat application to Cloud Foundry while exploring cloud-native apps.

Just run:

docker run -it mamachanko/cfpush

or clone this repository and run:


You're feedback is very welcome. Feel free to raise an issue if anything should be unclear or you run into any problems.

We manage our backlog here.


This tutorial currently assumes you're using If you sign up you will get some free quota to play around with. (might as well spend it on this tutorial)

Development affordances

You can run the tutorial with different flavours:

# For the tutee. With prompts and real commands. It's the tutorial as it's meant to be run.

# For CI. non-interactive and with smoke tests.
CI=true ./

# For writing the tutorial with pretend commands.
DRY=true ./

Run the message-service with an in-memory database:


Run the message-service with Postgres:

docker-compose --file message-service/docker-compose.yml up -d 

Run the chat-app:


Utility scripts for testing and introspection:

# list messages
./scripts/ # defaults to localhost:8080
./scripts/ ''

# create a random message
./scripts/ # defaults to localhost:8080
./scripts/ ''

More utilities in ./scripts:

# reset the tutorial by deleting the space

# build the apps

# build the apps, run the tutorial in non-interactive mode and push the code

Object of study: "a (very) simple chat"

TODO: this section should become redundant if properly explained within the tutorial

The object of study is a simple chat application. The frontend is a Javascript React application, the chat-app. The backend is a Java Spring Boot web application, the message-service. The chat-app continuously polls message-service for messages and allows you to create new messages. This is not a great architecture for a chat application. And you are urged not to take pointers for production-ready application design. But it serves the purpose of exploring Cloud Foundry and cloud-native computing.

the backend - message-service

It's a Java Spring Boot web application. It exposes two endpoints:

GET  /api/messages : returns list of messages
POST /api/messages : creates a new message

the frontend - chat-app

This is a Javascript React application. It continuously polls the message-service for messages and allows you to send new messages to it. It will tell you if it fails to reach the message-service.