Difference between revisions of "Flynn"
(added info about Perl) |
|||
Line 2: | Line 2: | ||
Available from https://flynn.io/ | Available from https://flynn.io/ | ||
+ | |||
+ | == Perl applications == | ||
+ | |||
+ | There's no out of the box support for Perl PSGI applications, but it just takes a single command to setup the environment. | ||
+ | |||
+ | flynn -a yourappname env set \ | ||
+ | BUILDPACK_URL=https://github.com/pnu/heroku-buildpack-perl \ | ||
+ | PERL5LIB=/app/lib:/app/local/lib/perl5 | ||
+ | |||
+ | There has to be an app.psgi file (the actual filename is app.psgi, that's not a placeholder) in the top directory of your application. If you use the default Catalyst application structure, you should have a 'yourappname.psgi' which can just be renamed to app.psgi | ||
+ | |||
+ | == Useful commands == | ||
Recover dashboard login token: | Recover dashboard login token: | ||
flynn -a dashboard env | grep LOGIN_TOKEN | flynn -a dashboard env | grep LOGIN_TOKEN | ||
+ | |||
+ | == Git requirements == | ||
Requires git 1.8.5 or higher for seamless publishing via git | Requires git 1.8.5 or higher for seamless publishing via git |
Revision as of 10:09, 27 February 2017
Open-source PaaS software
Available from https://flynn.io/
Perl applications
There's no out of the box support for Perl PSGI applications, but it just takes a single command to setup the environment.
flynn -a yourappname env set \ BUILDPACK_URL=https://github.com/pnu/heroku-buildpack-perl \ PERL5LIB=/app/lib:/app/local/lib/perl5
There has to be an app.psgi file (the actual filename is app.psgi, that's not a placeholder) in the top directory of your application. If you use the default Catalyst application structure, you should have a 'yourappname.psgi' which can just be renamed to app.psgi
Useful commands
Recover dashboard login token:
flynn -a dashboard env | grep LOGIN_TOKEN
Git requirements
Requires git 1.8.5 or higher for seamless publishing via git
1.8.3 (CentOS7 default) requires an environment variable to publish app due to the self-signed SSL certificate. Since the CA certificate is stored within ~/.flynn/ when you setup the cluster, the GIT_SSL_CAINFO env can be used to specify the CA used.
$ GIT_SSL_CAINFO=~/.flynn/ca-certs/default.pem git push flynn master
Below 1.7.3 (e.g CentOS6 default of 1.7.1) there's a little more work required because it doesn't support the credential helper. You'll need the key for your flynn cluster which can be found with:
$ grep Key ~/.flynnrc Key = "44161646005d26ede2c6687aaaaaaaaa"
$ git remote get-url flynn https://git.flynn1.bocks.com/myapp.git $ git remote set-url flynn https://:44161646005d26ede2c6687aaaaaaaaa@git.flynn1.bocks.com/myapp.git
To push the repository with git 1.7.x, you still need the GIT_SSL_CAINFO env as for git 1.8.3
See Updating Git for instructions.
Firewall
ufw enable ufw allow 22 ufw allow 80 ufw allow 443 ufw default REJECT
And some other rules! https://www.philiplb.de/flynn/2016/04/19/flynn-ufw/