Skip to content

Instantly share code, notes, and snippets.

@yaazkal
Last active March 30, 2019 16:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yaazkal/ba224422b4f9f5ac8b6778cf3360d59a to your computer and use it in GitHub Desktop.
Save yaazkal/ba224422b4f9f5ac8b6778cf3360d59a to your computer and use it in GitHub Desktop.
title slug description date taxonomy image
BOA - The hidden gem for managing your Drupal sites on production
boa-the-hidden-gem-for-managing-drupal-sites
This post is a general overview of the BOA system. What it is and where to find information about it. If you don't know what Aegir does, it's a good place to start.
11/14/2018 22:30
tag
BOA
Drupal
Aegir
WebDev
sysadmin
butterfly.jpg

!!! I'll keep this post as simple and short as possible. This is the first of a few posts and articles I'm writing about the BOA system. I'll like this post to be read easily from the beginner to the advanced Drupal user wheter you are a site builder or a developer. !!! !!! You'll find that this post is kind out of the scope of Drupal, but it is absolutely related. Also notice that BOA is just one of the many ways of hosting a pretty performant drupal site, I mean, there is not just one recipe to make bread. !!! !!! The only assumption I'm making is that you know what Drupal, Drush and a LEMP stack are.

What is BOA

From the BOA readme file:

BOA is an acronym of high performance Barracuda, Octopus and Aegir LEMP stack.

Includes all-in-one bash scripts [...] to install and upgrade high performance Aegir Hosting Systems for Drupal, with Nginx, PHP-FPM, Zend OPcache, MariaDB and Redis.

This, in simple words means absolutely nothing if you have not heard from them before. So let's introduce each of the BOA letters (backwards) to get a better understanding. At the end of the post you will be able to have a general picture of BOA and its capabilities for managing high performace sites.

A: Aegir

Aegir is kind of a Control Panel that allows you to host and manage your Drupal sites. You can make different tasks to a site like clear cache, run cron, clone it, make and manage site backups, and many more. Best thing is that you can manage them using commands using drush, or by clicks trough the web user interface. If you want to host a Drupal site, you just create it on the Aegir control panel and it will automatically configure the web server (apache or nginx), its database, its settings.php file, drush aliases and more.

Aegir can host versions of Drupal 8, 7 or 6. The system is specially designed to host Drupal code but it can be extended with other modules like the CiviCRM to support other systems.

Aegir has this concept of platform, which in simple terms is just a code base where your Drupal site will live; it could be a Drupal distribution, custom code or just bare Drupal core of course. You can have multiple platforms and also you can host multiple sites in the same platform.

Great thing here is that you don't actually need to copy/paste a bunch of files just to create a platform. You can use .make or composer.json files to tell Aegir what code to deploy, Aegir will automatically download all the required files for you.

Just to say the same thing with an example: If you want to host a pretty simple Drupal site, you will need to create a platform in Aegir that consist just in Drupal core, you can name the platform whatever you want, but just for the sake of our mental health, let's call it "Drupal core". Then you create the site example.com that will live inside the "Drupal core" platform. Aegir will configure the server, the files permissions and install the site for you. You can also create a platform called "Lightning" that will have the code base of the Lightning distribution (you need to keep your mental health), now you can host a Lightning site inside Aegir thanks that you have created the platform for it. So you have two platforms in Aegir: Drupal core and Lightning, you can host N number of sites that share the same code of the Drupal core platform and also N number of sites that share the same base code of the lightning distribution. That is going to be a pretty big win in performance and in maintanability of the code and sites.

O: Octopus

Octopus is an Aegir installer that will allow you to install multiple instances of Aegir in the same server and will also help you to install predefined platforms ready to use in each Aegir instance. Octopus is different from the default Aegir installer and makes sense only in BOA.

Now you don't need to manually create a simple "Drupal core" platform, Octopus can create the platform for you and there are many other platforms available ready to be installed and used.

You can have just one instance of Aegir with a lot of predifined platforms or have multiple Aegir instances and have different platforms for each. There is no rule to follow here, you can "slice" the system as you want depending on your own needs. If you are a hosting company or an agency with a lot of clients, you can see the potencial here, what about one Aegir instance for each client so the client can have multiple Drupal sites and different platforms available? It's up to you.

What you have to keep in mind in this this context, is that BOA will have a master Aegir instance to control the other Aegir satellites, and each Aegir satellite can have platforms and sites. You don't create platforms or sites inside the master instance.

Great thing here is that Octopus can use different versions of php. You can configure one version for the cli and another one for the php-fpm, you can even configure php version per site.

