With one click
- 3. Starting from square oneContract ✔Business analysis ✔Design and wireframes ✔Ready to start coding – right?
- 4. Where do you start?Linux VM/WAMP/MAMP/XAMPP/manual install of apache, MySQL, PHP…?Create an empty repositoryDownload latest Drupal to your checkoutStart coding?Downloading contrib modulesClick + configureCustom modules and themes?
- 9. Deployment – what’s in a name?At its simplest, it’s:Move code from repo to serverBut there’s more…Switching symlinksLinking up file paths?Clearing cachesRunning update.phpPost-deploy tasks:DB changes?Drush commands?Notify external systems?
- 10. Pushing codeIt’s all been done beforeFTPManual deployment – SSH/rsyncBash scriptRube goldberg machineCapistrano/WebistranoAnt/PhingJenkinsAegirDrushGit commandsRPM packages
- 11. Simple tools for simple problemsWith a simple setup – a single host, or a separate db and web server – a simple deployment tool may be enough.
- 12. A simple deployment script#!/bin/bash# Version to deployversion=release-1.0# SVN source of tags. Presume that credentials are already cached.svn=https://svn.example.com/my_web_site/tags# Docroot is a symlink to the current checkout.docroot=/var/www/current# Folder which contains each checkout.destination_folder=/var/www/# Checkout to a timestamped folder (format: YYYYMMDD-HHMM)timestamp=`date +%Y%m%d-%H%M`destination=$destination_folder/$timestampsvntag=$svn/$versionsvn co $svntag $destination# Switch symlink.rm -f $docrootln -s $destination $docroot# Clear caches with Drush.drush -l $docroot cc allSlides will be on slideshare.
- 16. Why is this complex to deploy?Multiple hostsMultiple rolesDifferent actions for different roles
- 26. Close site for maintenanceEnvironments, hosts, rolesDemo172.16.25.10 = web, cache, db, proxyLive192.168.20.30 = web, cache192.168.20.31 = web, cache192.168.20.32 = web, cache192.168.20.40 = db192.168.20.50 = proxy Environ-mentsHostsRoles
- 29. Pushing codeIt’s all been done beforeFTPManual deployment – SSH/rsyncBash scriptRube goldberg machineCapistrano/WebistranoAnt/PhingJenkinsAegirDrushGit commandsRPM packages
- 34. Alternatives to WebistranoWednesday 12:30“Aegir: One Drupal to Rule Them All!”Wednesday 15:00“dog: A New Era for Drupal Sitebuilding”Thursday 14:45“DrushDeploy”Jenkins (hudson)Conference sessionsDrupalcon London: August 2011
Editor's Notes
- You need a dev environment
- If you can’t automate deployment, you can’t automate testing.
- Just add more XML, right?HAProxy, varnish, web, db (master-slave
- memcache+ SOLR + NAS
- Zeus, LDAP, ESB, Beanstalkd, External services