Capistrano style deployments with Fabric
Project description
fabistrano
============
Fabistrano is a set of [Fabric](http://docs.fabfile.org/en/1.6/) tasks that allows you to do [Capistrano](https://github.com/capistrano/capistrano) style deployments for python web apps.
## What is a _capistrano style_ deployments?
Capistrano deploys code under versioned directories and then symlinks the latest one as the *current* release.
A sample structure would look like this:
```
app.com
|
| - releases
| - 1366924759
| - 1366927898
| - 1367155641
| - shared
| - current
```
## Why use this stlye of deployment?
Using fabistrano you get the following benefits:
- Scripted and ordered deployments
- Very low downtime when deploying new code
- Easy roll backs
## Usage
1. Install fabistrano:
` pip install fabistrano `
2. In your `fabfile.py` you need to import fabistrano and set the environment variables:
```
from fabistrano import deploy
env.hosts = ["HOST"] # Replace with your host name or IP
env.base_dir = '/www' # Set to your apps directory
env.app_name = 'app_name.com' # This will deploy the app to /www/app_name.com/
env.git_clone = 'GIT_PATH' # Your git url
env.restart_cmd = 'kill -HUP `supervisorctl pid gunicorn`' # Restart command
# or
# env.wsgi_path = "app_name/apache.wsgi" # Relative path to the wsgi file to be touched on restart
```
3. Run `setup` to create the directory structure:
` fab deploy.setup `
4. Deploy the app:
` fab deploy `
5. Setup your web server to point to the `current` directory.
And you should be good to go!
## Current status
This tool is under active development and you might see errors.
## License
The template itself is available under the "Simplified" BSD license and can be
freely modified under the terms of that license. You can see the
[full license text](https://github.com/dlapiduz/fabistrano/blob/master/LICENSE>)
in the Github repository for additional detail.
Applications created using this template are not considered derivatives works.
Applications created using this template can be freely licensed under whatever
you as the author chooses. They may be either open or closed source.
============
Fabistrano is a set of [Fabric](http://docs.fabfile.org/en/1.6/) tasks that allows you to do [Capistrano](https://github.com/capistrano/capistrano) style deployments for python web apps.
## What is a _capistrano style_ deployments?
Capistrano deploys code under versioned directories and then symlinks the latest one as the *current* release.
A sample structure would look like this:
```
app.com
|
| - releases
| - 1366924759
| - 1366927898
| - 1367155641
| - shared
| - current
```
## Why use this stlye of deployment?
Using fabistrano you get the following benefits:
- Scripted and ordered deployments
- Very low downtime when deploying new code
- Easy roll backs
## Usage
1. Install fabistrano:
` pip install fabistrano `
2. In your `fabfile.py` you need to import fabistrano and set the environment variables:
```
from fabistrano import deploy
env.hosts = ["HOST"] # Replace with your host name or IP
env.base_dir = '/www' # Set to your apps directory
env.app_name = 'app_name.com' # This will deploy the app to /www/app_name.com/
env.git_clone = 'GIT_PATH' # Your git url
env.restart_cmd = 'kill -HUP `supervisorctl pid gunicorn`' # Restart command
# or
# env.wsgi_path = "app_name/apache.wsgi" # Relative path to the wsgi file to be touched on restart
```
3. Run `setup` to create the directory structure:
` fab deploy.setup `
4. Deploy the app:
` fab deploy `
5. Setup your web server to point to the `current` directory.
And you should be good to go!
## Current status
This tool is under active development and you might see errors.
## License
The template itself is available under the "Simplified" BSD license and can be
freely modified under the terms of that license. You can see the
[full license text](https://github.com/dlapiduz/fabistrano/blob/master/LICENSE>)
in the Github repository for additional detail.
Applications created using this template are not considered derivatives works.
Applications created using this template can be freely licensed under whatever
you as the author chooses. They may be either open or closed source.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fabistrano-0.3.tar.gz
(3.9 kB
view details)
File details
Details for the file fabistrano-0.3.tar.gz
.
File metadata
- Download URL: fabistrano-0.3.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4659872d734458bb9afeed7fbdf55e960bda679b2aef614002e20604f5ca297f |
|
MD5 | a51814d00574b2cbd65f2e13b7835fe8 |
|
BLAKE2b-256 | 3639b7950fc93f874b9be537a0a345ee3e564bd468ba474c2fa394fc32416e23 |