Spring 5 + Kubernetes + Terraform
This demo application showcases how to use a Reactive Web Application based on Spring 5, deployed via Terraform onto a Kubernetes cluster.
You need to install the following on your system to run this demo:
- ๐ณ Docker
- โ๏ธ Kubernetes
To run the application, execute:
./start-coffeeshop.sh
Welcome to CoffeeShop - we offer freshly brewed coffee, cakes and delicious sandwiches. Demand grew a lot which made us move into the cloud. Our architecture allows us to take orders online via an API, we store our orders and can present them to our employees.
This project consists of the following folders:
api/
- the frontend API component to serve requests from shops and clientsorderbook/
- the order component of the systemcatalogue/
- the product catalogue of the coffeeshopinfrastructure/
- the infrastructure required, for example aMongoDB
database, running viadocker-compose
.
Additionally, this project contains the following files:
start-coffeeshop.sh
- starts the entire coffeeshop in a local Kubernetes cluster
This demo consists of a data model like this:
- product a product is any product offered by the coffee shop.
- order an order always references a product which has been ordered. Optionally, we can expose the status on that order.
The following diagram describes a high level architecture of this demo:
Our barista uses a client (smartphone app or desktop app) to configure an order for a given customer. For example, if a customer orders a coffee, the barista creates that order in the system. The API client then makes a call to the API to create that order. Once the coffee is finished, the barista presses a button on the app to confirm that the order is complete.
In order to find out details about each component, refer to the respective documentation of each component:
This demo has been designed and built by Miguel Gonzalez Sanchez. Make sure you follow me on Twitter @bitbrain.