message: |
# Get the faas-cli from one of following sources:
# package manager:
brew install faas-cli
#
# script:
curl -sLS https://cli.openfaas.com | sh
#
# You can now log into your gateway:
------
export OPENFAAS_URL=http://localhost:8080
limactl shell faasd sudo cat /var/lib/faasd/secrets/basic-auth-password | faas-cli login -u admin --password-stdin
------
#
# Once logged in, you can deploy your first function
------
faas-cli store deploy NodeInfo
------
minimumLimaVersion: 2.0.0
base: template:_images/ubuntu-lts
mounts: []
containerd:
system: false
user: false
provision:
- mode: user
script: |
#!/bin/sh
curl -sfL https://raw.githubusercontent.com/openfaas/faasd/master/hack/install.sh | bash -s -
probes:
- script: |
#!/bin/bash
set -eux -o pipefail
if ! timeout 30s bash -c 'while [[ "$(curl -s -o /dev/null -w ''%{http_code}'' http://localhost:8080/healthz)" != "200" ]]; do sleep 5; done'; then
echo >&2 "faasd is not running yet"
exit 1
fi
hint: |
The faasd service is not yet running.
Run "limactl shell faasd sudo journalctl -u faasd" to check the log.
If that is still empty, check the bottom of the log at "/var/log/cloud-init-output.log".