{"id":13632007,"url":"https://github.com/jsiebens/rpi-faasd","last_synced_at":"2025-08-02T14:32:10.997Z","repository":{"id":79481883,"uuid":"266729230","full_name":"jsiebens/rpi-faasd","owner":"jsiebens","description":"A Raspberry Pi OS or Ubuntu image with faasd and inlets pre-installed","archived":false,"fork":false,"pushed_at":"2022-03-25T13:36:09.000Z","size":73,"stargazers_count":40,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-11-09T00:34:35.588Z","etag":null,"topics":["arm","faasd","inlets","inlets-pro","openfaas","packer","raspberry-pi","raspbian"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jsiebens.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2020-05-25T08:46:58.000Z","updated_at":"2024-05-03T12:04:13.000Z","dependencies_parsed_at":"2023-04-10T04:08:11.426Z","dependency_job_id":null,"html_url":"https://github.com/jsiebens/rpi-faasd","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsiebens%2Frpi-faasd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsiebens%2Frpi-faasd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsiebens%2Frpi-faasd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jsiebens%2Frpi-faasd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jsiebens","download_url":"https://codeload.github.com/jsiebens/rpi-faasd/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228483617,"owners_count":17927363,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arm","faasd","inlets","inlets-pro","openfaas","packer","raspberry-pi","raspbian"],"created_at":"2024-08-01T22:02:47.853Z","updated_at":"2024-12-06T15:13:07.750Z","avatar_url":"https://github.com/jsiebens.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# faasd on a Raspberry Pi\n\n![main](https://github.com/jsiebens/rpi-faasd/actions/workflows/build.yaml/badge.svg?branch=main)\n\nBlog post: [A serverless appliance for your Raspberry Pi with faasd](https://johansiebens.dev/posts/2020/08/a-serverless-appliance-for-your-raspberry-pi-with-faasd/)\n\nThis repository contains Packer templates and scripts to build a Raspbian image with [faasd](https://github.com/openfaas/faasd) and [inlets](https://inlets.dev) [PRO](https://github.com/inlets/inlets-pro) pre-installed.\n\n\u003e faasd is the same OpenFaaS experience and ecosystem, but without Kubernetes. Functions and microservices can be deployed anywhere with reduced overheads whilst retaining the portability of containers and cloud-native tooling such as containerd and CNI.\n\nThe installation took inspiration from the [blog of Alex Ellis](https://blog.alexellis.io/faasd-for-lightweight-serverless/), which explains how to install faasd on a Raspberry Pi in more detail.\n\nBeside containerd, faasd and inlets, also [cloud-init](https://cloudinit.readthedocs.io/en/18.3/) is available to initialize and configure a Raspian instance. With cloud-init you can customize e.g. hostname, authorized ssh keys, a static ip, basic auth for faasd, ... \n\nThis setup includes the following images:\n\n- __rpi-faasd__: a Raspios/Ubuntu image with containerd and faasd as systemd services, to run a private faasd instance.\n\n## How to use these images\n\n### in general\n\n1. Download the image of the latest [release](https://github.com/jsiebens/rpi-faasd/releases) or build the image.\n\n2. Flash the image to an SD card.\n\n3. Optionally customize the /boot/user-data with e.g. authorized ssh keys, basic auth credentials ...\n\n4. Insert the SD card into the Raspberry Pi and power it up.\n\n5. As soon the services are up and running, you can access OpenFaas on `http://\u003cyour raspberry pi ip\u003e:8080`. The required basic auth credentials are available in `/var/lib/faasd/secrets/` on your Raspberry Pi\n\n### in combination with inlets-pro\n\nTo expose the faasd gateway running on a Raspberry Pi, you need to create an exit-node with a public ip.\nI find the use of [inletsctl](https://github.com/inlets/inletsctl) to easist way to achieve this. Download the latest release or simply install it by running `curl -sSLf https://inletsctl.inlets.dev | sudo sh`\n\nNext, create an HTTP exit-node on your favourite cloud provider, e.g. on DigitalOcean:\n\n```\ninletsctl create  \\\n  --tcp=false \\   \n  --provider digitalocean \\   \n  --access-token-file ~/access-token.txt \\   \n  --region lon1 \\\n  --letsencrypt-domain \u003cyour domain\u003e\n  --letsencrypt-email \u003cyour email\u003e\n```\n\nAfter writing the `rpi-faasd` image to an SD card, configure your instance with the proper values for the required environment variables. (See examples/user-data-inlets)\n\n## Building the images\n\nThis project includes a Vagrant file and some scripts to build the images in an isolated environment.\n\nTo use the Vagrant environment, start by cloning this repository:\n\n```\ngit clone https://github.com/jsiebens/rpi-faasd\ncd rpi-faasd\n```\n\nNext, start the Vagrant box and ssh into it:\n\n```\nvagrant up\nvagrant ssh\n```\n\nWhen connected with the Vagrant box, run `build.sh` in the `/vagrant` directory:\n\n```\ncd /vagrant\n./build.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsiebens%2Frpi-faasd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjsiebens%2Frpi-faasd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjsiebens%2Frpi-faasd/lists"}