Aegir

51
Aegir Pure Sign Breakfast Presentation 22/02/2012 [email protected] @tthoeye Thursday 23 February 2012

description

Breakfast presentation about Aegir hosting system - by Thimo Thoeye

Transcript of Aegir

Page 1: Aegir

AegirPure Sign Breakfast Presentation 22/02/2012

[email protected] @tthoeye

Thursday 23 February 2012

Page 2: Aegir

Overview‣ From 40,000 feet

‣ Interface

‣ Architecture

‣ Use Cases

‣ Extending Aegir

‣ Resources

Thursday 23 February 2012

Page 3: Aegir

A View from 40,000 feet

Thursday 23 February 2012

Page 4: Aegir

A View from 40,000 feet

What is Aegir

Thursday 23 February 2012

Page 5: Aegir

A View from 40,000 feet

The Giant of the seas

What is Aegir

Thursday 23 February 2012

Page 6: Aegir

A View from 40,000 feet

The Giant of the seas

What is Aegir

A Drupal that creates Drupals (drupalception)

Thursday 23 February 2012

Page 7: Aegir

A View from 40,000 feet

The Giant of the seas

What is Aegir

A Drupal that creates Drupals (drupalception)

Mass create/migrate/duplicate/backup sites

Thursday 23 February 2012

Page 8: Aegir

Interface

Thursday 23 February 2012

Page 9: Aegir

Interface‣ Content Types

‣ Servers

‣ Platforms

‣ Sites

‣ Tasks

‣ Install

‣ Migrate

‣ Clone

‣ Backup

‣ ...

Thursday 23 February 2012

Page 10: Aegir

Servers

Database Servers Database port/user/password

Web Servers Require an Aegir user and shared ssh keys A restart command

Create Your Own ...

Thursday 23 February 2012

Page 11: Aegir

Servers

Only a ‘Verify’ Task

Thursday 23 February 2012

Page 12: Aegir

Platforms

Actual Drupal Installations

Located in /var/aegir/platforms

Can be built from a makefile

Thursday 23 February 2012

Page 13: Aegir

Platforms

Thursday 23 February 2012

Page 14: Aegir

Sites

Thursday 23 February 2012

Page 15: Aegir

Sites

Thursday 23 February 2012

Page 16: Aegir

Architecture

Thursday 23 February 2012

Page 17: Aegir

Architecture

Everything is a Node

Thursday 23 February 2012

Page 18: Aegir

Architecture

Everything is a Node Server / Platform / Site nodes

Thursday 23 February 2012

Page 19: Aegir

Architecture

Everything is a Node Server / Platform / Site nodes

Correspond to a Drush alias@server_localhost@[email protected]...

Thursday 23 February 2012

Page 20: Aegir

Architecture

Everything is a Node Server / Platform / Site nodes

Correspond to a Drush alias@server_localhost@[email protected]...

Task nodesdrush  hosting-­‐task  88drush  hosting-­‐dispatch

Thursday 23 February 2012

Page 21: Aegir

Architecture

Everything is a Node Server / Platform / Site nodes

Correspond to a Drush alias@server_localhost@[email protected]...

Task nodesdrush  hosting-­‐task  88drush  hosting-­‐dispatch

nid

Thursday 23 February 2012

Page 22: Aegir

Architecture

Drupal 6

Thursday 23 February 2012

Page 23: Aegir

Architecture

Drupal 6

Hostmaster Profile

Thursday 23 February 2012

Page 24: Aegir

Architecture

Drupal 6

Hostmaster Profile

Eldir Theme

Modules

Thursday 23 February 2012

Page 25: Aegir

Architecture

Drupal 6

Hostmaster Profile

Eldir Theme

Modules

• hosting_dns• hosting_server• hosting_platform• hosting_site• hosting_client• hosting_task• hosting_migrate• ...

Thursday 23 February 2012

Page 26: Aegir

Architecture

Drupal 6

Hostmaster Profile

Eldir Theme

Modules

• hosting_dns• hosting_server• hosting_platform• hosting_site• hosting_client• hosting_task• hosting_migrate• ...

Drush

Thursday 23 February 2012

Page 27: Aegir

Architecture

Drupal 6

Hostmaster Profile

Eldir Theme

Modules

• hosting_dns• hosting_server• hosting_platform• hosting_site• hosting_client• hosting_task• hosting_migrate• ...

Drush

Provision

Thursday 23 February 2012

Page 28: Aegir

Architecture

Drupal 6

Hostmaster Profile

Eldir Theme

Modules

