Entry for digitalocean app platform hackathon. Deploy your own by clicking the button below!
The mcbroken dashboard is an app template of 3 applications(listed below) which pre-configure a dashboard that is powered by mcbroken.com. It's purpose is to provide availability information of all the broken Mcdonald's ice cream machines in the United States.
Stats include:
- Current broken percentage of mcdonald's ice cream machines in the US
- City with the most broken machines and it's outage percentage
- Outage percentage of most major US cities
There are 3 components(services) that make up this application.
Access the exporter metrics here: https://mcbroken-dashboard-t7vfw.ondigitalocean.app/mcbroken/metrics
The primary component is a custom prometheus exporter that collects data from mcbroken.com
Technical components(go files) are located in the root of the repo and is deployed via the go buildpack.
# build
make build
# run (listens on 8080)
make run
# docker build
make docker-build
# docker run
make docker-run
Accessible at http://localhost:8080/metrics
Access prometheus here: https://mcbroken-dashboard-t7vfw.ondigitalocean.app/
It's worth nothing that stateful workloads such as prometheus are not ideal for the digitalocean app platform in its current state as of 12/2020. This is due to prometheus needing persistent storage to reliably hold data. The app platform currently only supports ephemeral storage. Prometheus would be better served on a droplet, but it was a good learning experience to wire up all of these componentes together on the app platform.
Prometheus is an an open source time series database that scrapes our custom exporter on short intervals and holds the data for 15 days by default.
Prometheus application and deployment configuration is housed in the prometheus directory and is deployed via Dockerfile.
Access Grafana here: https://mcbroken-dashboard-t7vfw.ondigitalocean.app/grafana
Grafana is an open source dashboard front end that has the ability to connect to a variety of different data sources such as prometheus. Grafan application and deployment configuration is housed in the grafana directory and is deployed via Dockerfile.
Deployments are handled by github actions in the .github/workflows directory by using the digitalocean CLI(doctl) to update the app template for all of the components.