Develop and deploy new serverless applications are quite simple. Break your solution into several separate components, and then, break it again into several functions (or actions). However, there are quite a few features that require to use other programming languages or even using opensource services (such as ImageMagick), and your serverless platform does not have a native support. In this case, you need to use a Docker container to build your function.
Learn how to use Apache OpenWhisk and OpenFaaS using Docker, Docker Swarm, and Kubernetes.
To configure your local environment, and even, to deploy a function you need to download and install Docker Desktop.
Download and install IBM Cloud CLI and IBM Cloud Functions CLI to build your functions on IBM Cloud platform. If you want to use the standard Apache OpenWhisk CLI, you can access the link and download the wsk-cli
.
To install and configure OpenFaaS, you need to install Docker in your local machine.
curl -sSL https://raw.githubusercontent.com/openfaas/faas/master/docker-compose.yml | grep image | awk -F " " '{print $NF}' | xargs -L1 docker pull
Setup a single-node cluster.
docker swarm init
Create an account on Docker Hub and log in.
docker login
Download and install OpenFaaS CLI.
curl -sL cli.openfaas.com | sudo sh
Follow both samples in this repository:
MIT License
Copyright (c) 2018 Victor Kazuyuki Shinya