Website releases made easy with the PEAR installer - Barcelona 2008

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Website releases made easy with the PEAR installer - Barcelona 2008 - Presentation 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

    + Helgi Þormar ÞorbjörnssonHelgi Þormar Þorbjörnsson, 2 years ago

    custom

    475 views, 1 favs, 0 embeds more stats

    Ever wondered if there is a easier way to manage re more

    More info about this document

    © All Rights Reserved

    Go to text version

    • Total Views 475
      • 475 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 6
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories