Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install django-fabfile

How to install django-fabfile

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install django-fabfile
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
2012.05.12.1
2013.08.03.1Never BuiltWhy not?
2012.05.12.1 Available View build log
2012.05.02.1 Available View build log
2012.03.06.1 Available View build log
2012.03.03.1 Available View build log
2012.02.28.2 Available View build log
2012.02.28.1 Available View build log
2012.02.26.1 Available View build log
2012.02.23.2 Available View build log
2012.02.20.3 Available View build log
2012.02.20.1 Available View build log
2012.02.18.1 Available View build log
2012.02.10.1 Available View build log
2012.01.30.1 Available View build log
2011.11.27.1 Available View build log
2011.11.23.1 Available View build log
2011.11.07.1 Available View build log
2011.11.04.2 Available View build log
2011.10.19.1 Available View build log
2011.10.06.1 Available View build log
2011.09.29.1 Available View build log
2011.09.27.1 Available View build log
2011.09.23.1 Available View build log
2011.09.21.2 Failed View build log
2011.09.15.1 Failed View build log
2011.09.14.3 Failed View build log
2011.09.07.1 Failed View build log
2011.09.06.4 Failed View build log
Windows (64-bit)
2012.05.12.1
2013.08.03.1Never BuiltWhy not?
2012.05.12.1 Available View build log
2012.05.02.1 Available View build log
2012.03.06.1 Available View build log
2012.03.03.1 Available View build log
2012.02.28.2 Available View build log
2012.02.28.1 Available View build log
2012.02.26.1 Available View build log
2012.02.23.2 Available View build log
2012.02.20.3 Available View build log
2012.02.20.1 Available View build log
2012.02.18.1 Available View build log
2012.02.10.1 Available View build log
2012.01.30.1 Available View build log
2011.11.27.1 Available View build log
2011.11.23.1 Available View build log
2011.11.07.1 Available View build log
2011.11.04.2 Available View build log
2011.10.19.1 Available View build log
2011.10.06.1 Available View build log
2011.09.29.1 Available View build log
2011.09.27.1 Available View build log
2011.09.23.1 Available View build log
2011.09.21.2 Failed View build log
2011.09.15.1 Failed View build log
2011.09.14.3 Failed View build log
2011.09.07.1 Failed View build log
2011.09.06.4 Failed View build log
Mac OS X (10.5+)
2012.05.12.1
2013.08.03.1Never BuiltWhy not?
2012.05.12.1 Available View build log
2012.05.02.1 Available View build log
2012.03.06.1 Available View build log
2012.03.03.1 Available View build log
2012.02.28.2 Available View build log
2012.02.28.1 Available View build log
2012.02.26.1 Available View build log
2012.02.23.2 Available View build log
2012.02.20.3 Available View build log
2012.02.20.1 Available View build log
2012.02.18.1 Available View build log
2012.02.10.1 Available View build log
2012.01.30.1 Available View build log
2011.11.27.1 Available View build log
2011.11.23.1 Available View build log
2011.11.07.1 Available View build log
2011.11.04.2 Available View build log
2011.10.19.1 Available View build log
2011.10.06.1 Available View build log
2011.09.29.1 Available View build log
2011.09.27.1 Available View build log
2011.09.23.1 Available View build log
2011.09.21.2 Failed View build log
2011.09.15.1 Failed View build log
2011.09.14.3 Failed View build log
2011.09.07.1 Failed View build log
2011.09.06.4 Failed View build log
Linux (32-bit)
2012.09.17.1
2013.08.03.1Never BuiltWhy not?
2012.09.17.1 Available View build log
2012.07.30.1 Available View build log
2012.05.12.1 Available View build log
2012.05.02.1 Available View build log
2012.03.06.1 Available View build log
2012.03.03.1 Available View build log
2012.02.28.2 Available View build log
2012.02.28.1 Available View build log
2012.02.26.1 Available View build log
2012.02.23.2 Available View build log
2012.02.20.3 Available View build log
2012.02.20.1 Available View build log
2012.02.18.1 Available View build log
2012.02.10.1 Available View build log
2012.01.30.1 Available View build log
2011.11.27.1 Available View build log
2011.11.23.1 Available View build log
2011.11.07.1 Available View build log
2011.11.04.2 Available View build log
2011.10.19.1 Available View build log
2011.10.06.1 Available View build log
2011.09.29.1 Available View build log
2011.09.27.1 Available View build log
2011.09.23.1 Available View build log
2011.09.21.2 Failed View build log
2011.09.15.1 Failed View build log
2011.09.14.3 Failed View build log
2011.09.07.1 Failed View build log
2011.09.06.4 Failed View build log
Linux (64-bit)
2013.08.03.1 Available View build log
2012.09.17.1 Available View build log
2012.07.30.1 Available View build log
2012.05.12.1 Available View build log
2012.05.02.1 Available View build log
2012.03.06.1 Available View build log
2012.03.03.1 Available View build log
2012.02.28.2 Available View build log
2012.02.28.1 Available View build log
2012.02.26.1 Available View build log
2012.02.23.2 Available View build log
2012.02.20.3 Available View build log
2012.02.20.1 Available View build log
2012.02.18.1 Available View build log
2012.02.10.1 Available View build log
2012.01.30.1 Available View build log
2011.11.27.1 Available View build log
2011.11.23.1 Available View build log
2011.11.07.1 Available View build log
2011.11.04.2 Available View build log
2011.10.19.1 Available View build log
2011.10.06.1 Available View build log
2011.09.29.1 Available View build log
2011.09.27.1 Available View build log
2011.09.23.1 Available View build log
2011.09.21.2 Failed View build log
2011.09.15.1 Failed View build log
2011.09.14.3 Failed View build log
2011.09.07.1 Failed View build log
2011.09.06.4 Failed View build log
 
