Tips and tricks for building Large web applications with Drupal Presented by MihaiCeusan and ViorelZidariu
Using migraine for database migration (advantages and disadvantages) how to use Drupal Module Install Scripts High Performance Drupal multisite in a cloud environment: distributing the load, dividing the problem into more manageable tasks using Drush for updates and automation optimizing the Multisite update process Goals of this Presentation
Introduction to the project GROGGER ( getgrogger.com ) is a crowdsourcing group blog ( group + blog = grog ) Two components: Drupal multisite instance for the grogs and a Code Igniter app that allows users to create a grog in just two steps Grog creation is a two steps process: Creating the Drupal site ( file system, new database, generation the settings.php file) – done via sh scripts Creating the grog admin user based on the registration data – done via the Drupal BOOTSTRAP system
BootstrapingDrupal BootstrapingDrupal involves loading the necessary files in order to have the basic Drupal functionality in a remote php file( existing on the same server but outside the Drupalinstalation ) Bootstraping can be easily done: include the file /includes/bootstrap.inc and use the Drupal functions
Challenge - deployment Next step: build a proper deployment process Main architecture: Development environment Staging environment Production environment Challenge : deploy changes from one environment to the others ( including different dev environments) Code deployment done via version control ( GIT in our case )
Using Migraine A Drupal site ( app ) is not made just from code but also from settings ( modules, blocks, views, themes, etc ) Migraine ( Drupal test-to-production migration tool ) is a set of python scripts. How it works ? Easy !!!Migraine uses the Drupal database categories ( config, content, temp, cache ). The deploy script does a db dump of the config files, you move to the new env and run the update scripts (updates the db)
Using Drupal Install Scripts Drupal provides functionality to create module install scripts. Save time on the deploy and improve the Q/A process Load a production db easily and run the updates to test the functionality before deploying To deploy the updates, just run the update.php file and Drupal handles the rest for you!
.install Files create a file named module_name.install and put it in the module’s file directory Hooks available to .install files Hook_install() Hook_uninstall() Hook_enable() Hook_disable() Hook_requirements() Hook_schema() Hook_update_n()