Skip to content

Commit 2bafaa9

Browse files
committed
Updates for faasd/edge
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent 88ed1b6 commit 2bafaa9

File tree

5 files changed

+199
-82
lines changed

5 files changed

+199
-82
lines changed

docs/deployment.md

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -33,28 +33,36 @@ Find out more about each option and how to deploy OpenFaaS to Kubernetes:
3333

3434
[Deploy to Kubernetes](/deployment/kubernetes/)
3535

36-
## faasd - Serverless for everyone else
36+
## OpenFaaS Edge (faasd-pro) / faasd CE - Serverless for everyone else
3737

38-
faasd is OpenFaaS, reimagined without the complexity and cost of Kubernetes. It runs well on a single host with very modest requirements, and is largely API-compatible with OpenFaaS on Kubernetes. Under the hood it uses [containerd](https://containerd.io/) and [Container Networking Interface (CNI)](https://github.com/containernetworking/cni) along with the same core components from OpenFaaS CE.
38+
The term faas`d` is short for FaaS Daemon, a single binary that runs on a host to manage both stateful services, and functions.
3939

40-
When should you use faasd over OpenFaaS CE on Kubernetes?
40+
faasd is OpenFaaS, reimagined without the complexity and cost of Kubernetes. It runs well on a single host with very modest requirements, and is API-compatible with OpenFaaS on Kubernetes. Under the hood it uses [containerd](https://containerd.io/) and [Container Networking Interface (CNI)](https://github.com/containernetworking/cni), along with the same core components from OpenFaaS.
41+
42+
If you ever outgrow faasd, you can upgrade to OpenFaaS on Kubernetes and bring your existing functions with you.
43+
44+
When should you use faasd over OpenFaaS on Kubernetes?
45+
46+
For internal business use:
4147

4248
* You're building automation/glue-code, web portals, cron jobs, bots, or webhook receivers.
43-
* You want to be able to run your code locally, using containers.
44-
* You want a way to do remote deployments over a REST API.
45-
* You either don't have the bandwidth to manage or learn Kubernetes.
46-
* You don't need planet scale.
49+
* You need a reliable, durable system for asynchronous tasks and ETL jobs.
50+
* You want a way to do remote deployments over a REST API / CLI.
51+
* You don't have the bandwidth to learn and/or manage Kubernetes.
52+
* You don't need to handle large spikes in traffic, or can tolerate some queueing.
4753

48-
You may also be interested in:
54+
For resale to end-clients; or for edge locations, or IoT devices:
4955

50-
* Deploying to constrained IoT or edge devices
51-
* Shrink-wrapping functions into a VM image to deploy for customers or clients.
56+
* You are deploying to edge locations or IoT devices, where physical access is limited.
57+
* You want a stable, low-maintenance system that is easy to deploy and manage.
58+
* You have to deploy to an airgapped environment, or where the network is unstable.
59+
* You need to deploy to a resource constrained device, such as a Dell Edge Gateway or Raspberry Pi.
5260

53-
faasd CE is available for personal use, and limited commercial use in a "Small Business Environment", [read the EULA to find out if you quality](https://github.com/openfaas/faasd/blob/master/EULA.md).
61+
faasd CE is available for personal (non-commercial) use: [read the EULA here](https://github.com/openfaas/faasd/blob/master/EULA.md).
5462

55-
The CE version is limited to a single namespace, with a limit of 15 functions, which should be sufficient for most personal projects and for internal use within a Small Business Environment. OpenFaaS Edge is a commercial distribution of faasd with additional features and higher limits.
63+
The CE version is limited to a single namespace, with a limit of 15 functions, which should be sufficient for most personal projects. OpenFaaS Edge is a commercial distribution of faasd with additional features and higher limits.
5664

57-
[Deploy faasd CE](https://github.com/openfaas/faasd/)
65+
[Deploy faasd CE](/deployment/edge.md)
5866

5967
### OpenFaaS Edge
6068

@@ -70,13 +78,13 @@ This version is intended for resale as part of a wider solution, and to be deplo
7078

7179
Individual [GitHub Sponsors of OpenFaaS](https://github.com/sponsors/openfaas) (25 USD / mo and higher) can use OpenFaaS Edge for personal use.
7280

73-
[Deploy OpenFaaS Edge](https://github.com/openfaas/faasd?tab=readme-ov-file#deploy-openfaas-edge-commercial-distribution-of-faasd)
81+
[Deploy OpenFaaS Edge](/deployment/edge.md)
7482

7583
## OpenShift - 3.x / 4.x
7684

7785
[OpenShift](https://www.redhat.com/en/technologies/cloud-computing/openshift) is a variant of Kubernetes produced by Red Hat.
7886

79-
You can deploy to OpenShift using the standard Helm chart as per the Kubernetes instructions, or with <a href="https://arkade.dev/">arkade</a>.
87+
You can deploy to OpenShift using the standard Helm chart as per the Kubernetes instructions. Typically OpenShift assigns random user IDs to each namespace, you can set these in the values.yaml file for the Helm chart once you have created the `openfaas` and `openfaas-fn` namespaces.
8088

8189
[Deploy to OpenShift](/deployment/openshift/)
8290

docs/deployment/edge.md

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
## OpenFaaS Edge
2+
3+
OpenFaaS Edge (aka faasd-pro) is the commercial distribution of our faasd project.
4+
5+
faasd takes the core OpenFaaS components, and packages them for use on a single host, without the cost and complexity of Kubernetes. It is distributed as a single binary, and runs as a systemd service. It can manage both functions, and a set of stateful services such as databases, messages brokers, monitoring tools, and custom agents.
6+
7+
Kubernetes can be a complex system to install and manage, needing many add-on components to be installed, configured and maintained over time. Each version of Kubernetes can introduce breaking changes. faasd presents a simpler alternative, where clustering and scaling are traded-off in return for a stable system, that can be deployed as an appliance and largely left alone.
8+
9+
faasd combines the following battle-tested components from OpenFaaS and Kubernetes:
10+
11+
* The Core Components of OpenFaaS - the gateway, the queue-worker, Prometheus monitoring
12+
* [containerd](https://containerd.io/) - the container runtime used in Kubernetes
13+
* [Container Networking Interface (CNI)](https://github.com/containernetworking/cni) - the networking interface used in Kubernetes
14+
15+
Minimum system requirements:
16+
17+
* *x86_64* or *64-bit Arm* CPU architecture
18+
* 512MB-1GB RAM (1GB recommended)
19+
* 2-4 vCPU
20+
* 10-25GB disk space
21+
* The Raspberry Pi 3, 4 & 5 are *also supported*
22+
23+
## Getting started (faasd CE or faasd-pro)
24+
25+
If you want to use faasd for non-commercial, personal use, faasd CE is available for you for free. If you need to use faasd at work, on work time, for a commercial product or service, or for an end-client, then you will need to purchase a license for OpenFaaS Edge (faasd-pro). Up to 15 functions are supported, including private registries and a single namespace.
26+
27+
If you need to use faasd for commercial use, you can evaluate a single installation of faasd CE for a period of 60 days. After that time, you will need to purchase a license for OpenFaaS Edge (faasd-pro).
28+
29+
* Upgraded Pro components from OpenFaaS Standard: Gateway, Cron Connector, JetStream Queue Worker and Classic Scale to Zero
30+
* Deploy up to 250 functions per installation*
31+
* Configure private DNS servers
32+
* Airgap-friendly with installation bundled in an OCI image or RPM package
33+
* Detailed RAM/CPU metrics for stateful containers, and functions, including Out Of Memory (OOM) events
34+
* Multiple namespace support
35+
* Network policies/segmentation to secure multi-tenant environments
36+
37+
`*` The number of functions is tied to your license, with a maximum of 250 functions per installation.
38+
39+
This version is intended for resale as part of a wider solution, and to be deployed both into industrial and on-premises environments.
40+
41+
## Documentation and handbook
42+
43+
For either edition, the complete handbook for faasd "Serverless For Everyone Else" is available [in the OpenFaaS Store](https://store.openfaas.com/l/serverless-for-everyone-else?layout=profile). It contains complete examples for deploying faasd, building functions in Node.js, setting up TLS and custom domains, monitoring, background jobs, and cron schedules.
44+
45+
<a href="https://openfaas.gumroad.com/l/serverless-for-everyone-else">
46+
<img src="https://www.alexellis.io/serverless.png" width="40%"></a>
47+
48+
49+
Any examples of functions on the blog or in the documentation for OpenFaaS on Kubernetes, will generally work with faasd without modification.
50+
51+
Additional topics covered by the handbook:
52+
53+
* Should you deploy to a VPS or Raspberry Pi?
54+
* Deploying your server with bash, cloud-init or terraform
55+
* Using a private container registry
56+
* Finding functions in the store
57+
* Building your first function with Node.js
58+
* Using environment variables for configuration
59+
* Using secrets from functions, and enabling authentication tokens
60+
* Customising templates
61+
* Monitoring your functions with Grafana and Prometheus
62+
* Scheduling invocations and background jobs
63+
* Tuning timeouts, parallelism, running tasks in the background
64+
* Adding TLS to faasd and custom domains for functions
65+
* Self-hosting on your Raspberry Pi
66+
* Adding a database for storage with InfluxDB and Postgresql
67+
* Troubleshooting and logs
68+
* CI/CD with GitHub Actions and multi-arch
69+
* Taking things further, community and case-studies
70+
71+
## Prerequisites
72+
73+
The quickest and easiest option for trying out faasd is to use a Linux VM from a cloud provider. You can typically create these in a minute or two, and then delete them when you're finished.
74+
75+
If you want to try out faasd on your Mac or Windows machine, then we recommend [Multipass](https://multipass.run/) by Canonical. Multipass is a tool that allows you to create a Linux VM on your Mac or Windows machine.
76+
77+
faasd must not be co-located with Docker, since they both make use of containerd, iptables and CNI, and will clash with one-another. It is designed to be an appliance, and have sole tenancy of any host.
78+
79+
Images should always be built on another host, and pushed to a registry that faasd can subsequently pull from.
80+
81+
A utility script is provided for either version, which can also be run via cloud-init for automated and production deployments.
82+
83+
## OpenFaaS Edge/faasd-pro (commercial use)
84+
85+
Everything required for faasd-pro is packaged in an container image, which makes for easy off-line installation. An RPM package is also available for RHEL-like Operating Systems.
86+
87+
```bash
88+
curl -sLSf \
89+
https://raw.githubusercontent.com/openfaas/faasd/refs/heads/master/hack/install-edge.sh \
90+
-o install-edge.sh && \
91+
chmod +x install-edge.sh
92+
sudo -E ./install-edge.sh
93+
```
94+
95+
*For an offline installation*
96+
97+
Copy the OCI bundle and the install-edge.sh script to the remote server.
98+
99+
Then mirror the various images from docker-compose.yaml into your private registry, and update the references from i.e. `image: ghcr.io/openfaasltd/gateway` to the equivalents in your registry.
100+
101+
If your system is unable to install apt, yum, or pacman packages, due to limited network access, then set the `SKIP_OS` environment to 1. The list of packages is available in the `install_required_packages` section of the script.
102+
103+
## faasd CE (non-commercial use only)
104+
105+
faasd CE supports 15 functions and needs a computer with a stable Internet connection to run. There are restrictions on commercial use, but [individuals](EULA.md) can use it for free for personal, non-commercial use.
106+
107+
```bash
108+
git clone https://github.com/openfaas/faasd --depth=1
109+
cd faasd
110+
111+
./hack/install.sh
112+
```
113+
114+
## Video overview
115+
116+
Watch the presentation from KubeCon, where faasd was first announced:
117+
118+
[![Thumbnail](https://img.youtube.com/vi/ZnZJXI377ak/hqdefault.jpg)](https://www.youtube.com/watch?v=ZnZJXI377ak)
119+
120+
[Meet faasd. Look Ma’ No Kubernetes! - Serverless Summit](https://www.youtube.com/watch?v=ZnZJXI377ak)
121+
122+
An additional training video and walkthrough is available via the [Serverless For Everyone Else](https://store.openfaas.com/l/serverless-for-everyone-else?layout=profile) handbook package.

docs/deployment/faasd.md

Lines changed: 0 additions & 66 deletions
This file was deleted.

docs/deployment/pro.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,3 +229,56 @@ Identity and Access Management (IAM) and Single-Sign On (SSO) are closely relate
229229

230230
* [Identity and Access Management (IAM)](/openfaas-pro/iam/overview)
231231
* [Single-Sign On (SSO)](/openfaas-pro/sso/overview)
232+
233+
## A note on upgrading from established OpenFaaS CE installations
234+
235+
For a smooth upgrade experience, we recommend that you test the initial upgrade in a temporary or pre-production environment before rolling out to production.
236+
237+
During the installation of OpenFaaS Standard/Enterprise, the operator and Function Custom Resource Definitions (CRDs) will be enabled. On start-up, the operator will create `Function` Custom Resources for each existing function, and then delete the original Deployments and Services.
238+
239+
Migrated functions contain an OwnerReference that allows the original Deployment and Service to tied to its Function CR. This is a abbreviated example of a migrated Deployment for the `env` function:
240+
241+
```diff
242+
apiVersion: apps/v1
243+
kind: Deployment
244+
metadata:
245+
name: env
246+
namespace: openfaas-fn
247+
+ ownerReferences:
248+
+ - apiVersion: openfaas.com/v1
249+
+ controller: true
250+
+ kind: Function
251+
+ name: env
252+
```
253+
254+
Whilst the original non-CRD mode used in OpenFaaS CE is still available in OpenFaaS Standard/Enterprise, it should be considered deprecated and will be removed in a future version of OpenFaaS.
255+
256+
The only reason to use the old controller mode, without the operator and CRDs, is if you need to bypass the migration of existing functions, or have some other code set up that modifies the Deployments and Services created by OpenFaaS.
257+
258+
To bypass the migration, you can create a ConfigMap in the openfaas namespace with the following content:
259+
260+
```bash
261+
kubectl create configmap -n openfaas \
262+
openfaas-operator-migrated \
263+
--from-literal migrated-functions=0 \
264+
--from-literal migrated-at=2025-02-21
265+
```
266+
267+
Then in your values.yaml file for the openfaas chart, set the following:
268+
269+
```yaml
270+
operator:
271+
create: false
272+
```
273+
274+
When you upgrade to OpenFaaS Standard/Enterprise, the controller mode will be used.
275+
276+
At a later date, you can trigger a migration to the Operator and CRDs by deleting the ConfigMap and restarting the gateway:
277+
278+
```bash
279+
kubectl delete configmap -n openfaas openfaas-operator-migrated
280+
281+
kubectl rollout restart deployment -n openfaas
282+
```
283+
284+
If you run into any issues, or have questions, you can email the team via the support inbox.

mkdocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ nav:
117117
- Deployment overview: deployment.md
118118
- OpenFaaS CE: ./deployment/kubernetes.md
119119
- OpenFaaS Pro: ./deployment/pro.md
120-
- faasd: ./deployment/faasd.md
120+
- OpenFaaS Edge: ./deployment/edge.md
121121
- OpenShift: ./deployment/openshift.md
122122
- Troubleshooting: ./deployment/troubleshooting.md
123123
- CLI:

0 commit comments

Comments
 (0)