The Dog Ate My Deployment - Symfony Usergroup Cologne July 2013

Post on 25-May-2015

359 views 0 download

Tags:

Transcript of The Dog Ate My Deployment - Symfony Usergroup Cologne July 2013

The Last Mile

Problem

Development Live

The Dog

Ate 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 Targets

For Everything

Structure Your

Ant Files

Use A Framework For This http://abc.tools.qafoo.com/

$ ant build

Rule 3: Test the quality of your

project

Jenkins PHP Template http://jenkins-php.org/

PHP QA Tools

Too many violations should

break your builds

Test performance factors

of your application

$this->assertLessThan( 10, $profile->getCollector('db') ->getQueryCount() );

Rule 4: Create deployable artifacts

Build them so that they only

need configuration to run

Create them once reuse

them in all deployments

Continous Integration

Testing Staging Live

Rule 5: Run your deployment with

only one invocation

Choose Your

Deployment Tool

Choose It

With Your Operations Team

Shell Scripts

Choose A Tool

That Helps You

Fabric

Capistrano

Rex

group myserver => "server-a", "server-b"; task "deploy", group => "frontend", sub { deploy $tarball; needs "configure"; needs "test"; };

Keep Your Deployment

Configuration With Your Code

$ rex deploy –-tarball=version1.0.1.tar.gz