Author
License
GNU GPLv3
Lastest release
version 2013.08.03.1 on Jan 9th, 2014

Required arrangements

Note

django_fabfile package should be listed in your path. It's already in place if your are installed it using pip install django-fabfile. But if you are working within repository, then:

export PYTHONPATH=<path-to-folder-with-django_fabfile-package>

in your shell.

Pre-run configuration

Django settings will be checked first if environment variable DJANGO_SETTINGS_MODULE configured properly. If option was not configured within Django settings, then its value will be taken from ./fabfile.cfg file - copy-paste there rows that should be overriden from defaults :download:`django_fabfile/fabfile.cfg.def <../django_fabfile/fabfile.cfg.def>`.

System Message: ERROR/3 (<string>, line 18); backlink

Unknown interpreted text role "download".

Django settings should be configured in following form (with preserving sections case):

FABFILE = {
    'DEFAULT': {
        'LOGGING_FOLDER': '.',
    },
    'Credentials': {
        'AWS_ACCESS_KEY_ID': 'AKIAABCDEFGHIJKLMNOP',
        'AWS_SECRET_ACCESS_KEY': 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLM',
    },
}

Note

Boto config files http://code.google.com/p/boto/wiki/BotoConfig will be examined at least - if [Credentials] or some other options was filled neither in Django settings nor in ./fabfile.cfg or :download:`django_fabfile/fabfile.cfg.def <../django_fabfile/fabfile.cfg.def>`.

System Message: ERROR/3 (<string>, line 38); backlink

Unknown interpreted text role "download".

Example of required AWS IAM Policy

For using Fabric tasks you need AWS account with following permissions:

  • create-snapshot:

    {
      "Statement": [
        {
          "Sid": "Stmt1304003463574",
          "Action": [
            "ec2:CreateSnapshot",
            "ec2:CreateTags",
            "ec2:DescribeInstances",
            "ec2:DescribeRegions",
            "ec2:DescribeSnapshots",
            "ec2:DescribeTags",
            "ec2:DescribeVolumes"
          ],
          "Effect": "Allow",
          "Resource": "*"
        }
      ]
    }
    
  • delete-snapshot:

    {
      "Statement": [
        {
          "Sid": "Stmt1306410750989",
          "Action": [
            "ec2:DescribeRegions",
            "ec2:DescribeSnapshots",
            "ec2:DeleteSnapshot"
          ],
          "Effect": "Allow",
          "Resource": "*"
        }
      ]
    }
    
  • reboot-instance:

    {
      "Statement": [
        {
          "Sid": "Stmt1312204628195",
          "Action": [
            "ec2:RebootInstances"
          ],
          "Effect": "Allow",
          "Resource": "*"
        },
        {
          "Sid": "Stmt1312276311113",
          "Action": [
            "ec2:DetachVolume"
          ],
          "Effect": "Allow",
          "Resource": "*"
        }
      ]
    }
    
  • rsync-snapshot:

    {
      "Statement": [
        {
          "Effect": "Allow",
          "Action": [
            "EC2:AttachVolume",
            "EC2:CreateKeyPair",
            "EC2:CreateVolume",
            "EC2:DeleteKeyPair",
            "EC2:DeleteVolume",
            "EC2:DescribeAvailabilityZones",
            "EC2:DescribeImages",
            "EC2:DescribeKeyPairs",
            "EC2:RunInstances",
            "EC2:TerminateInstances"
          ],
          "Resource": "*"
        }
      ]
    }
    

Backup script

Note

Instances and snaphots are filtered by tag "Earmarking" value "production". This can be configured in settings - see "Pre-run configuration" section above.

Following backup commands may be configured with crontab to run daily:

#!/bin/sh

VE=/home/backup-agent/.virtualenvs/backup

. $VE/bin/activate && \
fab --keepalive=60 -f $VE/lib/python2.6/site-packages/django_fabfile/backup.py \
        backup_instances_by_tag \
        trim_snapshots \
        rsync_region:src_region_name=us-east-1,dst_region_name=eu-west-1 \
        rsync_region:src_region_name=us-west-1,dst_region_name=eu-west-1 \
        rsync_region:src_region_name=eu-west-1,dst_region_name=us-east-1

With 30 production instances it tooks around 6 hours to replicate snapshots updates. First replication tooks much more time obviously.

Running tests

The package has test cases to make sure, that all methods, being tested, keep on the entire program logic. The test cases are using packages fudge and unittest. The test files ('test_*.py') are located in folder '/django_fabfile/tests/'. To run tests from command line, implement:

python -m unittest discover django_fabfile

Recent changes

See :doc:`changelog` for recent updates.

System Message: ERROR/3 (<string>, line 168); backlink

Unknown interpreted text role "doc".

Licensing

The product is licensed by oDesk http://www.odesk.com/ under :download:`GNU GENERAL PUBLIC LICENSE Version 3<license.txt>` except portions with attached inline license information like :func:`django_fabfile.backup._trim_snapshots`.

System Message: ERROR/3 (<string>, line 173); backlink

Unknown interpreted text role "download".

System Message: ERROR/3 (<string>, line 173); backlink

Unknown interpreted text role "func".

Subscribe to package updates

Last updated Jan 9th, 2014

Download Stats

Last month:23

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.