Zensations

Development · Tools

Barracuda, Octopus, and Aegir - DIY Aquarium

Philipp

What might make home insurance a little nervous regarding water damage, we, as Drupal Developers, can tackle completely risk-free and with guaranteed dry socks. Specifically, we want to replace the OS-supplied Apache, or rather LAMP/WAMP/MAMP, with a local BOA instance. In this multi-part blog series, we will introduce the system and explain step-by-step how to configure it on your own computer.

Of Predatory Fish and Cephalopods

Anyone who runs multiple Drupal websites and strives to accelerate their workflows will inevitably come across Aegir. Aegir is a hosting system that is itself based on Drupal and helps to manage multiple Drupal installations.

Aegir makes it easy to install, upgrade, deploy, and backup an entire network of Drupal sites.

Sounds exciting, and it is! Automatic backups, migration of entire websites, collective updates, site installation with a click of the mouse, [Drush] integration – it makes an administrator's heart beat faster. However, a complete list and explanation of all Aegir features would go beyond the scope of this article. Anyone interested in it will inevitably turn to the [Aegir Community page][community].

Drupal in Drupal in ...?

If you're already throwing [Inception] metaphors around in your head, please bear with me for a moment. The name of the BOA project, which we are actually discussing, stands for Barracuda Octopus Aegir. And it is nothing less than a system for managing multiple Aegir instances.

No joke.

Strictly speaking, BOA is a shell script that transforms a bare Linux machine (preferably Ubuntu 12.0.4) from scratch into a high-performance Drupal hosting monster. And within that, multiple instances of Aegir can be hosted, which in turn run multiple Drupal platforms, which in turn contain multiple Drupal sites. That's a lot of 'in turn' for one sentence. To grasp the construct as a whole, let's unroll it from the outside in and simultaneously define the terms that will accompany us further.

  • Barracuda: The shell script, executed with root privileges in a vanilla installation of Ubuntu or Debian, which configures the complete server stack from the database to the HTTP server.
  • Octopus: Another shell script that sets up an Aegir installation within Barracuda, including SSH/SFTP access for developers and a separate administration interface.
  • Platform: A platform is essentially the source code of a Drupal distribution that runs within an Octopus instance. This is the level on which you operate when Drupal is installed classically, i.e., without BOA.
  • Site: This refers to the standard multisite behaviour of a Drupal installation. The only difference is that Aegir's Hostmaster interface allows the installation of new sites directly via the administration masks.

Technology

The exact specifications can be found on the Barracuda project page. Here are just the most important points:

  • NGINX: Barracuda does not rely on the well-known Apache web server but uses NGINX. This is a significantly leaner, more specialised, and – especially when delivering static content – much faster alternative.
  • MariaDB: A drop-in replacement for MySQL, which on the one hand includes several performance improvements, and at the same time – unlike MySQL – is fully Open Source licensed.
  • PHP-FPM/APC: Process optimisation and opcode caching for PHP.
  • Redis: High-performance key-value store that can be used for cache bins in Drupal.
  • Tomcat and Solr: That's right, the cat is in the aquarium too! Nothing stands in the way of truly great search functions.

And what's it all for?

To host Drupal, it sounds great, of course. We ourselves run our server with this software, Omega8.cc – the creators of BOA – sell professional hosting based on it for good reason, and industry giants like Pantheon also build on similar technology. Why you should bring everything home to your own computer is not immediately obvious, however. The following reasons convinced me:

  • "It works on my machine." Surprises during deployment should be eliminated, as we run the same system for development as our server.
  • The complete installation is packaged in a virtual machine that can be backed up and passed on as a whole. This saves time if developers join the team or a computer fails due to excessive coffee consumption.
  • The virtualised installation runs significantly faster than the Apache or MAMP supplied with Mac OS X. Anyone who does a lot of site building and works with Views and Panels UI will surely appreciate this.
  • The tedious editing of the hosts file is eliminated.
  • The domains automatically work in other virtual machines too. Keyword Internet Explorer testing ...
  • Test sites can be installed and removed in a flash. Databases are managed automatically.
  • Tomcat and Solr come fully functional without additional effort or extensive configuration.

These reasons should be enough to make developers' mouths water. The fact that you can boast about it at various meetups is just the icing on the cake. In the next part, we will focus on correctly setting up the virtual machine. Stay tuned!

Share

More on this topic