Skip to content

ganesshkumar/openfaas-identicon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

openfaas-identicon

OpenFaaS function to generation Identicons

This is a simple FaaS function inspired by Bart Fokker's post.

Prerequisite

  • Make sure you have deployed a FaaS stack to your cluster using the instructions on the FaaS repo.
  • Install faas-cli using brew install faas-cli or curl -sSL https://get.openfaas.com | sudo sh.

Usage

Create a new function

$ faas-cli new --lang go identicon

Clone this repo as the function

$ rm -rf identicon

$ git clone [email protected]:ganesshkumar/openfaas-identicon.git identicon

Installing the dependencies

$ cd identicon

$ dep ensure

# As of the build stage will throw an error when the vendor code(dependencies) doesn't comply gofmt
# So let's make sure our dependencies passes the gofmt check

$ gofmt -w vendor/*

$ cd ..

Build and deploy

$ faas-cli build -f identicon.yml

$ faas-cli deploy -f identicon.yml

Testing the function

$ curl localhost:8080/function/identicon --data "openfaas" > sample/openfaas.png

Sample image generated for openfaas

Releases

No releases published

Packages

No packages published

Languages