1 of 127

Host Your Own Drupal

with Open Source

2 of 127

Jon Pugh

Consultant & Contributor

12 years 6 months on Drupal.org

4 years an Aegir Maintainer

3 of 127

Jon Pugh

Consultant & Contributor

THINKDROP

Since Dec 2009

4 of 127

Past

Present

Future

5 of 127

PROMISE

You can host your own websites with 100% free software.

6 of 127

REALITY

Setup and Maintenance is hard and time consuming.

7 of 127

Goal

To make hosting your own Drupal sites simple and easy.

8 of 127

Goal

To make hosting your own Drupal sites simple and easy

FOR EVERYONE

9 of 127

Drupal made building a website something anyone can do.

10 of 127

We want to make hosting Drupal websites something anyone can do.

11 of 127

The Past

12 of 127

13 of 127

14 of 127

15 of 127

16 of 127

“Co-location”

“Dedicated Servers”

“Virtual Private Servers”

“Shared Hosting”

17 of 127

Servers on Demand

18 of 127

19 of 127

2006

2008

2008

20 of 127

2015

2012

2011

21 of 127

22 of 127

23 of 127

24 of 127

Drupal Hosting

25 of 127

1000s of blog posts & how to articles.

26 of 127

$ apt-get install apache2 php5 mysql-server

27 of 127

$ sudo service apache2 restart

28 of 127

mod_rewrite

www-data

29 of 127

chmod

chown

30 of 127

31 of 127

32 of 127

33 of 127

34 of 127

35 of 127

36 of 127

37 of 127

38 of 127

!?!

39 of 127

40 of 127

41 of 127

System Requirements

WEB SERVER

Apache

NGINX

IIS

… anything that can run PHP

DATABASE SERVER

MySQL MariaDB Percona

PostgreSQL

SQLite

42 of 127

System Requirements

WEB SERVER

Apache

NGINX

IIS

… anything that can run PHP

DATABASE SERVER

MySQL MariaDB Percona

PostgreSQL

SQLite

DON’T CARE

43 of 127

System Requirements

WEB SERVER

Apache

NGINX

IIS

… anything that can run PHP

DATABASE SERVER

MySQL MariaDB Percona

PostgreSQL

SQLite

JUST WANT DRUPAL

44 of 127

The Checklist

For Every Drupal Site

Upload Drupal Source code

Install LAMP Server Packages

Create Database

Create Database User

Create VirtualHost Config

Create settings.php file

Create a files folder

Set secure permissions

Setup SSL Certificates

...

45 of 127

The Checklist

For Every Drupal Site

Upload Drupal Source code

Install LAMP Server Packages

Create Database

Create Database User

Create VirtualHost Config

Create settings.php file

Create a files folder

Set secure permissions

Setup SSL Certificates

...

Crontab!

Backups!

DNS!

46 of 127

47 of 127

The Checklist

For Every Drupal Site

Upload Drupal Source code

Install LAMP Server Packages

Create Database

Create Database User

Create VirtualHost Config

Create settings.php file

Create a files folder

Set secure permissions

Setup SSL Certificates

...

DON’T CARE

48 of 127

The Checklist

For Every Drupal Site

Upload Drupal Source code

Install LAMP Server Packages

Create Database

Create Database User

Create VirtualHost Config

Create settings.php file

Create a files folder

Set secure permissions

Setup SSL Certificates

...

JUST WANT DRUPAL

49 of 127

50 of 127

EASY!

51 of 127

EASY?

52 of 127

DON’T CARE

53 of 127

JUST WANT

54 of 127

DRUPAL

55 of 127

56 of 127

Just Drupal

57 of 127

SUPER

EASY!!!

58 of 127

Not Open Source

59 of 127

60 of 127

The Present

Aegir!

61 of 127

10 YEARS

62 of 127

63 of 127

Drupal + Drush = Aegir

64 of 127

65 of 127

node/add/site

66 of 127

Aegir

Fully

Automates

Your

LAMP

Stack

67 of 127

Aegir

Takes your Site Nodes and does everything needed to install a �Drupal site:

68 of 127

Aegir

Takes your Site Nodes and does everything needed to install a �Drupal site:

69 of 127

Aegir

Takes your Site Nodes and does everything needed to install a �Drupal site:

70 of 127