Let's say the same thing with an example: Octopus will install an Aegir master instance and one Aegir satellite instance by default (let's call it o1). In o1 you can then install platforms like "Pressflow" and "Drupal 7". Octopus can also install another instance of Aegir (let's call it o2) with platforms like "Commerce Kickstart" and "Ubercart". And you know by now that you can host multiple sites on each platform, right?

B: Barracuda

If Aegir helps you manage Drupal sites and Octopus helps you manage Aegir instances, Barracuda will help you manage the server. Barracuda can install the database server (mariadb), web server (nginx), Redis, firewall, FTP server, DNS server, solr, OS updates and many extra software that you can use to manage your system.

Not only it will handle the installation, also the configuration of that quantity of sotware that if you are going to make it manually, you can go crazy. And not just that, the configuration it has is dinamically generated during installation according to your server hardware, so you will have a pretty optimized system.

BOA as a hole system

To sumarize:

System Description
Barracuda Manages the server related software (web, database, firewall, etc)
Octopus Can install multiple Aegir instances with predefined platforms
Aegir Manages Drupal sites (can run tasks for each site)

So if Aegir makes all the trick for Drupal sites, why will you need to run BOA then? just to add layers of complexity? I don't think so, you will want to have BOA if you need performance, stability, simplicity, scalability and security.

Now that we have a lot of tools to use, let's see what makes BOA so great to learn, use and love:

  • It's an open platform to manage open source. Today it supports Drupal and CiviCRM but there are plans to also support Grav CMS and OpenDevshop too. That means that you can self host to manage mutiple projects.
  • You have a ton of sotfware optimized for your system installed just by running one script.
  • It's focused on high performance. So if you want the nginx + php-fpm + opcache + redis recipe in order to make your sites shine (plus many more system tools), you are in the right place as you literally will not have to install, configure and fight each piece of the puzzle.
  • It's easy to turn on/off feature by just editing some text control files.
  • It's also focused on security. Not only Aegir will help you with this because of the way all the settings.php files are generated. Have you heard of Drupalgeddon? Let me tell you that you are safe using BOA as it will patch automatically all your Drupal sites minutes after the security update is available while you are sleeping!
  • Running multiple php versions on the same server sounds scary? You will have fun using BOA as it can manage per site or per platform php versions.
  • It supports Let's Encrypt, so not only you will serve an encrypted site, you can take advantage of the speed of HTTPS.
  • It can automatically save backups of the entire system in a Amazon AWS Bucket. You can not only restore a site, you will be able to restore a complete server in minutes (depending on your strategy and site size of course).
  • In the advance side of things, it can scale a lot as it supports to be installed as a cluster using Percona.
  • Long Term Support is key to the system. You can manage with confidencie Drupal sites from 6 to 8 versions with CiviCRM support by default. It supports PHP 5.3 to 7.0.

Caveats

As in many things in life, there are some tradeoffs you will have to do. These are some that you will find:

  • As the system is focused on stability, you can't spect BOA to have the last piece of PHP version or even the OS version. Right now it supports Debian 8 (Jessie) and the plan is to support Debian 9 (Stretch). BOA has it's complexities to manage dependencies and offer as wide support as possible. At the time of writing this post, there is no support for PHP 7.1 or 7.2. It mainly keeps the things in some sort of "stable" channel. Anyway support for PHP 7.2 is planned to be released soon.
  • BOA is designed to do many things but also one tangible that is key: Host Drupal sites that are really fast. As Barracuda manages all the system software, you can't expect to install custom software and that it keeps running after a BOA upgrade. Of course you can, but there are some advices.
  • As writing this today, there are no predefined Drupal 8 platforms to use in Octopus. That dosen't mean that you can't create a Drupal 8 platform and host Drupal 8 sites. Support is available but not official. I'll write a How to guide for Drupal 8 projects with BOA.
  • There is no Drush 9 support. You will have to keep it at drush 8, since is the version that can manage Drupal 6, 7 and 8 sites.
  • As this could be a niche product, it has no the biggest community out there. Anyway Omega8.cc it's the company behind its development that can also offer hosted services or support via the issue queue.

This could maybe not be a tradeoff but is good to know:

  • System is focused on production, so maybe you will need to have some sort of workflow in order to make a change to the site directly, or enable an special alias in order to debug it. Anyway is more like a best practice.
  • You will need some sysadmin skills. It's better to be confortable running scripts, commands and editing files when doing some special tasks.

Where to start then?

The Github repo of BOA has well documented information about how to install, run, configure, upgrade and even backup a BOA system. Read carefully the docs folder. You can also check the legacy documentation or start a conversation in the Gitter.im channel of the project. The issue queue of the project is also a nice place to take a look as there are some responses that are actually how-to guides. You can also ask your questions there.

If you have a little patience you can wait some kind of tutorials, specially about how to run Drupal 8 sites using BOA in future posts in this blog, as this is not officially documented. In the meantime, if you are new to Aegir, please take a look at the documentation of the project as it's the soul of the BOA ecosystem.

You can also contact me if you think that you need some kind of service that is related.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment