• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Automating Web Application Deployment

Automating Web Application Deployment






Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Automating Web Application Deployment Automating Web Application Deployment Presentation Transcript

  • Automating WebApplication Deployment Mathew Byrne - July 2011
  • Introduction• What is the problem?• What is deployment? • Web application life-cycle.• My background — JB Interactive. • How we automated deployment. • Benefits and business case.
  • Why Automate Deployment?• Automated, repeatable, consistent process.• Light-weight code changes.• Manage configurations and environments.• Minimise human error.• Saves time == higher efficiency• Standardise across projects.
  • Deployment Tools• Lots of tools already in existence: • Fabric (python) • Capistrano (ruby) • Rake (ruby) • make (C)• Not many established PHP solutions…
  • Phing• PHing Is Not Gnu make• A build tool; not just a deploy tool.• Uses XML configuration to automate tasks.• Based on Apache Ant.• Used by Propel, Symfony, Zend Framework, Xinc…
  • Why Use Phing?• Written in pure PHP - easy to hack!• Minimal dependancies.• Supported, moderate ongoing development.• Functionality through extending.
  • What Can Phing do?• Almost anything! • Version Control - Subversion, git, etc. • PHPUnit/Testing • Code analysis • Compilation and Minification • File Manipulation • And much, much more…
  • Phing Basics• Project - build.xml• Targets • Dependency tracking.• Tasks • Phing building blocks. • Usually this is where you extend.
  • Phing Basics• Properties • User variables! • Can be stored in external files and included at run-time. • Can differ between builds, environments and configurations. • Can be overwritten at run-time
  • Hello World!<?xml version="1.0" encoding="UTF-8"?><project name="hello-world" default="greet"> <property name="message" value="Hello World!" /> <target name="prepare"> <echo>Preparing your greeting...</echo> </target> <target name="greet" depends="prepare"> <echo msg="${message}" /> </target></project>
  • Hello World!
  • Config Management• Using properties separates tasks from environments.• Allows for more generic deploy setups. prop <?xml prop development.ini prop test.ini build.xml production.ini
  • Extending Phing• As simple as extending a base class and pointing to it in your build script.• Lots of extensions already in existence. • Read through phing documentation. • Search GitHub for “phing”• Easy to integrate with existing tools.https://github.com/mathewbyrne/closure-task
  • Environments• Defined by configuration.• Should have sensible defaults.• Activated by deployment process.• Important - can be a security issue! development staging production
  • Deploying with Version Control• Websites are more than just <code> • Configuration • User Content • Assets • Setup • Databases Schemas• Version Control is easy, but not flexible.• Deployment procedure not in VC.
  • Database Migrations• Migrations == Database versioning.• Automation required.• Should be part of the deployment process.
  • Conclusion• Automated deployment is highly desirable.• Lots of tools in existence.• Environment and configuration are important.• Automate everything!