BOA is an acronym of high performance Barracuda, Octopus and Aegir LEMP stack. Includes all-in-one bash scripts (see docs/INSTALL.txt for details) to install and upgrade high performance Aegir Hosting systems for Drupal, with Nginx, PHP-FPM, Zend OPcache, MariaDB and Redis.

This document is primarily focusing on setting up local VM to use Drupal BOA as an alternative to the Acquia Site Factory multi-site setup. I have documented step-by-step instructions with commands to setup Drupal BOA on local VM.

I am considering below machines:

  • Host – Windows10
  • Guest – Oracle VM - Ubuntu

Pre-requisits:

  1. GitBash
  2. Vagrant
  3. Vagrant plugins
    1. vagrant-hostsupdater
    2. vagrant-auto_network
    3. vagrant-vbguest

Follow below steps to setup local VM:

Step-1: Copy below hosts entries into c:/Windows/System32/drivers/etc/hosts file as sometimes vagrant hostsupdater plugin does not work due to administrative access issue to the /hosts file.

10.20.1.2  aegir.local  # VAGRANT: adea3343ef90bbd6fcd8925c498d5b14 (default) / e65251a6-393a-420c-a928-ddb41ca70d24
10.20.1.2  o1.sub.aegir.local  # VAGRANT: adea3343ef90bbd6fcd8925c498d5b14 (default) / e65251a6-393a-420c-a928-ddb41ca70d24
10.20.1.2  chive.aegir.local  # VAGRANT: adea3343ef90bbd6fcd8925c498d5b14 (default) / e65251a6-393a-420c-a928-ddb41ca70d24
10.20.1.2  dev.example.com  # VAGRANT: adea3343ef90bbd6fcd8925c498d5b14 (default) / e65251a6-393a-420c-a928-ddb41ca70d24

192.168.56.101  aegir.local  # VAGRANT: adea3343ef90bbd6fcd8925c498d5b14 (default) / e65251a6-393a-420c-a928-ddb41ca70d24
192.168.56.101  o1.sub.aegir.local  # VAGRANT: adea3343ef90bbd6fcd8925c498d5b14 (default) / e65251a6-393a-420c-a928-ddb41ca70d24
192.168.56.101  chive.aegir.local  # VAGRANT: adea3343ef90bbd6fcd8925c498d5b14 (default) / e65251a6-393a-420c-a928-ddb41ca70d24
192.168.56.101  dev.example.com  # VAGRANT: adea3343ef90bbd6fcd8925c498d5b14 (default) / e65251a6-393a-420c-a928-ddb41ca70d24
192.168.56.101  foo.aegir.local

Step-2: Create a “drupal_boa” folder(you can rename it as per your preference) from where you want to run vagrant commands.

Step-3: Create /drupal_boa/Vagrantfile file by copying below code:

# -*- mode: ruby -*-
# vi: set ft=ruby :
# This Vagrantfile depends on plugin 'vagrant-vbguest'.

unless Vagrant.has_plugin?("vagrant-vbguest")
  raise "The vagrant plugin vagrant-vbguest is not installed!\nFirst execute command 'vagrant plugin install vagrant-vbguest' to install the plugin."
end

unless Vagrant.has_plugin?("vagrant-hostsupdater")
  raise "The vagrant plugin vagrant-hostsupdater is not installed!\nFirst execute command 'vagrant plugin install vagrant-hostsupdater' to install the plugin."
end

unless Vagrant.has_plugin?("vagrant-auto_network")
  raise "The vagrant plugin vagrant-auto_network is not installed!\nFirst execute command 'vagrant plugin install vagrant-auto_network' to install the plugin."
end

machines = YAML.load_file('vagrant_hosts.yml')

Vagrant.require_version ">= 1.8.1"
Vagrant.configure(2) do |config|
  config.vm.box = "debian/jessie64"
  machines.each do |machine|
    config.vm.define machine['name'] do |node|
      node.vm.provider "virtualbox" do |vb|
        vb.cpus = 2
        vb.memory = "512"
        vb.name = machine['name']
      end

      node.vm.network "private_network", ip: machine['ip']
      node.vm.synced_folder "data", "/shared_data"
      node.vm.provision "shell", path: "scripts/set_ip.sh", args: "#{machine['ip']}"
      node.vm.provision "shell", path: "scripts/set_root_password.sh", args: "#{machine['root_password']}"
     node.vm.provision "shell", path: "scripts/install_boa_master.sh"
  end 
end

Step-4: Create /drupal_boa/vagrant_hosts.yml file by copying below code:

# vagrant_hosts.yml
- name: test.aegir.local
  ip: 192.168.56.101
  shared: test_aegir_local_data
  root_password: vagrant

Step-5: Create /drupal_boa/scripts/set_ip.sh file copying below code:

#!/usr/bin/env bash
IP=$1
echo "auto eth1
iface eth1 inet static
      address $IP
      netmask 255.255.255.0" >> /etc/network/interfaces

Step-6: Create /drupal_boa/scripts/set_root_password.sh file by copying below code:

#!/usr/bin/env bash
PASSWORD=$1
# Set root password to 'vagrant'
echo "root:$PASSWORD" | sudo chpasswd
sync

Step-7: Create /drupal_boa/scripts/ install_boa_master.sh file by copying below code:

#!/usr/bin/env bash
# Install BOA
cd;wget -q -U iCab http://files.aegir.cc/BOA.sh.txt;bash BOA.sh.txt
boa in-stable local hostmaster@aegir.local min
exit

Step-8: Create VM

Open windows command prompt

Go to /drupal_boa folder

Run "vagrant up" command

When installation is successful copy generated https://aegir.local one time url into browser and change password.

Execute below command to connect to the VM:

vagrant ssh test.aegir.local

Execute below commands(one command at a time) at VM’s ssh command prompt:

barracuda up-stable
octopus up-stable all both

Step-9: Generate SSH keys for root user of VM

Go to C:\Users\<user name>\.ssh folder and “Right Click”.

It will prompt you with many options. Click on “Git Bash here”

Run below command:

ssh-keygen -b 4096 -t rsa -N '' -f ~/.ssh/id_rsa

Copy generated ~/.ssh/id_rsa.pub to ~/.ssh/authorized_keys on the VM Guest server using WinSCP or any SFTP client.

Run "chmod 600 ~/.ssh/authorized_keys" command on the VM server.

Step-10: new platform setup

You can follow the instructions from http://docs.aegirproject.org/en/latest/usage/platforms/#getting-a-platform-onto-your-server to create new platform.