Rapid first few steps with Fn – open source project for serverless functions

Lucas Jellema

Project Fn is an open source project that provides a container native, poly-language, cloud agnostic (aka run on any cloud) serverless platform for running functions. Fn was launched during Oracle OpenWorld 2017. Fn is available on GitHub (https://github.com/fnproject/fn ) and provides all resources required to get started. In this article, I will just show you (and myself) how I went through the quick start steps and what it looked like on my laptop (Windows 10 with Vagrant and VirtualBox).

I simply get Fn up and running, create a first function that I then deploy and access through HTTP. I briefly show the APIs available on the Fn server and Fn UI application.


  1. Create VirtualBox VM with Debian and Docker (for me, Ubuntu 14 failed to run Fn; I created issue 437 for that) – this step is described in a different article
  2. Install Fn command line
  3. Install and run Fn server in the VM, as Docker container
  4. Create function hello
  5. Initialize new function and run it
  6. Deploy the new function (in its own Docker Container running inside the container running Fn server)
  7. Invoke the new function over http from the Host laptop
  8. Run the Fn UI application
  9. Inspect the Fn Server REST APIs

Connect into the Debian Virtual Machine – for me with vagrant ssh.

    Install Fn Command Line

    To install the Fn command line, I used this command:

    curl -LSs https://raw.githubusercontent.com/fnproject/cli/master/install | sh


    Install and run Fn server in the VM, as Docker container

    To run the Fn server, after installing the CLI, I just used

    fn start


    Fn Server is running.

    Create function hello

    As per the instructions in the quick start guide, I created a new directory hello with a text file hello.go:


    Note: I created these on the host laptop inside the directory that is mapped into the VM under /vagrant. So I can access the file inside the VM in /vagrant/hello.

    Initialize new function and run it


    and after a little while


    Deploy the new function

    (in its own Docker Container running inside the container running Fn server)



    Run function inside Debian VM:


    Invoke the new function over http from the Host laptop


    The IP address was assigned during the provisioning of the VM with Vagrant.

    Run the Fn UI application

    A UI application to inspect all Fn applications and functions can be installed and ran:



    And accessed from the host laptop:


    Note: for me it did not show the details for my new hello function.

    Inspect the Fn Server REST APIs

    Fn platform publishes REST APIs that can be used to programmatically learn more about applications and functions and also to manipulate those.


    Some examples:





      Getting started with Fn is pretty smooth. I got started and wrote this article in under an hour and a half. I am looking forward to doing much more with Fn – especially tying functions together using Fn Flow.


      Fn project home page: http://fnproject.io/

      Article to quickly provision VirtualBox Image with Debian and Docker: https://technology.amis.nl/2017/10/19/create-debian-vm-with-docker-host-using-vagrant-automatically-include-guest-additions/

      Fn quick start guide: https://github.com/fnproject/fn 

      Fn UI on GitHub: https://github.com/fnproject/ui 

      Fn API: http://petstore.swagger.io/?url=https://raw.githubusercontent.com/fnproject/fn/master/docs/swagger.yml

      Leave a Reply

      This site uses Akismet to reduce spam. Learn how your comment data is processed.

      Next Post

      Installing Minikube and Kubernetes on Windows 10

      Facebook0TwitterLinkedinQuick notes on the installaton of Minikube for trying out Kubernetes on my Windows 10 laptop (using VirtualBox –not Hyper-V) Following instructions in https://www.ibm.com/support/knowledgecenter/en/SS5PWC/minikube.html  Download Windows installer for MiniKube: https://github.com/kubernetes/minikube/releases Run installer After running the installer, open a command line window Download kubectl.exe curl -o kubectl.exe https://storage.googleapis.com/kubernetes-release/release/v1.8.0/bin/windows/amd64/kubectl.exe Copy downloaded file […]