This project contains source code of any functions described on the following link
Functions development with OpenFaas
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
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
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