A deployment toolkit built on top of Fabric.
The purpose of this library is to provide a stable python based deploy tool that covers a wide range a use cases, Those cases include Wordpress, Node.js and Django. We favor composition and customization by code before configuration.
- Git
- Rollbacks
- A full Django deploy script with migrations
- ClI for scaffolding
- Virtualenv creation and activation
- NPM management
- Nginx
- Uwsgi
- Forever
- Envfile handling
- Celeryd
- Wordpress with bedrock
- Composer
- Scp
To install Fabrik you need Python 2.7, virtualenv and pip.
Fabrik can be installed through pip.
pip install fabrik
pip install git+git://github.com/Frojd/Fabrik.git@develop
git clone [email protected]:Frojd/Fabrik.git
virtualenv venv
source venv/bin/activate
pip install --editable .
To create setup deployment for django, run the following:
fabrik_start --stages=stage,prod --recipe=django
This command will create the following files.
/fabfile.py
/stages/
__init__.py
stage.py
prod.py
This script will create the necessary files and add git repro setting (if present) and recipe import. Once generated, you'll need to add SSH settings and recipe unique settings by editing the files.
To create setup deployment for django, run the following:
fabrik_start --stages=stage,prod --recipe=django
This command will create the following files.
/fabfile.py
/stages/
__init__.py
stage.py
prod.py
This script will create the necessary files and add git repro setting (if present) and recipe import. Once generated, you'll need to add SSH settings and recipe unique settings by editing the files.
This project ships with examples for Django and Wordpress (just check examples/*
)
Tests can be run with python runtests.py
, this will run the entire suite. Just make sure you run pip install -r requirements/tests.txt
first.
It also possible to run a specific case: python runtests.py tests.test_api.TestApi
... or a specific unittest:
test_deploy_rollback python runtests.py tests.test_api.TestApi.test_deploy_rollback
All tests should reside in the tests
directory and prefixed test_*
, to include a test in the main suite add the test path in runtests.py
.
The documentation can be found here.
Want to contribute? Awesome. Just send a pull request.
Fabrik is released under the MIT License.