So flynn.io is awesome, only some basic automatisation tasks are missing. At least for me.
- Automated backups to s3
- Ssl with automated renewal (wip)
What this app does is just that, it uses a webinterface to manage our backup periods and apps. And it uses the flynncli to get all of the data from your cluster.
- clone repo and create flynn app
flynn create flynn-backup
- push to your cluster
git push flynn master
- add postgress
flynn resource add postgres
- add missing env variables (the PG variables are already fixed by Flynn)
- migrate your db
flynn run bin/rails db:migrate db:seed
- open up your brower to your flynn url and login with
admin@example.com
/password
(you can change this when your logged in)
- https://github.com/heroku/heroku-buildpack-ruby.git, lets let rails do its thing
- https://github.com/reneweteling/flynncli-buildpack.git, install the flynn cli in the container
ENV_VAR | DESCRIPTION |
---|---|
PGHOST | DB credentials, provided by Flynn |
PGUSER | DB credentials, provided by Flynn |
PGPASSWORD | DB credentials, provided by Flynn |
PGDATABASE | DB credentials, provided by Flynn |
AWS_ACCESS_KEY_ID | Aws credentials for off-site backup storage |
AWS_SECRET_ACCESS_KEY | Aws credentials for off-site backup storage |
AWS_REGION | Aws credentials for off-site backup storage |
AWS_BUCKET | Aws credentials for off-site backup storage |
FLYNN_KEY | Flynn cluster credentials, see ~/.flynnrc for the values |
FLYNN_TLSPIN | Flynn cluster credentials, see ~/.flynnrc for the values |
FLYNN_DOMAIN | Flynn cluster credentials, see ~/.flynnrc for the values |
- Get it to work
- Replace the backup to tmp file to aws with backup stdout to stdin from the awscli, eliminatig the need for a big tmp disk
- add LetsEncrypt to the mix to automaticly renew and set your ssl sertificates
- Fork the repo.
- Make sure the tests pass:
- Make your change, with new passing tests.
- Push to your fork. Write a good commit message.
- Submit a pull request.
Others will give constructive feedback. This is a time for discussion and improvements, and making the necessary changes will be required before we can merge the contribution.
Flynn-backup is Copyright (c) 2017 Weteling Support. It is free software, and may be redistributed under the terms specified in the LICENSE file.
Flynn-backup is maintained by René Weteling.
Flynn-backup is maintained and funded by Weteling Support.
I love open source software! See my other projects or hire me to help build your product.
flynn -a router env set ADDITIONAL_HTTP_PORTS=3000,8080
flynn -a flynn-backup route add http -p 8080 backup.weteling.com
alias hostingtunnel="ssh -f -N -L 8080:localhost:8080 root@hosting.weteling.com && open 'http://dashboard.weteling.com:8080' && open 'http://backup.weteling.com:8080'"