WADF: Web Application Deployment Framework

WADF is a simple templating and deployment system to make deployment of complex web applications simpler and more reliable. It’s designed to be generic and not programming language specific although it’s currently mainly focused on a typical LAMP (Linux/Apache/PHP/MySQL) environment. It’s GPL-licensed.

WADF makes my life easier and quicker: more coding, less configuration. I hope it does for you too.

[Slides from the talk at PHP London 3rd Dec 09]

Example

$ wadf-deploy mywebapp
Do you want to deploy database(s) if relevant? This will ERASE the existing database(s) (y/n):y
Checking out svn+ssh://svn@svn.example.com/apps/mywebapp/trunk...
Please enter the database password (for deployment) (to deploy/undeploy database mywebapp
on localhost, as user 'myuser'):
[password]

PEAR dependencies found; creating a PEAR installation in /home/myuser/mywebapp/pear_local
 (config file is /home/myuser/mywebapp/pear_local/.pearrc)...
	install ok: channel://pear.php.net/Archive_Tar-1.3.3
	install ok: channel://pear.php.net/Structures_Graph-1.0.2
	install ok: channel://pear.php.net/Console_Getopt-1.2.3
	install ok: channel://pear.php.net/XML_Util-1.2.1
	install ok: channel://pear.php.net/PEAR-1.9.0
Discovering PEAR channel pear.timj.co.uk...
	install ok: channel://pear.timj.co.uk/Role_Application-1.0.0
Installing PEAR dependencies...
	upgrade ok: channel://pear.timj.co.uk/PHPOF-1.0.10
	upgrade ok: channel://private.example/Zend_Framework-1.9.2
	upgrade ok: channel://pear.php.net/Text_Diff-1.1.1
	upgrade ok: channel://pear.php.net/Net_FTP-1.3.7
	upgrade ok: channel://pear.php.net/Net_URL-1.0.15
	upgrade ok: channel://pear.php.net/Net_Socket-1.0.9
	upgrade ok: channel://pear.php.net/HTTP_Request-1.4.4
	upgrade ok: channel://__uri/mywebapp-1.1.0
Setting up database mywebapp on host localhost...
	Deleting existing tables in database mywebapp...
	Deploying new schema for database mywebapp as user myuser...
Deploying webserver configuration...
Deploying scheduled jobs from /home/myuser/mywebapp/crontab...
Running kickstart script /home/myuser/mywebapp/setup.php...
----------- OUTPUT BELOW IS FROM KICKSTART SCRIPT, NOT WADF -----------
Set up initial database content.....................OK
------------------- END OF KICKSTART SCRIPT OUTPUT --------------------
Restarting webserver...
Starting WADF HTTPD instance: [ OK ]
Listening on port 10080 and configured for the following applications:

 mywebapp: (/home/myuser/mywebapp)
   ver=DEVTR:1792
   http://mywebapp.localhost.localdomain:10080

$ firefox http://mywebapp.localhost.localdomain:10080

[working app!]

Key features

  • Abstraction of all system (deployment)-specific information including database details, file paths etc. (currently supports MySQL but could be easily extended)
    • includes generation of database, hostname and other details if required
    • very configurable, doesn’t force you to use particular file layouts or naming schemes
  • Simple database management including setup of database server
  • PEAR Installer and SVN integration for dependency management
  • Version control system-aware (currently supports Subversion; designed to support other systems)
  • Webserver configuration management
  • Scheduled job (cron) management
    • includes ability to manage a local, user-controlled “micro” webserver for development on a local workstation
  • PHP-aware; supports both mod_php and CGI PHP installations

For more information, see the documentation and the step by step guide to setting up a workstation environment to deploy an application using WADF.

Downloads

You can also install using PEAR from Tim Jackson’s PEAR channel server at pear.timj.co.uk; the package name is “Tools_WADF”.

Feedback/bugs/feature requests

  • Feedback is welcome especially with patches (some useful areas would be for example to add Windows support, remove some of the hacks etc.)
  • The WADF bugtracker tracks bugs, features and roadmaps for future releases. You can also use GitHub issues & pull requests. Patches, feedback etc.  welcome!

Version control

WADF source code is currently hosted at GitHub.