Your SlideShare is downloading. ×
0
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Website releases made easy with the PEAR installer - Barcelona 2008
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Website releases made easy with the PEAR installer - Barcelona 2008

690

Published on

Ever wondered if there is a easier way to manage releases for your website ? You will learn how to harness the power of the PEAR installer to make the release process as lean, mean and slick as …

Ever wondered if there is a easier way to manage releases for your website ? You will learn how to harness the power of the PEAR installer to make the release process as lean, mean and slick as possible so even your interns will be able to handle it.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
690
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
8
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Website releases made easy with the PEAR installer Helgi Þormar Þorbjörnsson [email_address] FrOSCon 2008 24 / 08 / 2008
  • 2. Who am I ?
    • An Icelandic guy with a weird name
    • iBuildings UK
    • PEAR Group member
    • PEAR Developer – Among other the installer
    • pear.php.net maintainer
    • PEAR <insert-job-title> ;-)
  • 3. How to pronounce my last name
    • Þormar Þorbjörnsson being my last name
    • ASCII version being Thormar Thorbjoernsson
    • Þ = Th and pronounced like That or a Thorn
    • Now you are more enlightened about this Icelandic thing called Thorn
  • 4. Alternative, not a replacement
      • Deploying websites with the PEAR installer is an alternative, not a replacement for other approaches
  • 5. Other alternatives
    • FTP upload
    • SCP / rsync
    • Capistrano
    • SVN / CVS / <insert fancy VC here> deployment
    • etc etc etc
  • 6. PEAR installer features to the rescue
    • Easy upgrading
    • Custom tasks
    • Post install tasks
  • 7. PEAR installer features to the rescue
    • Custom file roles
    • Able to depend on PEAR installable packages
    • Easier to split the site up into smaller parts and handle them like their own releases
  • 8. Last but not least
      • Tasks, custom roles and so on are all done with something we are familiar with ......
  • 9.  
  • 10. What's required
    • The PEAR installer
    • Knowledge how to package up your code with PEAR installer
    • A bit of know how and RTFM skills
    • And not be afraid of reading the source ;-)
  • 11. Dismantling your site
    • Split your site into logical pieces
    • Don't split it into as many packages as you can!
    • Micro management is bad, mmmkay
  • 12. Dismantling your site
    • Each piece gets its own package.xml
    • The website it self has a package.xml and all the other pieces will depend on it
  • 13. Dismantling your site Web Services Backend Frontend Forum Website
  • 14. The packages we get
    • Website
    • Website_WebServices
    • Website_Frontend
    • Website_Backend
    • Website_Forum
  • 15. Custom file roles
    • This feature allows you to write your own file role
    • PEAR supports php, data, test, www, src by default
    • People have been using them for various whacky things
      • In relation to templates
      • Custom handling of data files
      • And more things, the sky is the limit
  • 16. Post install tasks
    • Handy feature for all the family
    • Write a simple PHP task that you can run after installation
      • Clean up after the installation, tmp dirs etc
      • DB setup tool
      • Prime caches
      • And just whatever you can dream up
  • 17. Need to know about post install We do not run post install script auto! Quick output what it looks like to have a post install script around pear/pearweb has post-install scripts: /usr/share/PEAR/pearweb.php pearweb: Use &quot;pear run-scripts pear/pearweb&quot; to finish setup. DO NOT RUN SCRIPTS FROM UNTRUSTED SOURCES
  • 18. Post install tasks <file name=&quot;postinstall.php&quot; role=&quot;php&quot;> <tasks:postinstallscript> <tasks:paramgroup> <tasks:id> askdb </tasks:id> <tasks:param> <tasks:name> yesno </tasks:name> <tasks:prompt> Install database? </tasks:prompt> <tasks:type> yesno </tasks:type> <tasks:default> y </tasks:default> </tasks:param> </tasks:paramgroup> </tasks:postinstallscript> </file>
  • 19. Post install tasks pear run-scripts pear/pearweb Including external post-installation script &quot;/usr/share/PEAR/pearweb.php&quot; - any errors are in this script Inclusion succeeded running post-install script &quot;pearweb_postinstall->init()&quot; init succeeded Update pearweb database? [y] :
  • 20. Post install tasks
    • Add more tasks:param to tasks:paramgroups to so the user gets more questions per task id
    • Has the ability to skip a param group based on user input
    • tasks:type has 3 different types
      • string
      • password
      • yesno
  • 21. Update pearweb database? [y] : 1. Database driver : mysqli 2. Database User name : pear 3. Database password : pear 4. Database host : localhost 5. Database name : pear 1-5, 'all', 'abort', or Enter to continue:
  • 22. Real world example
    • http://cvs.php.net/pearweb/package.xml
    • cvs.php.net/pearweb/package-pepr.xml
    • http://cvs.php.net/pearweb/pearweb.php
    In package.xml look for pearweb.php and you see how we do it for pear.php.net Good place to study how things are built up
  • 23. Puzzling the pieces together
    • Now we run these pseudo packages and we want to install only part of our website structure
    • pear install –alldeps Website_WebServices Website_Frontend Website_Backend
    • This will install your only those 3 parts of your website along site all the deps which one of those is the Website.
  • 24. Puzzling the pieces together Web Services Backend Frontend Website
  • 25. Questions ? [email_address]
  • 26. Resources
    • http://c7y.phparch.com (Look for my articles)
    • http://pear.php.net/manual/en/
    • http://www.packtpub.com/PEAR-Installer/book

×