You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/deployment/docker-swarm.md
+36-2Lines changed: 36 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,25 @@
2
2
3
3
> 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.
4
4
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
6
24
7
25
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.
8
26
@@ -16,7 +34,7 @@ If you have more than one IP address you may need to pass a string like `--adver
16
34
17
35
Take a note of the join token
18
36
19
-
## 1.1 Join any workers you need
37
+
## 1.2 Join any workers you need
20
38
21
39
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.
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.
40
58
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
+
41
75
### 2.1 Store your admin credentials
42
76
43
77
The default configuration will create a username and password combination for you:
Copy file name to clipboardExpand all lines: docs/deployment/kubernetes.md
+39-9Lines changed: 39 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,6 +25,24 @@ A guide is available for configuring minikube here:
25
25
--user="$(gcloud config get-value core/account)"
26
26
```
27
27
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
+
28
46
### Pick helm or YAML files for deployment (A or B)
29
47
30
48
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
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.
43
60
@@ -74,6 +91,27 @@ This step assumes you are running `kubectl` on a master host.
74
91
!!! note
75
92
For deploying on a cloud that supports Kubernetes *LoadBalancers* you may also want to apply the configuration in: `cloud/lb.yml`.
76
93
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:
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 functionstorein the gateway UI or via `faas-cli store list --yaml https://raw.githubusercontent.com/openfaas/store/master/store-armhf.json`
114
+
77
115
#### Use OpenFaaS
78
116
79
117
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
100
138
101
139
#### Use the CLI
102
140
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
-
111
141
* Then clone some samples to deploy on your cluster.
0 commit comments