Website releases made easy with the PEAR installer, OSCON 2009

2,139 views

Published on

Published in: Technology, Self Improvement
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
2,139
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
13
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Ask people what they use and how they use it
  • Deploying websites with the PEAR installer is an alternative, not a replacement for other approaches.
  • Tasks, custom file roles and so on are done with something we are familiar with ....
  • Each piece of site has its own package.xml file The website it self has its own package.xml
  • Security implications
  • Good place to study how things are built up
  • Now we run these pseudo packages and we want to install only part of our website structure This will install your only those 3 parts of your website along site all the deps which one of those is the Website .
  • Website releases made easy with the PEAR installer, OSCON 2009

    1. 1. OSCON, July 2009
    2. 2. Head of R&D at echolibre , pear extraordinaire, published author, party person and an Icelander
    3. 3. Not just for website deployment. Also for ... Application deployment
    4. 4. Other solutions <ul><li>FTP Upload
    5. 5. SCP / rsync
    6. 6. Capistrano
    7. 7. SVN / CVS / Git / <insert here>
    8. 8. etc etc etc </li></ul>
    9. 9. Alternative, not a replacement.
    10. 10. PEAR Installer features to the rescue File roles Tasks Post installation tasks Provides plugin architecture
    11. 11. PEAR Installer features to the rescue upgrade. depend on external packages. split websites into plugin pieces. Easy to
    12. 12. Last but not least...
    13. 14. What is required The PEAR Installer Knowledge how to package your code with PEAR A bit of know how and RTM skills And not being afraid to read the source ;-)
    14. 15. Dismantling your site Split your site into logical plugins Do not split into as many packages as you can! Micro management is bad, mmmmkay
    15. 16. Web Services Backend Frontend Forum Website
    16. 17. The packages we get Website Website_Frontend Website_WebServices Website_Backend Website_Forum
    17. 18. <ul><li>Something to take note of </li></ul>www role files install directly into web dir
    18. 19. Maintain only one website on the server Make every website have their own pear config Utilize the baseinstalldir attribute on the top dir <ul><li>Ways to get past that “shortcoming” </li></ul>
    19. 20. File Roles Default file roles: php , test , data , doc , cfg , www , script , ext & src People have written their own custom file roles.
    20. 21. Custom file roles In relation to templates Custom handling of data files Just to name few
    21. 22. Post installation tasks PHP task that you run after the installation
    22. 23. Post installation tasks Post installation tasks Clean up after the installation, temp dirs or similar DB setup / upgrade tool Virtual Host adding / updating Prime Caches And just about anything you can dream up
    23. 24. Need to know about post install We do not run post install script auto!
    24. 25. 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 Install database? [y] : 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 Install database? [y] :
    25. 26. Post install task Multiple questions that have multiple options Ability to skip question group based on user input
    26. 27. 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: 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:
    27. 28. Real world example http://svn.php.net/pear/pearweb/package.xml http://svn.php.net/pear/pearweb/package-pepr.xml http://svn.php.net/pear/pearweb/pearweb.php In package.xml look for pearweb.php and you see how we do it for pear.php.net
    28. 29. Puzzling the pieces together pear install –a Website_WebServices Website_Frontend Website_Backend
    29. 30. Web Services Backend Frontend Website
    30. 31. Questions?
    31. 32. http://pear.php.net/manual/en/ http://www.packtpub.com/PEAR-Installer/book PHP Architect Articles [email_address] @h on twitter Resources

    ×