A next generation open source platform as a service (PaaS)
Clone or download
Pull request Compare This branch is 5011 commits behind flynn:master.
titanous Merge pull request #283 from flynn/release-system
script: Wait for CloudFront invalidation in release-flynn
Latest commit 7f3f924 Oct 6, 2014
Failed to load latest commit information.
Godeps host: Use a custom libvirt network Sep 22, 2014
appliance appliance/postgresql: Disable SSL renegotiation Oct 4, 2014
blobstore all: Fix build order Aug 17, 2014
bootstrap bootstrap: Don't rely on DNS when waiting for the controller route Sep 14, 2014
cli Merge pull request #214 from chinamerp/fix_bug_150 Sep 22, 2014
controller Merge pull request #254 from flynn/flynn-host-cli-cluster Sep 25, 2014
dashboard dashboard/app: Show 404 message for app view Oct 3, 2014
demo Vagrantfiles: Add version constraint to force updates Aug 17, 2014
discoverd discoverd,router: Fix etcd fullsync Sep 3, 2014
gitreceived all: README updates Aug 11, 2014
host host: Volume mounting bug fix in docker_backend.go. Sep 27, 2014
pinkerton all: README updates Aug 11, 2014
pkg controller: Move parseJobID into cluster package Sep 25, 2014
receiver receiver: Only append ENV dir if non-empty Sep 24, 2014
router controller,router: Add timestamps to HTTP logs Sep 23, 2014
script script: Wait for CloudFront invalidation in release-flynn Oct 6, 2014
sdutil sdutil: Support colons in register command. Sep 25, 2014
slugbuilder slugbuilder: Fix env_dir when running as slugbuilder user Sep 24, 2014
slugrunner all: Fix build order Aug 17, 2014
taffy all: Change from ubuntu to ubuntu-deboostrap image Aug 10, 2014
test appliance/postgresql: Disable SSL renegotiation Oct 4, 2014
util util/packer: Set DEBIAN_FRONTEND=noninteractive Sep 29, 2014
website website: Remove dangling "and" Sep 14, 2014
.gitignore all: Fix build order Aug 17, 2014
.travis.yml travis: Reduce test verbosity Aug 31, 2014
CONTRIBUTING.md README: Remove sponsorship link Sep 12, 2014
LICENSE all: Remove duplicate LICENSE files Aug 2, 2014
MAINTAINERS all: Remove redundant MAINTAINERS files Aug 2, 2014
README.md README: Clarify etcd discovery token Oct 5, 2014
Tupfile.ini all: Replace Makefiles with Tupfiles, update .gitignores Aug 3, 2014
Tuprules.tup all: Fix build order Aug 17, 2014
Vagrantfile Vagrantfiles: Add version constraint to force updates Aug 17, 2014
dashboard.gemspec dashboard: Fix gemspec require_paths Sep 24, 2014


Welcome to Flynn Build Status

Flynn is a next generation open source Platform as a Service (PaaS).

Unlike most PaaS's, Flynn can run stateful services as well as twelve-factor apps. This includes built-in database appliances (just Postgres to start). Flynn is modular so users can easily modify, upgrade, and replace components.

Flynn components are divided into two layers.

Layer 0 is a low-level resource framework inspired by the Google Omega paper. Layer 0 also includes service discovery.

Layer 1 is a set of higher level components that makes it easy to deploy and maintain applications and databases.

You can learn more about the project at the Flynn website.


Flynn is in active development and currently unsuitable for production use.

Users are encouraged to experiment with Flynn but should assume there are stability, security, and performance weaknesses throughout the project. This warning will be removed when Flynn is ready for production use.

Please report bugs as issues on this repository after searching to see if anyone has already reported the issue.

Getting Started

We have a web dashboard for launching Flynn clusters on your Amazon Web Services account.

You can also download a demo environment for your local machine or learn about the components below.

Trying it out

With a Flynn cluster running and the flynn tool installed and configured, the first thing you'll want to do is add your SSH key so that you can deploy applications:

flynn key add

After adding your ssh key, you can deploy a new application:

git clone https://github.com/flynn/nodejs-flynn-example
cd nodejs-flynn-example
flynn create example
git push flynn master


