Website releases made easy with the PEAR installer - Presentation Transcript
Website releases made easy with the PEAR installer
Helgi Þormar Þorbjörnsson
Who Am I ?
An Icelandic guy with a weird name
iBuildings UK
PEAR Group member
PEAR Developer – among other things, the installer
pear.php.net maintainer
PEAR <insert-job-title> ;-)
Tuesday, February 26, 2008
How to pronounce my 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
Alternative, not a replacement
Deploying websites with the PEAR installer is an alternative, not a replacement for other approaches.
Other alternatives
FTP Upload
SCP / rsync
Capistrano
SVN / CVS / <insert fancy version control> deployment
etc etc etc
PEAR Installer features to the rescue
Easy upgrading
Custom tasks
Post installation tasks
PEAR Installer features to the rescue
Custom file roles
Ability to depend on a PEAR installable packages
Easy to split websites into smaller parts and give each part their own release cycle
Last but not least
Tasks, custom file roles and so on are done with something we are familiar with ....
What is required
The PEAR Installer
Knowledge how to package your code with the installer
A bit of know how and RTFM skills
And not being afraid to read the source ;-)
Dismantling your site
Split your site into logical pieces
Do not split into as many packages as you can!
Micro management is bad, mmmmkay
Dismantling your site
Each piece of site has its own package.xml file
The website it self (the core package) has its own package.xml which all the split off pieces will depend on
Dismantling your site Web Services Backend Frontend Forum Website
The packages we get
Website
Website_Frontend
Website_WebServices
Website_Backend
Website_Forum
Custom file roles
This feature allows you to write your own file roles
PEAR supports php, test, data, www and src by default
People have written their own file roles for various whacky reasons:
In relation to templates
Custom handling of data files
Just to name few
Post installation tasks
Handy feature for all the family
Write a simple PHP task that you can run after the installation
Clean up after the installation, temp dirs or similar
DB setup / upgrade tool
vhost adding / updating
Prime Caches
And just about anything you can dream up
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 "pear run-scripts pear/pearweb" to finish setup. DO NOT RUN SCRIPTS FROM UNTRUSTED SOURCES
0 comments
Post a comment