OpenFaaS

So, what is OpenFaas? Well, according to the openfaas site it, in a nutshell, is

Serverless Functions Made Simple for Docker and Kubernetes

Alright, you have my attention.

Let’s dive in and take a look around.

Luckily, founder of the OpenFaaS project Alex Ellis has already provided an extremely helpful guide to getting OpenFaas up and running on minikube.

One minor thing I noticed after walking through the guide is that it doesn’t explicitly mention where to find the UI if you are so inclined so I thought I would leave it here.

  1. List out the services running in minikube minikube service list

    This should output something like:

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    
     |-------------|------------------|-----------------------------|
     |  NAMESPACE  |       NAME       |             URL             |
     |-------------|------------------|-----------------------------|
     | default     | kubernetes       | No node port                |
     | kube-system | kube-dns         | No node port                |
     | kube-system | tiller-deploy    | No node port                |
     | openfaas    | alertmanager     | No node port                |
     | openfaas    | gateway          | No node port                |
     | openfaas    | gateway-external | http://192.168.99.101:31112 |
     | openfaas    | nats             | No node port                |
     | openfaas    | prometheus       | No node port                |
     |-------------|------------------|-----------------------------|
    
  2. Visit the gateway-external URL and provide the username and password you established earlier in the guide. If you are following along exactly this will be admin for the username and the value of echo $PASSWORD for the password.

Now that you are in, let’s deploy a new function to generate random ascii art cows.

  1. Click “Deploy New Function”

  2. In the modal that pops up, search for cows.

  3. ASCII Cows should be one of, if not the only, function available.

  4. Select the function and click Deploy.

Select the “cows” function in the left panel and note the “Status” field in the right panel. Once the status is “Ready” click “INVOKE”.

1
2
3
4
5
6
   /---------o*o
  / |      ||
 *  ||-----||
    ^^     ^^
Cow that was captured
  by head-shrinkers

Now, time to deploy some custom functions…