• hosting_dns• hosting_server• hosting_platform• hosting_site• hosting_client• hosting_task• hosting_migrate• ...

Drush

Provision

DNS

Platform

...

Thursday 23 February 2012

Page 29: Aegir

Architecture

Drupal 6

Hostmaster Profile

Eldir Theme

Modules

• hosting_dns• hosting_server• hosting_platform• hosting_site• hosting_client• hosting_task• hosting_migrate• ...

Drush

Provision

• migrate.provision.inc• delete.provision.inc• verify.provision.inc• ...

DNS

Platform

...

Thursday 23 February 2012

Page 30: Aegir

Architecture

Drupal 6

Hostmaster Profile

Eldir Theme

Modules

• hosting_dns• hosting_server• hosting_platform• hosting_site• hosting_client• hosting_task• hosting_migrate• ...

Drush

Provision

• migrate.provision.inc• delete.provision.inc• verify.provision.inc• ...

DNS

Platform

...

Thursday 23 February 2012

Page 31: Aegir

Use Cases

Thursday 23 February 2012

Page 32: Aegir

Use Cases‣ Mass-update client sites

‣ Manage dev - staging - production

‣ Create a SaaS product

Thursday 23 February 2012

Page 33: Aegir

Extending Aegir

Thursday 23 February 2012

Page 34: Aegir

Extend‣ Sending extra information to drush

‣ Create new Tasks

‣ Use it for evil

Thursday 23 February 2012

Page 35: Aegir

Sending information to drush

Thursday 23 February 2012

Page 36: Aegir

Sending information to drush

Excellent article by mig5http://community.aegirproject.org/node/75

Learn how to Create a hosting submodule Extend ‘Create Site’ form Send information to the backend Customize VirtualHost Configuration

Thursday 23 February 2012

Page 37: Aegir

Create Custom Tasks

Thursday 23 February 2012

Page 38: Aegir

Create Custom Tasks

Create Custom Tasks

function hook_hosting_tasks() { $options = array();

$options['site']['clone'] = array( 'title' => t('Clone'), 'description' => t('Make a copy of a site.'), 'weight' => 5, 'dialog' => TRUE, ); return $options;}

Define task for context (server/platform/site)

Thursday 23 February 2012

Page 39: Aegir

Create Custom Tasks

Create Drush Commandfunction hook_drush_command() { $items['provision-clone'] = array( 'description' => 'Clone a site between platforms.', 'arguments' => array( '@new_site' => dt('The Drush alias of the new site... '@platform_name' => dt('The Drush alias of... 'examples' => array( 'drush @site provision-clone @new_site @pla... ), 'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_ROOT ); return $items;}

Task calls provision-task_name drush command

Thursday 23 February 2012

Page 40: Aegir

Create Custom Tasks

Implement hooks

drush_HOOK_hosting_task_validatedrush_HOOK_pre_hosting_taskdrush_HOOK_hosting_taskdrush_HOOK_post_hosting_task

Hook into hosting task execution (in task.drush.inc)

Thursday 23 February 2012

Page 41: Aegir

Create Custom Tasks

Implement hooks

drush_HOOK_pre_provision_TASKdrush_HOOK_provision_TASKdrush_HOOK_post_provision_TASK

Hook into provision (in task.provision.inc)

Thursday 23 February 2012

Page 42: Aegir

Use it for Evil

Thursday 23 February 2012

Page 43: Aegir

Use it for Evil

Use it for EvilDefining new Content Types

Thursday 23 February 2012

Page 44: Aegir

Use it for Evil

Use it for EvilDefining new Content Types

Thursday 23 February 2012

Page 45: Aegir

Use it for Evil

Use it for EvilDefine tasks on the new types

Thursday 23 February 2012

Page 46: Aegir

Use it for Evil

Use it for EvilInteract with existing types

Thursday 23 February 2012

Page 47: Aegir

Use it for Evil

Integrate custom softwareAnd let Aegir believe it’s Drupal

Create drush alias Build custom ‘services’

e.g. To let Aegir write VirtualHost configuration for catalogs

Thursday 23 February 2012

Page 48: Aegir

Resources

Thursday 23 February 2012

Page 49: Aegir

Resources

community.aegirproject.org api.aegirproject.org drupal.org/project/hostmaster drupal.org/project/provision #aegir

...

Resources

Thursday 23 February 2012

Page 50: Aegir

Resources

Resources2.x Roadmap

Port the frontend to D7 From a hub-spoke to a mesh model Modularization Statistics improvements Full DNS Support

...

Thursday 23 February 2012