flynn: update

This commit is contained in:
Rico Sta. Cruz 2017-10-19 10:58:05 +08:00
parent e164739900
commit 476d0de142
No known key found for this signature in database
GPG Key ID: CAAD38AE2962619A
1 changed files with 22 additions and 12 deletions

View File

@ -1,6 +1,7 @@
---
title: Flynn
category: Devops
layout: 2017/sheet
---
### General workflow
@ -12,11 +13,13 @@ category: Devops
### Creating a cluster (AWS)
```sh
flynn install # (provisions AWS EC2 stuff)
flynn key add # (adds your pubkey to AWS)
```bash
flynn install # (provisions AWS EC2 stuff)
flynn key add # (adds your pubkey to AWS)
```
#### What it does
* This creates `XXXX.flynnhub.com`
* Dashboard in `dashboard.XXXX.flynnhub.com`
* Use `flynn -a dashboard env get LOGIN_TOKEN` to get login token
@ -24,9 +27,10 @@ flynn key add # (adds your pubkey to AWS)
### Using a flynn cluster
Managed in `~/.flynnrc`
Managed in `~/.flynnrc`:
{: .-setup}
```sh
```bash
flynn cluster
flynn cluster add [-g githost] [-p pin] NAME URL KEY
flynn cluster remove NAME
@ -35,16 +39,18 @@ flynn cluster default NAME # use this current
### Setting up a new app
```sh
```bash
cd ~/project
flynn create example # adds the `flynn` remote
flynn route # prints http routes
git push flynn master
```
## Commands
### Environment vars
```
```bash
flynn env
flynn env set FOO=bar BAZ=foobar
flynn env unset FOO
@ -52,27 +58,27 @@ flynn env unset FOO
### Scale
```sh
```bash
flynn ps
flynn scale web=3
```
### Logs
```sh
```bash
flynn log
flynn log flynn-d55c7a...
```
### Running commands
```sh
```bash
flynn run rake db:migrate
```
### Manage routes
```sh
```bash
flynn route
flynn route add http example.com
# then make a CNAME from example.com to myapp.xxxx.flynnhub.com
@ -80,10 +86,14 @@ flynn route add http example.com
### More
```sh
```bash
flynn ps
flynn kill <job>
flynn meta
flynn meta set foo=baz
```
## Also see
- [Flynn website](https://flynn.io/) _(flynn.io)_