Upgrade Your Drupal Skills

We trained 1,000+ Drupal Developers over the last decade.

See Advanced Courses NAH, I know Enough

Fast Aegir deployment

Parent Feed: 

I am doing multi-server Aegir work and deployments were taking 10 seconds to get code to the servers. I have a hostmaster server and a web-only server, both need provision. I edit code on my laptop with my usual shell and editor. Now pushing 3 codebases takes less than 1 second. Use SSH master connections by adding

Host *
ControlMaster auto
ControlPath ~/.ssh/master-%r@%h:%p

to ~/.ssh/config. When another SSH connection is open, new connections piggyback on it, saving connection time and getting straight to the rsync.

#!/bin/bash
( rsync -azC hostmaster/ aegir@aegir-dev:hostmaster-HEAD/profiles/hostmaster; echo aegir-dev hostmaster ) &
( rsync -azC provision/ aegir@aegir-dev:.drush/provision; echo aegir-dev provision ) &
( rsync -azC provision/ aegir@web:.drush/provision; echo web provision ) &
wait

The -C skips .git files. The & backgrounds each task and wait waits, so all three are done in parallel.

Now I have my familiar shell and editor with localhost speed. No more jumping around servers and forgetting to update one of the provisions. And updating code is fast enough to not slow me down.

Author: 
RSS Tags: 
Original Post: 

About Drupal Sun

Drupal Sun is an Evolving Web project. It allows you to:

  • Do full-text search on all the articles in Drupal Planet (thanks to Apache Solr)
  • Facet based on tags, author, or feed
  • Flip through articles quickly (with j/k or arrow keys) to find what you're interested in
  • View the entire article text inline, or in the context of the site where it was created

See the blog post at Evolving Web

Evolving Web