with one click - drupal one click.pdf · two%phases% • cold%start:%installing%from%scratch% •...
TRANSCRIPT
![Page 1: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/1.jpg)
With One Click
Marcus Deglos Principal Engineer -‐ Capgemini @manarth
![Page 2: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/2.jpg)
Can you make a build with ONE step?
![Page 3: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/3.jpg)
StarBng from square one
• Contract ✔ • Business analysis ✔ • Design and wireframes ✔ • Ready to start coding – right?
![Page 4: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/4.jpg)
Where do you start?
• Linux VM/WAMP/MAMP/XAMPP/manual install of apache, MySQL, PHP…?
• Create an empty repository • Download latest Drupal to your checkout • Start coding? – Downloading contrib modules – Click + configure – Custom modules and themes?
![Page 5: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/5.jpg)
Stop!
Have you thought about… • Environmental consistency? • Deploying to live? • TesBng?
![Page 6: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/6.jpg)
Two phases
• Cold start: installing from scratch • UpdaBng a live site
![Page 7: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/7.jpg)
Cold start consideraBons
• Script everything. • Tools include: – drush – drush make – install profiles – distribuBons (which typically use a complex install profile)
![Page 8: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/8.jpg)
Start simple
Web server
DB
Varnish
![Page 9: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/9.jpg)
Deployment – what’s in a name? • At its simplest, it’s: Move code from repo to server
• But there’s more… – Switching symlinks – Linking up file paths? – Clearing caches – Running update.php – Post-‐deploy tasks:
• DB changes? • Drush commands? • NoBfy external systems?
![Page 10: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/10.jpg)
Pushing code It’s all been done before
• FTP • Manual deployment – SSH/rsync • Bash script • Rube goldberg machine • Capistrano/Webistrano • Ant/Phing • Jenkins • Aegir • Drush • Git commands • RPM packages
![Page 11: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/11.jpg)
Simple tools for simple problems
• With a simple setup – a single host, or a separate db and web server – a simple deployment tool may be enough.
![Page 12: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/12.jpg)
A simple deployment script #!/bin/bash # Version to deploy version=release-‐1.0 # SVN source of tags. Presume that credenBals are already cached. svn=heps://svn.example.com/my_web_site/tags # Docroot is a symlink to the current checkout. docroot=/var/www/current # Folder which contains each checkout. desBnaBon_folder=/var/www/ # Checkout to a Bmestamped folder (format: YYYYMMDD-‐HHMM) Bmestamp=`date +%Y%m%d-‐%H%M` desBnaBon=$desBnaBon_folder/$Bmestamp svntag=$svn/$version svn co $svntag $desBnaBon # Switch symlink. rm -‐f $docroot ln -‐s $desBnaBon $docroot # Clear caches with Drush. drush -‐l $docroot cc all
Slides will be on slideshare.
![Page 13: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/13.jpg)
Enterprise sites: simple
HA Proxy HA Proxy
Varnish Varnish
Web Web
DB (master) DB (slave)
![Page 14: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/14.jpg)
Enterprise sites: complex+
HA Proxy HA Proxy
Varnish Varnish
Web Web
Memcache
SOLR
NAS/SAN DB (master) DB (slave)
![Page 15: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/15.jpg)
Enterprise sites: complex++
HA Proxy HA Proxy
Varnish Varnish
Web Web
Memcache
SOLR
NAS/SAN DB (master) DB (slave)
Zeus Zeus
LDAP
ESB
![Page 16: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/16.jpg)
Why is this complex to deploy?
• MulBple hosts • MulBple roles • Different acBons for different roles
![Page 17: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/17.jpg)
Managing this with a bash script will drive you insane
![Page 18: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/18.jpg)
Deployment concepts
Hosts -‐ 192.168.20.4 -‐ web1.example.com
Roles -‐ Webserver -‐ Reverse proxy -‐ Network management
-‐ Data cache -‐ Database -‐ AuthenBcaBon host
Tasks -‐ Clear data cache -‐ Checkout code Ac5ons -‐ Deploy to stage -‐ Close site for maintenance
![Page 19: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/19.jpg)
Environments, hosts, roles
Demo 172.16.25.10 = web, cache, db, proxy
Live 192.168.20.30 = web, cache 192.168.20.31 = web, cache 192.168.20.32 = web, cache 192.168.20.40 = db 192.168.20.50 = proxy
Hosts Roles
Environ-‐ments
![Page 20: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/20.jpg)
Tasks, acBons, targets
Recipe -‐ Deploy code -‐ Restart memcache
AcBons Roles
Tasks / Recipes
![Page 21: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/21.jpg)
Pushing code It’s all been done before
• FTP • Manual deployment – SSH/rsync • Bash script • Rube goldberg machine • Capistrano/Webistrano • Ant/Phing • Jenkins • Aegir • Drush • Git commands • RPM packages
![Page 22: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/22.jpg)
Rube Goldberg deployment
![Page 23: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/23.jpg)
Webistrano
![Page 24: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/24.jpg)
Webistrano: under the hood (live demo)
![Page 25: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/25.jpg)
AlternaBves
![Page 26: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/26.jpg)
AlternaBves to Webistrano
• Wednesday 12:30 “Aegir: One Drupal to Rule Them All!”
• Wednesday 15:00 “dog: A New Era for Drupal Sitebuilding”
• Thursday 14:45 “Drush Deploy”
• Jenkins (hudson)
Conference sessions Drupalcon London: August 2011
![Page 27: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/27.jpg)
Beyond deployment
![Page 28: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/28.jpg)
Other tools
• Environment automaBon: – Puppet – Chef – Vagrant – Fabric – Quickstart
• CI & test tools – Jenkins/Hudson – Codesniffer – Selenium
![Page 29: With One Click - Drupal one click.pdf · Two%phases% • Cold%start:%installing%from%scratch% • Updang%alive%site%](https://reader035.vdocuments.mx/reader035/viewer/2022063002/5f227f3437f74a26c10556d1/html5/thumbnails/29.jpg)
QuesBons?
Twieer: Blog: Slides:
@manarth hep://deglos.com/ h:p://www.slideshare.net/manarth