By default there will be one process running, add some more web processes using the scale command:

flynn scale web=3

Visit the application in your browser or with curl:

curl http://example.demo.localflynn.com

Repeated requests should show that the requests are load balanced across the running processes.


flynn ps will show the running processes:

$ flynn ps
ID                                             TYPE
e4cffae4ce2b-8cb1212f582f498eaed467fede768d6f  web
e4cffae4ce2b-da9c86b1e9e743f2acd5793b151dcf99  web
e4cffae4ce2b-1b17dd7be8e44ca1a76259a7bca244e1  web

To get the log from a process, use flynn log:

$ flynn log e4cffae4ce2b-8cb1212f582f498eaed467fede768d6f
Listening on 55007


An interactive one-off process may be spawned in a container:

flynn run bash

Manual Ubuntu Deployment

Currently only Ubuntu 14.04 amd64 is supported for manual installation, but this is a temporary packaging limitation, we have no actual dependency on Ubuntu.

If you plan to run a multi-node cluster, you should boot at least 3 nodes to keep etcd efficient (see here for an explanation).

The first step is to install the flynn-host package and container images:

apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv BC79739C507A9B53BB1B0E7D820A5489998D827B
echo deb https://dl.flynn.io/ubuntu flynn main > /etc/apt/sources.list.d/flynn.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) flynn-host
flynn-release download /etc/flynn/version.json

Do this on every host that you want to be in the Flynn cluster.

The ports 80, 443, and 2222 must be open externally on the firewalls for all nodes in the cluster, and the nodes need to be able to communicate with each other internally on all ports.

The next step is to configure a Layer 0 cluster. The host daemon finds other members of the cluster using the etcd, which needs to be bootstrapped.

If you are starting more than one node, the etcd cluster should be configured using a discovery token. Get a token from here and add a line like this to /etc/init/flynn-host.conf on every host:

env ETCD_DISCOVERY=https://discovery.etcd.io/00000000000000000000000000000000

Note: a new token must be used every time you restart all nodes in the cluster.

Then, start the daemon by running start flynn-host.

After you have a running Layer 0 cluster, bootstrap Layer 1 with flynn-bootstrap. You'll need a domain name with DNS A records pointing to every node IP address and a second, wildcard domain CNAME to the cluster domain.


demo.localflynn.com.    A
*.demo.localflynn.com.  CNAME  demo.localflynn.com.

CONTROLLER_DOMAIN and DEFAULT_ROUTE_DOMAIN should be set to the two respective domains.

  CONTROLLER_DOMAIN=demo.localflynn.com \
  DEFAULT_ROUTE_DOMAIN=demo.localflynn.com \
  flynn-bootstrap /etc/flynn/bootstrap-manifest.json

The Layer 1 bootstrapper will get all necessary services running using the Layer 0 API. The final log line will contain configuration that may be used with the command-line interface.

If you try these instructions and run into issues, please open an issue or pull request.


Layer 0

host The Flynn host service, manages containers on each host and provides the scheduling framework.

discoverd The Flynn service discovery system.

Layer 1

bootstrap Bootstraps Flynn Layer 1 from a JSON manifest using the Layer 0 API.

controller Provides management and scheduling of applications running on Flynn via an HTTP API.

gitreceived An SSH server made specifically for accepting git pushes.

cli Command-line Flynn HTTP API client.

receiver Flynn's git deployer.

slugbuilder Turns a tarball into a Heroku-style "slug" using buildpacks.

slugrunner Runs Heroku-like slugs.

router Flynn's TCP/HTTP router/load balancer.

blobstore A simple, fast HTTP file service.

sdutil Service discovery utility for discoverd.

postgresql Flynn PostgreSQL database appliance.

taffy Taffy pulls git repos and deploys them to Flynn.


We welcome and encourage community contributions to Flynn.

Since the project is still unstable, there are specific priorities for development. Pull requests that do not address these priorities will not be accepted until Flynn is production ready.

Please familiarize yourself with the Contribution Guidelines and Project Roadmap before contributing.

There are many ways to help Flynn besides contributing code:

  • Find bugs and file issues.
  • Improve the documentation and website.

Learn more at flynn.io.

Flynn is a trademark of Prime Directive, Inc.