File tree 1 file changed +52
-0
lines changed 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change
1
+ # Deploy faasd (which installs a bundled containerd).
2
+ #
3
+ # It can be accessed from the host by authenticating with faas-cli;
4
+ # the ports are already forwarded automatically by lima:
5
+ #
6
+ # Get the faas-cli:
7
+ # $ curl -sLS https://cli.openfaas.com | sh
8
+ #
9
+ # You can now log into your gateway:
10
+ # $ export OPENFAAS_URL=http://localhost:8080
11
+ # $ limactl shell faasd sudo cat /var/lib/faasd/secrets/basic-auth-password | faas-cli login -u admin --password-stdin
12
+ # $
13
+ # $ faas-cli store deploy NodeInfo
14
+ #
15
+ # Deployed. 200 OK.
16
+ # URL: http://localhost:8080/function/nodeinfo
17
+ #
18
+ # This example requires Lima v0.7.0 or later.
19
+
20
+ images :
21
+ # Image is set to focal (20.04 LTS) for long-term stability
22
+ - location : " https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img"
23
+ arch : " x86_64"
24
+ - location : " https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-arm64.img"
25
+ arch : " aarch64"
26
+
27
+ # Mounts are disabled in this example, but can be enabled optionally.
28
+ mounts : []
29
+
30
+ # containerd is installed by the faasd installer script, not by Lima, so the values are set to false here.
31
+ containerd :
32
+ system : false
33
+ user : false
34
+
35
+ provision :
36
+ - mode : system
37
+ script : |
38
+ #!/bin/sh
39
+ curl -sfL https://raw.githubusercontent.com/openfaas/faasd/master/hack/install.sh | sh -s -
40
+
41
+ probes :
42
+ - script : |
43
+ #!/bin/bash
44
+ set -eux -o pipefail
45
+ if ! timeout 30s bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:8080/healthz)" != "200" ]]; do sleep 5; done'; then
46
+ echo >&2 "faasd is not running yet"
47
+ exit 1
48
+ fi
49
+ hint : |
50
+ The faasd service is not yet running.
51
+ Run "limactl shell faasd sudo journalctl -u faasd" to check the log.
52
+ If that is still empty, check the bottom of the log at "/var/log/cloud-init-output.log".
You can’t perform that action at this time.
0 commit comments