Note that if you want to develop Faasm and make changes, you need to run through the setup in the development docs.
ContainersFaasm runs a few different containers as defined in docker-compose.yml. The most important are:
cpp
- used to compile and upload C/C++ functions (see the cpp
repo).
python
- used to compile the CPython runtime and libraries, and upload Python functions (see the python
repo).
upload
- the server that receives all function, state and shared file uploads.
worker
- one or more instances of the Faasm runtime that execute functions.
minio
- Minio instance that holds uploaded functions and shared files.
redis
- Redis instance that holds internal scheduler state, and state shared between functions.
nginx
- NGINX instance that load-balances requests between multiple workers.
Faasm generates machine code for all WebAssembly it needs to run (e.g. C/C++ functions, CPython, Python C-extensions). This, along with other local development artifacts, is stored in the dev
dir at the root of your local checkout.
All Faasm functionality is accessible through Python tasks with Invoke. In order to install all the dependencies, make sure you always have an active python virtual enviornment:
then, you can do the following:
# List all commands inv -l # List all commands in the k8s namespace inv -l wast # Show help for a given command inv -h wast.decompile # Chain commands inv wast runFaasmctl
Faasm uses faasmctl
to interact with a running Faasm cluster.
faasmctl
is installed automatically in the virtual environment. In order to use it, you need to set an environment variable pointing to the cluster’s INI file:
export FAASM_INI_FILE=./faasm.ini
for more information on faasmctl
, or details of its inner-workings, check the corresponding docs.
To start a local deployment, you can run:
Writing and deploying functionsSee the language-specific docs:
FlushingFaasm does a lot of caching, so if you want to update a function, you must flush the system before invoking it again. This is done using the flush
command. Each language-specific container has its own way of flushing (e.g. inv func.flush
in the cpp
container), but you can also do it from outside all containers with faasmctl
:
The process for updating and invoking an updated function is:
Modify and recompile the function
Upload the function
Flush
Invoke function and see updated version
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4