Aegir 3.8 on Ubuntu 16.04 Xenial on LXD LXC (eventually)

I have decided to write some books and work on apps from those. One book will be on website building and the other will be on self-hosting.

Therefore I am going to record the set-up, customization, programming and themes of various systems for hosting.

One I know relatively well is Aegir, basically Drupal hosting Drupal with Drush. I am going to work through Aegir 3.8 on Ubuntu Xenial with PHP 7 which is twice as fast.

As a second step I use the Remote Import feature to import sites from an OVH server.

The plan is to build a Drupal 7 and a Drupal 8 site each using my emerging framework.

Community Organizing

For a maybe 12 months I volunteered as community organizer for the Aegir Project and co-founded and co-organized an event at the United Nations hosted within nyccamp and opencamps.org.

This event is called Aegir Summit and we had Richard Stallman of Free Software Foundation give the Aegir group a strategy session and he also gave the entire summit a presentation on Free Software. The 2015 Aegir Summit archive site has details on sessions etc and the 2016 Aegir Summit featured NASA hosting with Aegir by Mobomo.

The Aegir Summit mini site has some additional info as does the marketing site Aegir Hosting System and the community site. I also gave a talk at Stanford Drupal Camp (slides) and at SCALE as report-back sessions from the New York event, basically telling my story and advocating commercial free software.

Virtual Machine

Am working on LXD / LXC I use a partly pre-configured Xenial LXC container

launch a fresh LXC container

enter enter the container and change hostname, hosts and network

lxc exec aegir-devekko-io bash

update and upgrade the container

apt-update && apt-upgrade

edit the /etc/hostname

aegir-devekko-io

/etc/hosts files, I turn off ipv6 as I cant use DNS with ipv6 on my LAN and it creates issues


127.0.0.1 aegir.devekko.io aegir-devekko-io localhost
REDACTED aegir.devekko.io aegir-devekko-io localhost
10.1.10.115 aegir.devekko.io aegir-devekko-io localhost

/etc/network/interfaces.d/eth0.cfg

The primary network interface


auto eth0:0 eth0:1 
iface eth0:0 inet static 
address REDACTED/28 
gateway REDACTED

iface eth0:1 inet static 
address 10.1.10.115/24

dns-nameservers REDACTED 8.8.8.8 
dns-search devekko.io

 

Pre-requisites for Aegir 3.8

From the Aegir docs we first update and upgrade

apt update && apt upgrade

we then check DNS and hostname

uname -a
Linux aegir-devekko-io 4.4.0-57-generic #78-Ubuntu SMP Fri Dec 9 23:50:32 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
hostname -i
127.0.0.1 REDACTED 10.1.10.115

install utilities

apt install git wget rsync

According to Aegir maintainer colan in response to my ISSUE on Drupal.org he does this for the Postfix MTA, I’ve been caught on this numerous times on Ubuntu and Aegir

apt install postfix bsd-mailx mutt

in Postfix config I choose Internet site and aegir.devekko.io as email domain

alter /etc/postfix/main.cf

inet_interfaces = 127.0.0.1

Install Aegir 3.9

add project repositories

echo "deb http://debian.aegirproject.org stable main" | sudo tee -a /etc/apt/sources.list.d/aegir-stable.list</pre>

and archive key to keyring

wget -q http://debian.aegirproject.org/key.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt update

Install Aegir 3.9 Debian Packages

sudo apt-get install aegir3

manually enter a Mysql password (some of the Ansible installers handle this)

choose an Aegir UI domain, Aegir is installed

start the file wall

sudo ufw allow http
Rules updated
Rules updated (v6)
[email protected]:~# sudo ufw enable
Firewall is active and enabled on system startup

Sites | aegir.devekko.io - Chromium_002

Note, I did actually have issues and had to autoremove and purge postfix and tried to manually install Php etc

Installation did finally work after considerable troubleshooting. I would say that there is defintely something happening during install on Xenial that is not being handled properly.

Aegir is installed, and now its time to add a Drupal 7 and a Drupal 8 site for my project.

More in later blog posts

Self hosting the Drupal web content management system with Aegir

Serious Drupal hosting SaaS such as Pantheon starts at 25$USD per site, Acquia is something like 100$+ per site.

With the FLOSS Aegir Hosting System this cost per site can be greatly reduced. Of course total cost of ownership may still be high, when technical ability and Linux admin time are factored in.

Let’s self-hosted Aegir on an LXD/LXC container and migrate off an OVH VPS using Aegir’s built-in Remote Import feature.

I’ve worked with Ansible for Aegir in the past and there are a few Ansible roles and example playbooks on github.

As far as I can tell, none are official, so, I’ll use the Debian packages on Ubuntu Trusty 14.04 with Php5 from the official docs.

Php7 on Xenial is reportedly twice as fast and is supported, but I had errors and had no time to work through the issues.

UPDATE: I did actually get Aegir 3.9 with PHP7 on Ubuntu 16.04, but not without issues, I would say there are still issues

 

 

vi /etc/hosts

127.0.0.1 aegir.demo.io aegir-server localhost
94.84.199.93 aegir.demo.io aegir-server
10.1.10.125 aegir.demo.io aegir-server
::1 aegir.demo.io aegir-server ip6-localhost ip6-loopback

lets do an update and upgrade

sudo apt update && sudo apt upgrade

I also add the server to Debops inventory. I want unattended upgrades of Ubuntu security releases and firewall via ferm etc.

install Postfix, choose Internet site

sudo apt install postfix

 

add the Debian official repositories

echo "deb http://debian.aegirproject.org stable main" | sudo tee -a /etc/apt/sources.list.d/aegir-stable.list

 

add the archive key to the servers keyring

wget -q http://debian.aegirproject.org/key.asc -O- | sudo apt-key add - sudo apt-get update

 

install the Aegir 3 package

sudo apt install aegir3

 

the installation proceeds and you need to manually enter a mysql password (make it secure, record it in an encrypted password manager and avoid special characters)

verify URL of hostmaster frontend

re-enter mysql password

Aegir is installed and offers a login link, change username and password and email.

More parts to follow