Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ineat-openfaas-calculator
ineat-openfaas-get-movies
ineat-openfaas-post-movie
moviesDB_dump
.gitignore
readme.md

readme.md

OpenFaas on Docker Swarm Tutorial, article 2

This project contains source code of any functions described on the following link

Functions development with OpenFaas

How build and deploy ineat-openfaas-calculator

Enter you login/password with the following command :

cat ~/faas_pass.txt | faas-cli login -g http://CLUSTER_IP_ADDRESS:8080 -u admin --password-stdin

To build function, go to root of ineat-openfaas-calculator and enter :

faas-cli build -f ineat-openfaas-calculator.yml

To deploy :

faas-cli deploy -f ineat-openfaas-calculator.yml

Import Mongo Data Base

To follow the second part of the tutorial, you need a Mongo Data Base. This project contains a dump of my own data base. You can import with :

mongorestore -d moviesDB moviesDB_dump

How build and deploy ineat-openfaas-get-movies and ineat-openfaas-post-movie

Enter you login/password with the following command :

cat ~/faas_pass.txt | faas-cli login -g http://CLUSTER_IP_ADDRESS:8080 -u admin --password-stdin

To build and deploy function ineat-openfaas-get-movies, go to the root of corresponding folder and enter :

faas-cli build -f ineat-openfaas-get-movies.yml && faas-cli deploy -f ineat-openfaas-get-movies.yml

To build and deploy function ineat-openfaas-post-movie, go to the root of corresponding folder and enter :

faas-cli build -f ineat-openfaas-post-movie.yml && faas-cli deploy -f ineat-openfaas-post-movie.yml
You can’t perform that action at this time.