Skip to content

Containerized Demo Web Apps

Ben Coleman edited this page Mar 27, 2021 · 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 --rm -it -p 3000:3000 ghcr.io/benc-uk/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 --rm -p 4000:4000 ghcr.io/benc-uk/vuego-demoapp:latest


.NET Core Demo App

This is a simple .NET Core web app using Razor pages and MVC. It was created from the dotnet new webapp template and modified adding Bootstrap v4, Fontawesome and other packages/features.

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

  • 'Info' - Will show 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/exception pages for use with App Insights or other monitoring tool.
  • 'Monitoring' - Displays realtime CPU load and memory working set charts, fetched from an REST API (/api/monitoringdata) and displayed using chart.js
  • 'Weather' - (Optional) 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
  • 'User Account' - (Optional) When configured with Azure AD (application client id and secret) user login button will be enabled, and an user-account details page enabled, which calls the Microsoft Graph API

Docker: docker run --rm -p 5000:5000 ghcr.io/benc-uk/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 --rm -p 5000:5000 ghcr.io/benc-uk/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 --rm -p 8080:8080 ghcr.io/benc-uk/java-demoapp:latest

Clone this wiki locally