Skip to content

Containerized Demo Web Apps

Ben Coleman edited this page Dec 31, 2019 · 14 revisions

Contents

This a set of demo apps, all of which are aimed at for deployment to Azure and Docker containers. These are designed for demos and hands on lab exercises, to be used with Azure and DevOps CI & CD scenarios, where you need "something" to deploy and push through the pipeline.

The apps are all small, simple standalone web applications but they are designed for ease of deployment, showcasing use of cloud native deployment scenarios and running as containers, rather than complete examples of a fully functioning architecture.

Example deployment scenarios

  • Run locally
  • Run as Docker container
  • Run in Kubernetes
  • Run in Azure App Service
  • Run in Azure Web App for Containers
  • Run in Azure Container Instance

List Of Apps


Node.js Demo App

This is a simple Node.js web app using the Express framework and EJS templates. It has been designed with cloud demos & containers in mind, to demonstrate capabilities such as auto scaling in Azure, Application Insights monitoring and use of Azure AD for authentication

The app has five basic pages accessed from the top navigation menu, three of which are only lit up when certain configuration variables are set (see 'Optional Features' below):

  • INFO - Will show some system & runtime information, and will also display if the app is running from within a Docker container and Kubernetes.
  • TOOLS - Some tools useful in demos, such a forcing CPU load (for autoscale demos), and error pages for use with App Insights
  • WEATHER - Gets the location of the client page (with HTML5 Geolocation). The resulting location is used to fetch a weather forecast from the Dark Sky weather API
  • TODO - This is a small todo/task-list app which uses MongoDB as a database.
  • LOGIN - When configured with details of an app registered in Azure AD (id and secret) user login button will be enabled.

Docker: docker run -p 3000:3000 bencuk/nodejs-demoapp:latest


Vue.js & Go Demo App

This is a simple web application with a Go server/backend and a Vue.js SPA (Single Page Application) frontend. Designed for running in Azure & containers for demos.

  • The SPA component was created using the Vue CLI and uses Bootstrap-Vue and Font Awesome. In addition Gauge.js is used for the dials in the monitoring view
  • The Go component is a vanilla Go HTTP server using gopsutils for monitoring metrics, and Mux for routing

Docker: docker run -p 4000:4000 bencuk/vuego-demoapp:latest


.NET Core ASP Demo App

Based on the standard .NET Core 2.0 template (dotnet new), but further modified and jazzed up a little. The app was updated to use Razor Pages rather than MVC, which fits the simple demo app use case better.

Features added on top of the standard template:

  • The 'About' page displays some system basic information (OS, platform, CPUs, IP address etc) and should detect if the app is running as a container or not.
  • The 'Stress' page will generate CPU load, useful for testing/demoing autoscaling.
  • The 'DepCall' page will let you make a server side HTTP call, useful to demonstrate dependency calls in Application Insights
  • The App Insights SDK has been included, so if configured with an instrumentation key, monitoring data can be gathered and sent to Application Insights

Docker: docker run -p 5000:5000 bencuk/dotnet-demoapp:latest


Python Flask Demo App

This is a simple Python Flask web application designed for demos, to be used with Azure and DevOps scenarios. The app provides system information and a realtime monitoring screen with dials showing CPU, memory, IO and process information.

The app can be run directly via Python or as a container (Dockerfile provided). Python 3.6+ is required and has been tested on Windows and Linux (Ubuntu 18.04)

Features added on top of the standard template:

  • The 'About' page displays some system basic information (OS, platform, CPUs, IP address etc) and should detect if the app is running as a container or not.
  • The 'Stress' page will generate CPU load, useful for testing/demoing autoscaling.
  • The 'DepCall' page will let you make a server side HTTP call, useful to demonstrate dependency calls in Application Insights
  • The App Insights SDK has been included, so if configured with an instrumentation key, monitoring data can be gathered and sent to Application Insights

Docker: docker run -p 5000:5000 bencuk/python-demoapp:latest


Java SpringBoot Demo App

This is a simple Java web app built using Spring Boot and OpenJDK 11.

It has been designed with cloud demos & containers in mind, to demonstrate capabilities such as microservice deployment, auto scaling in Azure and Application Insights monitoring

Features:

  • The 'Info' page displays some system basic information (OS, platform, CPUs, IP address etc) and should detect if the app is running as a container or not.
  • The 'Tools' page is useful in demos, and has options such a forcing CPU load (for autoscale demos), and error pages for use with App Insights
  • The 'mBeans' page is a basic Java mBeans explorer, letting you inspect mBeans registered with the JVM and the properties they are exposing
  • Azure AD integration for user auth and sign-in

Docker: docker run -p 8080:8080 bencuk/java-demoapp:latest

Clone this wiki locally