1 / 35

Managing Drupal with Aegir

Managing Drupal with Aegir. Chris Burge Burge Consulting, LLC. Dublin, Ireland Drupal Dev Days. 30 June 2013. Creating a New Site. Create directory space (& deal with permissions) Deploy codebase (& deal with permissions) Configure Apache Restart Apache Create database

zalika
Download Presentation

Managing Drupal with Aegir

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Managing Drupal with Aegir Chris BurgeBurge Consulting, LLC Dublin, Ireland Drupal Dev Days 30 June 2013

  2. Creating a New Site • Create directory space (& deal with permissions) • Deploy codebase (& deal with permissions) • Configure Apache • Restart Apache • Create database • Create database user • Assign database permissions • Enter database credentials into settings.php • Run Drupal installer

  3. Enter Aegir

  4. What is Aegir? “The Aegir hosting system allows developers and site administrators to automate many of the common tasks associated with deploying and managing large websites. Aegir makes it easy to install, upgrade, deploy, and backup an entire network of Drupal sites.”Source: http://www.aegirproject.org/

  5. What is Aegir? “The Aegir hosting system allows developers and site administrators to automate many of the common tasks associated with deploying and managing large websites. Aegir makes it easy to install, upgrade, deploy, and backup an entire network of Drupal sites.”Source: http://www.aegirproject.org/

  6. Aegir Basics • Server • Web server (Apache) • Database server (MySQL) • Platform • Drupal 6.28 • Drupal 7.22 • Site • blog.chrisburge.net • Client • Somewhat similar to a role • Day Cloud Studios (daycloudstudios) • Two users, lhunt and mvassios, are assigned to ‘daycloudstudios’ client

  7. Aegir Basics

  8. Site C Site D Site G Site H Site B Site F Site A Site E Platform Platform Platform Platform Web Server Web Server

  9. Database Server Database Server Site C Site D Site G Site H Site B Site F Site A Site E Platform Platform Platform Platform Web Server Web Server

  10. Database Server Database Server Site C Site D Site G Site H Site B Site F Site A Site E Platform Platform Platform Platform Web Server Web Server

  11. Servers

  12. Platforms

  13. Sites

  14. Installation • Install system requirements # yum install httpd php php-mysql php-cli php-gd php-process sudo rsync git postfix mysql-server • Create user ‘aegir’ and add to group ‘apache’ # useradd --home-dir /var/aegir aegir # gpasswd -a aegir apache # chmod -R 755 /var/aegir

  15. Installation • Create Apache configuration file symlink # ln -s /var/aegir/config/apache.conf /etc/apache2/conf.d/aegir.conf • Grant ‘aegir’ permission to restart Apache • Open ‘sudoers’ file # visudo • Insert configuration below: Defaults:aegir !requiretty aegir ALL=NOPASSWD: /usr/sbin/apachectl

  16. Installation • Install Drush # pear channel-discover pear.drush.org # pear install drush/drush-4.5.0 • Become user ‘aegir’ # sudo –u aegir –i

  17. Installation • Install provision • Provision is the backend of Aegir # drush dl --destination=/var/aegir/.drush provision-6.x • Install hostmaster • Hostmaster is the frontend of Aegir # drushhostmaster-install (Hostmaster is a Drupal profile and runs on Drupal 6.x)

  18. Aegir Web Interface

  19. Aegir Web Interface

  20. Creating a Platform

  21. Make Files ; Drush Make (http://drupal.org/project/drush_make) api = 2 core = 7.x ; Drupal core projects[drupal][type] = coreprojects[drupal][version] = 7.22 projects[wysiwyg][subdir] = contrib projects[wysiwyg][version] = 2.2 projects[views][subdir] = contrib projects[views][version] = 3.7 projects[views][patch][1744478] = http://drupal.org/files/views-fill_up_single_row-1744478-8.patch

  22. Make Files projects[views_php][subdir] = contrib projects[views_php][type] = module projects[views_php][download][type] = git projects[views_php][download][url] = http://git.drupal.org/project/views_php.git ;projects[views_php][download][branch] = 7.x-1.x projects[views_php][download][revision] = 2b5ed52228394ee3c8e8c86be283da957cdfa6f6 ; CKEditor 3.6.2 libraries[ckeditor][download][type] = file libraries[ckeditor][download][url] = "http://download.cksource.com/CKEditor/CKEditor/CKEditor%203.6.6/ckeditor_3.6.6.tar.gz" libraries[ckeditor][directory_name] = ckeditor libraries[ckeditor][type] = library

  23. Creating a Platform

  24. Viewing Packages on a Platform

  25. Creating a Site

  26. Creating a Site

  27. Managing a Site

  28. Migrating a Site

  29. Migrating a Site

  30. Cloning a Site

  31. Custom Hooks • Aegir provides hooks • E.g. add MemCache config to settings.php • Create file customhook.drush.inc in /var/aegir/.drush function customhook_provision_drupal_config($uri,$data) { if($uri==”aegir.chrisburge.net") { return NULL; } ### Memcache ## Make a unique key for a site (special character not permitted) $unique = str_replace('.','',str_replace('-','',$uri)); $returnArray [] = "### Memcache ### \$conf['cache_backends'][] = 'sites/all/modules/contrib/memcache/memcache.inc'; // the path to the core cache file include_once('./includes/cache.inc'); // the path to the memcache cache file include_once('./sites/all/modules/contrib/memcache/memcache.inc'); // make MemCacheDrupal the default cache class \$conf['cache_default_class'] = 'MemCacheDrupal'; # Key Prefix: edit this for multisite use. \$conf['memcache_key_prefix'] = \"$unique\"; \$conf['memcache_servers'] = array( '127.0.0.1:11211' => 'default', ); \$conf['memcache_bins'] = array( 'cache' => 'default', ); ”; return $returnArray; }

  32. Other Features

  33. Other Features

  34. Links • Aegir • http://www.aegirproject.org/ • http://community.aegirproject.org/ • http://drupal.org/project/provision • http://drupal.org/project/hostmaster • Drush • http://drush.ws/ • http://drupal.org/project/drush • http://drupal.org/project/drush_make

  35. Questions?

More Related