Custom Hardware to Provide Affordable Email to the African Congo

Copied URL with current time.
0:00 / 0:00
avatars/shaun-bathgate.jpg
Shaun Bathgate
https://ascoderu.ca/

In this episode of Running in Production, Clemens Wolff and Shaun Bathgate go over building an Orange Pi hardware appliance that uses Flask and various Linux tools to help rural communities get affordable email. Besides the client hardware, the server component is hosted on Azure.

Clemens and Shaun talk about the challenges of developing and debugging such a service, using Terraform to manage 38+ Azure resources, how it all comes together in about 7,500 lines of Python and linting everything.

Topics Include

  • 1:54 – Custom hardware appliance with an Orange Pi + USB modem
  • 5:03 – Both the client (hardware) and server (Azure) use Flask
  • 7:28 – Motivation for using Flask and Python
  • 11:24 – What exactly is this hardware device and what software runs on it?
  • 14:46 – The server side runs on 38+ Azure resources on 1 VM, provisioned by Terraform
  • 18:23 – Docker Compose is being used in dev and production (they moved away from K8s)
  • 20:00 – The server is running Ubuntu 18.04 LTS with 16 GB of memory / 4 CPU cores
  • 21:37 – There’s SQLite, gunicorn and nginx but there’s no client side SSL certs
  • 26:39 – What it’s been like working with Terraform to manage the infrastructure
  • 29:52 – The deployment process is interesting to say the least!
  • 35:31 – Everything that can get linted gets linted
  • 37:14 – Accepting payments is not easy as it involves manually topping up SIM cards
  • 44:27 – Debugging and accessing logs gets tricky on the client side
  • 47:54 – Dealing with logs, error tracking and database backups on the server side
  • 49:52 – Using SendGrid for sending emails and Cloudflare to handle DNS
  • 53:21 – Best tips (Clemens)? Soft skills and focusing on making contributing code easy
  • 55:36 – Best tips (Shaun)? Keep your tests easy to follow so you can see how something works
  • 59:28 – If you’re interested in contributing, their code base is open source on GitHub
📄 References
⚙️ Tech Stack
🛠 Libraries Used

Support the Show

This episode does not have a sponsor and this podcast is a labor of love. If you want to support the show, the best way to do it is to purchase one of my courses or suggest one to a friend.

  • Dive into Docker is a video course that takes you from not knowing what Docker is to being able to confidently use Docker and Docker Compose for your own apps. Long gone are the days of "but it works on my machine!". A bunch of follow along labs are included.
  • Build a SAAS App with Flask is a video course where we build a real world SAAS app that accepts payments, has a custom admin, includes high test coverage and goes over how to implement and apply 50+ common web app features. There's over 20+ hours of video.

Questions

  • Want to discuss this episode on Twitter? Tag @nickjanetakis or use #RunningInProduction

Aug 31, 2020

✏️ Edit on GitHub