Open faas (faas cli) Environment - AngelAngelopoulos/ERPNext-CamundaBPM-Integration GitHub Wiki
Note: The complete documentation can be consulted on its official website.
Linux or macOS
Utility script with curl:
$ curl -sSL https://cli.openfaas.com | sudo -E sh
The flag -E allows for any http_proxy environmental variables to be passed through to the installation bash script.
Non-root with curl downloads the binary into your current directory and will then print installation instructions:
$ curl -sSL https://cli.openfaas.com | sh
Via brew:
$ brew install faas-cli
Note: The brew release may not run the latest minor release but is updated regularly.
Windows
In PowerShell:
$version = (Invoke-WebRequest "https://api.github.com/repos/openfaas/faas-cli/releases/latest" | ConvertFrom-Json)[0].tag_name
(New-Object System.Net.WebClient).DownloadFile("https://github.com/openfaas/faas-cli/releases/download/$version/faas-cli.exe", "faas-cli.exe")
In case the above command does not work properly to install the faas-cli on Windows go to Releases and download the latest faas-cli.exe.
Important: The faas-cli.exe file must be located in the folder where the function will be created.
For more information about faas-cli you can consult the following site.
Docker Hub
To use the OpenFaas functions it is necessary to have an account in Docker Hub which is quite essential to create on the site. The docker hub is where the images of the functions will be stored. Username and password will be used later.
Docker desktop configuration
- Through the Docker dashboard (What is included when Docker is installed on the computer) you will have to log in with the same account that you are using in Docker Hub.
- In the settings tab go to the Docker Engine section and change the buildkit to false. Then apply and restart.
Login to Docker Hub account from console
Login to the Docker Hub account from the terminal is also necessary. This is done with the following command:
docker login -u username -p password
Install OpenFaas via Kubernetes
There are several ways to install OpenFaas but the simplest is through Kuernetes which can be provided through various platforms, in this case we will explain how to implement it through the Civo platform, but there are other ways and other platforms.
-
First you have to go to the site and create an account and wait for the access request to be accepted.
-
Once inside the dashboard you have to go to the Kubernetes section and click on "Create new cluster".
-
The following screen will appear here the cluster is configured. You choose a name, the number of instances and the network. The size is also chosen (according to the needs) and the OpenFaas image is chosen.
- You can see how the cluster has been created.
- If it is displayed you can see your information and if you go to the installed applications tab you can see OpenFaas
- If it is displayed you can see certain information that will be used to access the OpenFaas dashboard such as the gateway password and the port number.
- To access the dashboard you have to go to API endpoint found in the information section and change the last numbers to the OpenFaas port number. Something like the following will appear, it is only a matter of placing the gateway password (the user is admin by default).
- Finally OpenFaas will be configured