HTTPS

  • New Implementation of SSL for Aegir.
  • Includes support for LetsEncrypt.org: Free automatically renewing SSL certs FOR LIFE.
  • https://gitlab.com/aegir/hosting_https

71 of 127

Monitoring

72 of 127

73 of 127

74 of 127

Monitoring

Graphite+StatsD+Grafana=

75 of 127

Alerts

Grafana+WorldPing

Open Source Graphing Platform plus SaaS tool for monitoring from around the globe.

Alerts for downtime.

76 of 127

Alerts

Grafana+WorldPing

77 of 127

Continuous Integration

DevShop

Pull Request environments & Behat Testing OUT OF THE BOX.

78 of 127

79 of 127

node/add/server

80 of 127

Server Setup

used to be on you.

81 of 127

82 of 127

CLOUD

83 of 127

84 of 127

85 of 127

86 of 127

ANSIBLE

87 of 127

88 of 127

89 of 127

ANSIBLE

90 of 127

ANSIBLE REMOTE INVENTORY

91 of 127

ANSIBLE

BENEFITS

  • No manual inventory management needed.
  • No manual ansible command typing.
  • Ansible runs are logged and visible in the web interface.

92 of 127

93 of 127

94 of 127

ANSIBLE

BENEFITS

  • Central location for inventory, available over web request.
  • Remote servers can “pull” their configuration from the hostmaster site.

95 of 127

ANSIBLE

DRAWBACKS

  • Standard Aegir method for putting files on the server. (RSYNC)
  • Hostmaster server pushes code to the remotes via RSYNC.
  • Playbooks still run as aegir@hostmater

96 of 127

ANSIBLE

THE FUTURE

Ansible-Aegir-Agent:

Process runs on remote servers allowing them to configure themselves without giving out remote access, including code deploy.

97 of 127

98 of 127

DOCKER

Docker Compose

Generate a definition of your Docker container groups in YAML.

Aegir generates docker-compose.yml and runs `docker-compose up`

99 of 127

“Hosting Docker” module:

100 of 127

“Hosting Docker” module:

101 of 127

102 of 127

DOCKER

Generated Example:

103 of 127

DOCKER

BENEFITS

  • No longer need to manually launch docker containers or manually manage docker-compose.yml
  • Easy scaling with `docker-compose scale` docker-machine, swarm, etc.

104 of 127

DOCKER

BENEFITS

  • Allows separation of sites:�Each site can have it’s own set of containers, or can share with others.
  • Add additional services easily
  • Pre-configured load balancers, caches, etc.

105 of 127

DOCKER

DRAWBACKS

  • Less familiarity among sysadmins.
  • You need either trust in the container authors or to learn how to build your own.

106 of 127

107 of 127

108 of 127

109 of 127

110 of 127

111 of 127

112 of 127

113 of 127

114 of 127

115 of 127

The Future

More Docker!

116 of 127

Docker-compose based multi-tenant

multi-app

hosting.

117 of 127

NGINX-PROXY+ LETSENCRYPT

Host multiple web server containers on a single host.

118 of 127

NGINX-PROXY+ LETSENCRYPT

Set the URLs for each container in environment variables.

119 of 127

NGINX-PROXY+ LETSENCRYPT

LetsEncrypt “companion container” uses URLs in environment variables to register SSL Certificates automatically.

120 of 127

121 of 127

Docker Host

Multiple Web Servers per Host

jwilder/nginx 0.0.0.0:80

APP_1

nginx web server

APP_2

nginx web server

DATABASE

mariadb

DRUSH

SSH Server allowing Drush Access

App

APP_1

“*:80”

DATABASE

mariadb

DRUSH

SSH Server allowing Drush Access

SOLR

APP_1

“*:80”

DATABASE

mariadb

DRUSH

SSH Server allowing Drush Access

docker-compose.yml

docker-compose.yml

docker-compose.yml

122 of 127

MORE COLLABORATION!

123 of 127

The Point

We deserve easy to use open source hosting tools.

124 of 127

The Point

We can't do it alone.

125 of 127

If Drupal can democratize Site Building, Aegir & DevShop can do the same for Hosting...

126 of 127

...as long as we follow Drupal’s lead:

Modularity, Ease of Use, & Community.

127 of 127

Join Us!

#aegir on IRC @aegirproject �docs.aegirproject.org