Flynn Dev Environment
This repo contains a Vagrantfile/Makefile combo that sets up all of the Flynn components and dependencies in a working dev/test configuration.
The only requirement is that you have VirtualBox and Vagrant installed.
Note: Flynn is alpha-quality software, so things are probably broken.
Demo video
Setup
After checking out this repo, boot up the VM in Vagrant:
vagrant up
After the VM provisioning has finished, log in to it and run make
to install
the dependencies and boot up the Flynn services:
vagrant ssh
make
Usage
With the Flynn processes running, open another terminal and deploy the example application:
vagrant ssh
cd nodejs-example
git push flynn master
If the deploy is successful, the example application should have one instance running which will be running a HTTP server:
curl http://10.0.2.15:55000
The flynn
command line tool is used to manipulate the application.
Scale
To test out the router and scaling, turn up the web processes and add a domain:
flynn scale web=3
flynn domain example.com
The application will now be accessible via the router:
curl -H "Host: example.com" localhost:8080
Repeated requests to the router should show that the requests are load balanced across the running processes.
Logs
flynn ps
will show the running processes. To get the logs from a process, use
flynn logs
:
flynn logs web.1
Run
An interactive one-off process may be spawned in a container:
flynn run bash