Skip to content

rhabbachi/druploy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Druploy

Introduction

Druploy is an agile deployment tool based on Fabric and Drush that makes deploying instances of Drupal projects fast and easy. It depends on the Chef Drupal Cookbook.

There are some other Drupal deployment tools available (e.g Aegir is an amazing tool) but they are quite heavy and don't work as I would like with a number of commun scenarios.

Druploy intends to ease some very standard, day to day problems in the workflow of a Drupal agency.

  1. Enable the quick onboarding of a new developer into an existing project (by being able to type a single command to have a working copy of a project set up on his machine).
  2. Make it easy to show a customer a development/developer branch on a publicly accessable new staging vhost.
  3. Make it easy for developers to move code/files/databases between development and staging machines.
  4. Be able to deploy a new site based on a branch and database/file snapshots in a single command.
  5. Make feature branching a single command (druploy branch command will create a new local git branch, database, files and update settings files).

Requirements

  • Python 2.7.x.

  • Fabric>=1.8. Druploy wont work for versions less then 1.8 and will mostly cause cryptic errors.

  • PyYAML.

  • Jinja2.

  • Openssh-client and Openssh-server. Druploy uses ssh connections to make changes even in the local machine. The user will be prompted for password input every time a local change is to be made. To avoid this the recommanded setup is to create a passphraseless set of ssh keys and map them in the ssh config file:

Host localhost
  IdentityFile <path/to/private/key>
  • A remote server configured with Git, Drush, PHP, Apache, Apache_mod rewrite, MySQl. The best shortcut to configure the remote server is to use the chef Drupal recipe Drupal Cookbook

Installation

  1. Add drupal to your PATH, if you are using bash:
$ echo 'export PATH="/path/to/druploy/bin/:$PATH' >> ~/.bashrc
$ source ~/.bashrc
  1. Create a new servers config file from the example.
$ cd /path/to/druploy/folder/
$ cp examples/servers.yaml servers.yaml

Note: All .yaml files are .gitignored.

  1. Configure the correct usernames and passwords in servers.yaml

Usage

The following example will collect:

  1. Code managed by git in a branch called "test".
  2. Database.
  3. Files.

from a project not managed by Druploy, and deploy them to the domain www.mydrupalsite.com on the server named "live" in your servers.yaml

$ druploy server:local \
source:/path/to/drupal/sites/default \
code:git@git.domain.com:repo.git,branch=test database:updating=True files:updating=True \
server:live project:new deploy:live domain:www.mydrupalsite.com

About

A system to automate deployment of Drupal sites written in Python and based on Fabric and Drush

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.9%
  • PHP 3.1%
  • Shell 1.0%