Skip to content
Basic demo application showcasing Django + Prometheus + Kubernetes
Smarty Dockerfile Makefile
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
demo
helm
.gitignore adds basic walker application implementation Sep 7, 2019
Dockerfile
Makefile adds helm configuration for application and prometheus deployment Sep 8, 2019
README.md Update README.md Sep 8, 2019
docker-compose.yml
prometheus.yml
requirements.txt

README.md

django-prometheus-demo

Basic demo application showcasing Django + Prometheus + Kubernetes. For more reading about the why and how of custom metrics with Django, you can check out the post custom application metrics with Django, Prometheus, and Kubernetes.

Running

Dependencies

You'll need Docker installed and a Kubernetes cluster to deploy Prometheus to (Minikube should work just fine). You'll also need to install the Tiller server into the cluster and have the client available locally.

Install the Web App

# in real life, we wouldnt VC the .htpasswd, but this is easy
kc create secret generic prometheus-basic-auth --from-file=.htpasswd=prometheus/.htpasswd
make

Install the prometheus helm chart

helm upgrade --install prometheus stable/prometheus -f helm/prometheus/values.yaml

Testing

The primary urls for interacting with the app are:

  • /walks/start/
  • /walks/<walk_id>/complete/
  • /walks/<walk_id>/status/

You can perform some actions at these locations, then verify that metrics are set properly by either:

Development

docker-compose up -d
You can’t perform that action at this time.