2Tools• Ubuntu• Apache HTTP Server• MySQL (Rackspace Cloud Databases)• PHP• Drupal• Varnish CacheTo get started, you need a fresh cloud server instance (or other server)running Ubuntu, with root or sudo access. You will also need a freshdatabase, with the host and user credentials handy to complete the Drupalinstall.Thats it! Now that you have these items, lets begin.
3Step 1: Update your package managerapt-get updateUpdating your package manager ensures you haveaccess to the latest software packages
4Step 2: Install Puppetapt-get install puppetPuppet is available via the common repos. Installation iseasy and we will add our own drupalstack puppetmodule to set everything up.
5Step 3: Install gitapt-get install git-coreWe will need git to clone this repo and obtain the baseDrupal application code and drupalstack Puppetmodule.
6Step 4: Clone this repogit clone https://github.com/bighappyface/drupal-cloud-tutorial.gitNow that we have the code we can configure this serverto run our Drupal application
7Step 5: Copy module to the Puppetmodules foldercp -r drupal-cloud-tutorial/drupalstack /etc/puppet/modules/drupalstackAll Puppet modules from the Puppet Forge will beinstalled here as well.
8Step 6: Install Apache and configurepuppet apply -e "includedrupalstack::apache"This class follows a standard pattern in Puppet:Package/File/Service
9Step 7: Install PHPpuppet apply -e "include drupalstack::php"This class is very simple: install PHP and the necessaryextensions for Drupal. Also, it installs libapache2-mod-php5 to ensure Apache and PHP work together.
10Step 8: Install and centralize Drupalpuppet apply -e "includedrupalstack::drupalcore"This technique provides a simple method of upgrading/downgrading Drupal Core without modifying ordeploying your application code.To change Drupal Core, simply update the"$drupal_version" variable to the desired version andrun the class.
11Step 9: Configure Drupal requirementspuppet apply -e "includedrupalstack::drupalapp"This class provides the most common final steps ofsetting up a new Drupal site.
12Lessons Learned - DevelopmentOur Drupal application code is decoupled from a full copyof Drupal core.• Application-specific code under version control• Small file size• Easy upgrade of Drupal core via symlink update
13Our Drupal application is wrapped within a Puppetmodule that defines the full application stack necessaryto run our whole application.• Application-specific stack configuration and essentials• Fire-and-forget design to deploy servers and applicationin isolation• Configuration under version control to adapt deploymentprocess with application overtime.Lessons Learned - Deployment
14Our Puppet module provides a convenient and reliablemethod for maintaining our application configurationsand dependencies.• Application-specific package, service, and file inventoryand documentation• Configuration under version control to adaptdependencies with application overtime• Limitless expansion and enhancement options forlogging, monitoring, caching, etc.Lessons Learned - Automation
15Install Varnish cache, an HTTP accelerator. We caninstall it on our server using a Drupal-specificconfiguration and store the raw HTTP output of ourapplication in memory, along with all resources.To get it going, apply the Puppet class as shown below:puppet apply -e "includedrupalstack::varnish"Bonus – HTTP Accelerator
16Can you think of a class that could combine these stepsinto a single step?With tools like Vagrant, could we tie our Puppet moduleinto a provisioning service to automate spawninginstances and applying our module?For deployment, could offerings such as Cloud Backup,Cloud Load Balancers, and Cloud Monitoring beintegrated to improve your applications stability,scalability, and reliability?Next Steps