Skip to content

Commit 49179c4

Browse files
committed
Add instructions for ARM/RPi into main guides
- Fixes: #106 Signed-off-by: Alex Ellis (VMware) <[email protected]>
1 parent 10095b1 commit 49179c4

File tree

3 files changed

+79
-12
lines changed

3 files changed

+79
-12
lines changed

docs/deployment/docker-swarm.md

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,25 @@
22

33
> Note: If you need to use `sudo` to access the `docker` CLI then you should prefix this behind any shell scripts or CLIs used in this guide or any related tutorials.
44
5-
## 1.0 Initialize Swarm Mode
5+
## 1.0 Install the `faas-cli`
6+
7+
You can install the OpenFaaS CLI using `brew` or a `curl` script.
8+
9+
* via `brew`:
10+
11+
```bash
12+
brew install faas-cli
13+
```
14+
15+
* via `curl`:
16+
17+
```bash
18+
$ curl -sL https://cli.openfaas.com | sudo sh
19+
```
20+
21+
If you run the script as a normal non-root user then the script will be downloaded to the current folder.
22+
23+
## 1.1 Initialize Swarm Mode
624

725
You can create a single-host Docker Swarm on your laptop with a single command. You don't need any additional software to Docker 17.06 or greater. You can also run these commands on a Linux VM or cloud host.
826

@@ -16,7 +34,7 @@ If you have more than one IP address you may need to pass a string like `--adver
1634

1735
Take a note of the join token
1836

19-
## 1.1 Join any workers you need
37+
## 1.2 Join any workers you need
2038

2139
Log into your worker node and type in the output from `docker swarm init` on the master. If you've lost this info then type in `docker swarm join-token worker` and then enter that on the worker.
2240

@@ -38,6 +56,22 @@ $ git clone https://github.com/openfaas/faas && \
3856
!!! info
3957
As of OpenFaaS 0.8.6 basic authentication will be enabled by default when running ./deploy\_stack.sh. If you need to disable it pass the flag `--no-auth` to the ./deploy_stack.sh script as above.
4058

59+
### 2.0.1 Raspberry Pi / 32-bit ARM
60+
61+
> For a complete tutorial on setting up OpenFaaS for Raspberry Pi / 32-bit ARM using Docker Swarm see the following blog post from Alex Ellis: [Your Serverless Raspberry Pi cluster with Docker](https://blog.alexellis.io/your-serverless-raspberry-pi-cluster/).
62+
63+
If you are using Raspberry Pi or 32-bit ARM devices then please run the following instead:
64+
65+
```bash
66+
$ git clone https://github.com/openfaas/faas && \
67+
cd faas && \
68+
./deploy_stack.armhf.sh
69+
```
70+
71+
When creating new functions please use the templates with a suffix of `-armhf` such as `go-armhf` and `python-armhf` to ensure you get the correct versions for your devices.
72+
73+
> Note: you cannot deploy the sample functions to ARM devices, but you can use the function store in the gateway UI or via `faas-cli store list --yaml https://raw.githubusercontent.com/openfaas/store/master/store-armhf.json`
74+
4175
### 2.1 Store your admin credentials
4276

4377
The default configuration will create a username and password combination for you:

docs/deployment/kubernetes.md

