Learn how GitHub Actions and OpenFaaS can be used for simple functions at the edge of your network. If you’re running Kubernetes in production then you’ll be aware of how difficult it can be to operate. Not only do you need to learn its concepts and API, but if you extend it in any way, then you’ll be needing to maintain all your custom changes over time. As the author of several applications and operators targeting Kubernetes, I have to dedicate much of my time to maintenance and migrations. By Alex Ellis.
I want to show you how to build functions at the edge of your network with the faasd project. faasd is the same OpenFaaS that you know from the world of Kubernetes, but repackaged to be vastly simpler to use on IoT devices. Unlike K3s, it barely consumes any resources at idle, its API is stable and upgrades are as simple as replacing a binary.
So what reasonable person would deploy faasd instead of Kubernetes?
- If you need a few functions to extend a SaaS or respond to webhooks
- You want to run a few cron jobs and write them using real code like JavaScript, Go or Python
- You want to package up functions and something to run them as an appliance
- You need to run at the edge or on IoT devices
We’ll create a new function to handle repository webhooks, these are events that happen on a GitHub repository such as push, PR and issue events. It’s now up to you to decide what language you want to write your functions in. Go and Python tend to use the least amount of resources, so if you want to pack in plenty of functions, they may be your best options. Node.js is also popular, but can be a bit more hungry for RAM. Excellent read!
[Read More]