<commit_before># Welcome to Flynn [![Build Status](https://travis-ci.org/flynn/flynn.svg?branch=master)](https://travis-ci.org/flynn/flynn)

[Flynn](https://flynn.io) is a next generation open source Platform as a Service
(PaaS).

Unlike most PaaS's, Flynn can run stateful services as well as [12
factor](http://12factor.net/) 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](http://eurosys2013.tudos.org/wp-content/uploads/2013/paper/Schwarzkopf.pdf)
paper. Layer 0 also includes [service discovery](/discoverd).

**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](https://flynn.io).

### Status

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](https://github.com/flynn/flynn/issues) after searching to see if
anyone has already reported the issue.

## Getting Started

We built a [tool](https://dashboard.flynn.io) for launching Flynn clusters on your
Amazon Web Services account [here](https://dashboard.flynn.io).

You can also download a [demo environment](/demo) 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:

```text
flynn key add
```

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

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

#### Scale

To access the application, add some web processes using the `scale`
command:

```text
flynn scale web=3
```

Visit the application [in your browser](http://example.demo.localflynn.com) or with curl:

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

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

#### Logs

`flynn ps` will show the running processes:

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

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

```text
$ flynn log e4cffae4ce2b-8cb1212f582f498eaed467fede768d6f
Listening on 55007
```

#### Run

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

```text
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.

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

```text<commit_msg>README: Multi-node cluster size should be >=3<commit_after># Welcome to Flynn [![Build Status](https://travis-ci.org/flynn/flynn.svg?branch=master)](https://travis-ci.org/flynn/flynn)

[Flynn](https://flynn.io) is a next generation open source Platform as a Service
(PaaS).

Unlike most PaaS's, Flynn can run stateful services as well as [12
factor](http://12factor.net/) 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](http://eurosys2013.tudos.org/wp-content/uploads/2013/paper/Schwarzkopf.pdf)
paper. Layer 0 also includes [service discovery](/discoverd).

**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](https://flynn.io).

### Status

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](https://github.com/flynn/flynn/issues) after searching to see if
anyone has already reported the issue.

## Getting Started

We built a [tool](https://dashboard.flynn.io) for launching Flynn clusters on your
Amazon Web Services account [here](https://dashboard.flynn.io).

You can also download a [demo environment](/demo) 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:

```text
flynn key add
```

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

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

#### Scale

To access the application, add some web processes using the `scale`
command:

```text
flynn scale web=3
```

Visit the application [in your browser](http://example.demo.localflynn.com) or with curl:

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

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

#### Logs

`flynn ps` will show the running processes:

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

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

```text
$ flynn log e4cffae4ce2b-8cb1212f582f498eaed467fede768d6f
Listening on 55007
```

#### Run

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

```text
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](https://github.com/coreos/etcd/blob/v0.4.6/Documentation/optimal-cluster-size.md) for
an explanation).

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

```text
{'fraction_non_alphanumeric': 0.08763417144537568, 'fraction_numerical': 0.033377444493456844, 'mean_word_length': 4.481063658340048, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 17, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6825132', 'n_tokens_mistral': 2228, 'n_tokens_neox': 2009, 'n_words': 833}