Lines changed: 39 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,24 @@ A guide is available for configuring minikube here:
2525
--user="$(gcloud config get-value core/account)"
2626
```
2727

28+
### Install the `faas-cli`
29+
30+
You can install the OpenFaaS CLI using `brew` or a `curl` script.
31+
32+
* via `brew`:
33+
34+
```bash
35+
brew install faas-cli
36+
```
37+
38+
* via `curl`:
39+
40+
```bash
41+
$ curl -sL https://cli.openfaas.com | sudo sh
42+
```
43+
44+
If you run the script as a normal non-root user then the script will be downloaded to the current folder.
45+
2846
### Pick helm or YAML files for deployment (A or B)
2947

3048
It is recommended to use `helm` to install OpenFaaS so that you can configure your installation to suit your needs. This configuration is considered to be production-ready.
@@ -37,7 +55,6 @@ A Helm chart is provided in the `faas-netes` repository. Follow the link below t
3755

3856
* [OpenFaaS Helm chart](https://github.com/openfaas/faas-netes/blob/master/HELM.md)
3957

40-
4158
##### Tiller-less Helm install
4259
If you have issues using `helm` in a locked-down environment then you can still use the `helm template` command to generate a custom set of YAML to apply using `kubectl`. See the [Chart readme](https://github.com/openfaas/faas-netes/blob/master/chart/openfaas/README.md#deployment-with-helm-template) for detailed instructions.
4360

@@ -74,6 +91,27 @@ This step assumes you are running `kubectl` on a master host.
7491
!!! note
7592
For deploying on a cloud that supports Kubernetes *LoadBalancers* you may also want to apply the configuration in: `cloud/lb.yml`.
7693

94+
#### B. Deploy using kubectl/YAML (Raspberry Pi / 32-bit ARM)
95+
96+
> For a complete tutorial on setting up OpenFaaS for Raspberry Pi / 32-bit ARM using Kubernetes see the following blog post from Alex Ellis: [Serverless Kubernetes home-lab with your Raspberry Pis](https://blog.alexellis.io/serverless-kubernetes-on-raspberry-pi/).
97+
98+
For Raspberry Pi or 32-bit ARM devices please do the following:
99+
100+
```bash
101+
$ kubectl apply -f https://raw.githubusercontent.com/openfaas/faas-netes/master/namespaces.yml
102+
```
103+
104+
Now deploy OpenFaaS:
105+
106+
```bash
107+
$ cd faas-netes && \
108+
kubectl apply -f ./yaml_armhf
109+
```
110+
111+
When creating new functions please use the templates with a suffix of `-armhf` such as `go-armhf` and `python-armhf` to ensure you get the correct versions for your devices.
112+
113+
> Note: you cannot deploy the sample functions to ARM devices, but you can use the function store in the gateway UI or via `faas-cli store list --yaml https://raw.githubusercontent.com/openfaas/store/master/store-armhf.json`
114+
77115
#### Use OpenFaaS
78116

79117
After deploying OpenFaaS you can start using one of the guides or blog posts to create Serverless functions or test [community functions](https://github.com/openfaas/faas/blob/master/community.md).
@@ -100,14 +138,6 @@ There are currently no sample functions built into this stack, but we can deploy
100138
101139
#### Use the CLI
102140
103-
* Install the CLI
104-
105-
```bash
106-
$ curl -sL https://cli.openfaas.com | sudo sh
107-
```
108-
109-
If you like you can also run the script via a non-root user. Then the faas-cli binary is downloaded to the current working directory instead.
110-
111141
* Then clone some samples to deploy on your cluster.
112142
113143
```bash

docs/tutorials/featured.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
# Featured tutorials
22

3-
* OpenFaaS deployment guides for Kubernetes in the Cloud:
3+
* OpenFaaS deployment guides for Kubernetes
44
- [Amazon EKS](https://www.weave.works/blog/getting-started-with-openfaas-kubernetes-operator-on-eks)
55
- [Azure AKS](https://medium.com/@ericstoekl/deploying-openfaas-on-kubernetes-azure-aks-4eea99d0743f)
66
- [Google GKE](https://www.openfaas.com/blog/gke-multi-stage/)
7+
- [DigitalOcean Kubernetes Service](https://blog.alexellis.io/digitalocean-kubernetes-engine/)
8+
- [Kubernetes in Docker (kind)](https://blog.alexellis.io/be-kind-to-yourself/)
9+
- [minikube](https://medium.com/devopslinks/getting-started-with-openfaas-on-minikube-634502c7acdf)
710

811
* [Serverless: Databases with OpenFaaS and Mongo](https://blog.alexellis.io/serverless-databases-with-openfaas-and-mongo/)
912

0 commit comments

Comments
 (0)