A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://faasm.readthedocs.io/en/latest/source/getting_started.html below:

Website Navigation


Getting started — Faasm documentation

Getting started

Note that if you want to develop Faasm and make changes, you need to run through the setup in the development docs.

Containers

Faasm runs a few different containers as defined in docker-compose.yml. The most important are:

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.

Python Virtual Environment

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 run
Faasmctl

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.

Local cluster

To start a local deployment, you can run:

Writing and deploying functions

See the language-specific docs:

Flushing

Faasm 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:


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