• Stars
    star
    5,711
  • Rank 7,135 (Top 0.2 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created over 7 years ago
  • Updated about 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The container native, cloud agnostic serverless platform.

Fn Project

Quickstart  |  Tutorials  |  Docs  |  API  |  Operating  |  Flow  |  UI

CircleCI GoDoc Go Report Card

Welcome

Fn is an event-driven, open source, Functions-as-a-Service (FaaS) compute platform that you can run anywhere. Some of its key features:

  • Open Source
  • Native Docker: use any Docker container as your Function
  • Supports all languages
  • Run anywhere
    • Public, private and hybrid cloud
    • Import Lambda functions and run them anywhere
  • Easy to use for developers
  • Easy to manage for operators
  • Written in Go
  • Simple yet powerful extensibility

The fastest way to experience Fn is to follow the quickstart below, or you can jump right to our full documentation, API Docs, or hit us up in our Slack Community or Community Page!

Quickstart

Pre-requisites

  • Docker 17.10.0-ce or later installed and running
  • Docker Hub account (or other Docker-compliant registry) (Not required for local development)
  • Logged into Registry: ie docker login (Not required for local development)

Install CLI tool

The command line tool isn't required, but it makes things a lot easier. There are a few options to install it:

Option 1. Homebrew - macOS

If you're on a Mac and use Homebrew:

brew update && brew install fn

Option 2. Shell script - Linux and macOS

This one works on Linux and macOS (partially on Windows).

If you are running behind a proxy first set your http_proxy and https_proxy environment vars:

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

This will download a shell script and execute it. If the script asks for a password, that is because it invokes sudo.

Option 3. Install the Windows CLI

Install and run the Fn Client for Windows.

Option 4. Download the bin - Linux, macOS and Windows

Head over to our releases and download it.

Run Fn Server

First, start up an Fn server locally:

fn start

This will start Fn in single server mode, using an embedded database and message queue. You can find all the configuration options here. If you are on Windows, check here. If you are on a Linux system where the SELinux security policy is set to "Enforcing", such as Oracle Linux 7, check here.

Your First Function

Functions are small but powerful blocks of code that generally do one simple thing. Forget about monoliths when using functions, just focus on the task that you want the function to perform. Our CLI tool will help you get started quickly.

Let's create your function. You can use any runtime (ie go, node, java, python, etc.) hello will be the name of your function as well as create a directory called hello. You can name your function anything.

fn init --runtime go hello
cd hello

We need to create an "app" which acts as a top-level collection of functions and other elements:

fn create app myapp

Deploy your function:

fn deploy --app myapp --local

Note: --local flag will skip the push to remote container registry making local development faster

Now let's actually run your function using the invoke command:

fn invoke myapp hello

That's it! You just deployed and ran your first function! Try updating the function code in func.go (or .js, .java, etc.) then deploy it again to see the change.

Learn More

Get Help

Get Involved

Stay Informed

More Repositories

1

fdk-java

Java API and runtime for fn.
Java
141
star
2

docs

User documentation for the Fn Project.
Java
141
star
3

cli

CLI tool for fnproject.
Go
131
star
4

flow

Fn Flow Server
Go
129
star
5

tutorials

Fn tutorials ranging from getting started to more advanced topics.
JavaScript
126
star
6

ui

User interface for fn project.
JavaScript
89
star
7

fn-helm

Helm Chart for Fn
Smarty
55
star
8

fdk-python

Python Function Development Kit
Python
45
star
9

dockers

Docker base images for various programming languages.
HTML
34
star
10

fdk-go

Go language helper funcs for fn
Go
25
star
11

fdk-node

Experimental FDK for Node.js
JavaScript
22
star
12

hotwrap

Command wrapper that lets you run unix commands as functions
Go
22
star
13

lb

Fn loadbalancer
Go
17
star
14

fdk-rust

An experimental Function Development Kit for the Rust language
Rust
11
star
15

fdk-ruby

Ruby Function Developer Kit
Ruby
10
star
16

flow-lib-go

Workflow orchestration for your Go functions using Fn Flow
Go
9
star
17

fn-jrestless-example

Run JAX-RS applications on Fn using JRestless
Java
8
star
18

fn_go

Go
8
star
19

serverless-fn

Serverless Integration For Fn
JavaScript
8
star
20

fn-terraform

HCL
7
star
21

fn_java

Fn project Java binding
Shell
7
star
22

flowui

Experimental UI for visualising flows in real time.
JavaScript
7
star
23

fn_python

Python
6
star
24

flow-stages

Run a machine described in ASL (https://states-language.net/spec.html) as a Fn Flow function.
Java
6
star
25

deproxy

A wrapper around dep that enables private repos for vanity imports
Go
5
star
26

fdk-dotnet

This project contains an implementation of FDK for C# running on dotnet runtime.
C#
5
star
27

ext-auth

Authentication extension for Fn Project
Go
4
star
28

cloudevents-demo

Image processing application demo with CloudEvents and TensorFlow
Go
4
star
29

fn_js

JavaScript
4
star
30

ext-dns

DNS extension for fnproject.io
Go
3
star
31

fn-spring-cloud-function-example

Example project showing Spring Cloud Function support on Fn Project
Java
2
star
32

fdk-testkit

Compatibility validation tests suite for programming language-specific Fn development kits (FDK)
2
star
33

fn_ruby

Ruby
2
star
34

fn_elixir

Elixir
2
star
35

fn_php

PHP
2
star
36

fn-ext-example

Example for adding third party plugins to fn project server.
Go
1
star
37

ext-statsapi

Fn extension to extend the Fn API to provide statistical metrics
Go
1
star