The Dog Ate My Deployment - PHP Uncoference September 2013

Post on 25-May-2015

1109 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

Transcript

The Last Mile Problem

Development

Live

The DogAte My Deployment

Rule 1:Implement deployment at the beginning of your project

+https://puphpet.com/

Every configuration has to be done by Puppet

Developers and Operations share the same configuration

Rule 2:Automate everything

Create TargetsFor Everything

Structure YourAnt Files

Use A Framework For Thishttp://abc.tools.qafoo.com/

<project> <property file="default.properties"/> <import> <fileset dir="${basedir}/extensions"> <include name="*.xml"/> </fileset> </import> <extension-point name="build-cleanup" /> <extension-point name="build-prepare" /> <target name="build:ci" depends=" test:run, package:create" /></project>

$ ant quality:report

Rule 3:Test the quality of your project

Jenkins PHP Templatehttp://jenkins-php.org/

PHP QA Tools

Too many violations should break your builds

Rule 4:Create deployable artifacts

Build them so that they only need configuration to

run

Create them once, reuse them in all deployments

Copy ArtifactsBuild PromotionAmazon S3

ContinousIntegration

Testing Staging Live

Rule 5:Run your deployment with only one invocation

Choose YourDeployment Tool

Choose ItWith Your Operations

Team

Shell Scripts

Choose A ToolThat Helps You

Fabric

def deploy(docroot): put('release.tar.gz', 'release_dir') run('tar xzf release.tar.gz')

with cd(release_dir): run('ant symfony:cache-clear') sudo('service nginx restart')

Keep Your DeploymentConfiguration With Your

Code

$ fab deploy:/var/www –H host1,host2,host3

top related