| 1 | |
| 2 | |
| 3 | |
| 4 | |
| 5 | |
| 6 | message: | |
| 7 | # Get the faas-cli from one of following sources: |
| 8 | # package manager: |
| 9 | brew install faas-cli |
| 10 | # |
| 11 | # script: |
| 12 | curl -sLS https://cli.openfaas.com | sh |
| 13 | # |
| 14 | # You can now log into your gateway: |
| 15 | ------ |
| 16 | export OPENFAAS_URL=http://localhost:8080 |
| 17 | limactl shell faasd sudo cat /var/lib/faasd/secrets/basic-auth-password | faas-cli login -u admin --password-stdin |
| 18 | ------ |
| 19 | # |
| 20 | # Once logged in, you can deploy your first function |
| 21 | ------ |
| 22 | faas-cli store deploy NodeInfo |
| 23 | ------ |
| 24 | |
| 25 | minimumLimaVersion: 2.0.0 |
| 26 | |
| 27 | base: template:_images/ubuntu-lts |
| 28 | |
| 29 | |
| 30 | mounts: [] |
| 31 | |
| 32 | |
| 33 | containerd: |
| 34 | system: false |
| 35 | user: false |
| 36 | |
| 37 | provision: |
| 38 | - mode: user |
| 39 | script: | |
| 40 | #!/bin/sh |
| 41 | curl -sfL https://raw.githubusercontent.com/openfaas/faasd/master/hack/install.sh | bash -s - |
| 42 | |
| 43 | probes: |
| 44 | - script: | |
| 45 | #!/bin/bash |
| 46 | set -eux -o pipefail |
| 47 | if ! timeout 30s bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:8080/healthz)" != "200" ]]; do sleep 5; done'; then |
| 48 | echo >&2 "faasd is not running yet" |
| 49 | exit 1 |
| 50 | fi |
| 51 | hint: | |
| 52 | The faasd service is not yet running. |
| 53 | Run "limactl shell faasd sudo journalctl -u faasd" to check the log. |
| 54 | If that is still empty, check the bottom of the log at "/var/log/cloud-init-output.log". |