Skip to content

Instantly share code, notes, and snippets.

@benc-uk
Last active June 4, 2024 09:56
Show Gist options
  • Save benc-uk/cb2ac1146b1128137019aec8575521c1 to your computer and use it in GitHub Desktop.
Save benc-uk/cb2ac1146b1128137019aec8575521c1 to your computer and use it in GitHub Desktop.
Demo Apps - Collection

This a collection of demo apps, all of which are aimed at for deployment as containers, mainly into Azure but could obviously run anywhere. 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 & AKS
  • Run in Azure App Service
  • Run in Azure Container Instance & Container Apps

List Of Apps


Node.js Demo App

This is a simple Node.js web app using the Express framework and EJS templates, with a backend API and Azure App Insights support.

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.
  • 'Monitor' - Display realtime monitoring data, showing memory usage/total and process CPU load.
  • 'Weather' - (Optional) Gets the location of the client page (with HTML5 Geolocation). The resulting location is used to fetch weather data from the OpenWeather API
  • 'Todo' - (Optional) This is a small todo/task-list app which uses MongoDB as a database.
  • '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

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.

The Frontend is a SPA written in Vue.js 3. It uses Bootstrap 5 and Font Awesome. In addition Gauge.js is used for the dials in the monitoring view The Go component is a Go HTTP server based on the std http package and using gopsutils for monitoring metrics, and Gorilla Mux for routing Features:

  • System status / information view
  • Geolocated weather info (from OpenWeather API)
  • Realtime monitoring and metric view
  • Support for user authentication with Azure AD and MSAL
  • Prometheus metrics
  • API for generating CPU load, and allocating memory


.NET Demo App

This is a simple .NET web app using the new minimal hosting model, and Razor pages. It was created from the 'dotnet new webapp' template and modified adding custom APIs, Bootstrap v5, Microsoft Identity 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 OpenWeather 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


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


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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment