Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Till Klampaeckel:
Speeding up composer on AWS OpsWorks
Oct 09, 2013 @ 17:10:25

Till Klampaeckel has a new post today showing how to get your Composer installation (and package install) to work a bit faster on the Amazon AWS OpsWorks management system.

At EasyBib, we're heavy users of composer and AWS OpsWorks. Since we recently moved a lot of our applications to a continuous deployment model, the benefits of speeding up the deployment process (~4-5 minutes) became more obvious.

He talks some about the current needs of their deployment process and how one option - symlinking the "vendors" directory just wouldn't work. Instead, they make use of Ruby and Chef to work with the OpsWorks hook system that fire on deployment. He includes the example Ruby scripts they put in place to handle "before migrate", "before symlink", "before restart" and "after restart" events. This new setup saved them about two to three minutes on their total deployment time and resulted in a much more stable environment.

tagged: amazon aws opsworks composer install ruby chef hooks deployment

Link: http://till.klampaeckel.de/blog/archives/202-Speeding-up-composer-on-AWS-OpsWorks.html

Lorna Mitchell's Blog:
Using an Existing Vagrant Setup for PHP Development
May 09, 2012 @ 15:50:24

In this new post to her blog Lorna Mitchell dives into the world of vagrant/puppet/chef and looks at using the tools to automatically create VMs that you can use for PHP development (or testing).

I've been hearing great things about puppet, chef, vagrant, and friends for a while now, but since I work on my own I tend to either develop straight onto my ubuntu machine or grab an appropriate existing VM and use that. So I read about this brave new world of virtualisation but (as with most tools) they can be hard to introduce on your own, and I didn't. [...] Then I went to WhiskyWeb, which had a hackathon [...] with the shiny new technology all packaged for me, I decided it was time to take a look!

She shows you how to get the VM started up using vagrant, pausing the instance and removing it all together (destroy). She also includes the command to directly access the VM via ssh and links to the joind.in project with its sample puppet configuration and Vagrant file.

tagged: vagrant introduction setup development ssh suspend puppet chef

Link:

Till Klampaeckel's Blog:
Deploying PHP applications: PEAR and composer resources for chef
Feb 27, 2012 @ 19:17:57

In a new post to his site Till Klampaeckel shows how to use PEAR and composer resources (two popular PHP package management tools) from inside of a chef deployment script.

This is something experimental I have been working on for our chef deployments. So the objective was/is to find a sane way to install PEAR packages and install dependencies with composer.

He shows how to set up the configuration script to discover a new PEAR channel, make the chef script not "fail hard" if a command returns a failed response code (as PEAR will do if the channel is already discovered). The "ignore_failure" configuration directive comes in handy for this. He also shows how to implement a LWRP in chef for both a PEAR and Composer resource.

You can find the code for this and other cookbook examples on his github account.

tagged: deploy application chef pear composer lwrp resource custom package dependency

Link:

Till Klampaeckel's Blog:
Cooking PHPUnit (and a chef-solo example on top)
Dec 05, 2011 @ 17:48:48

Till Klampaeckel has a new post to his blog combining two powerful technologies into one automated package that uses a Chef recipe to install PHPUnit as a part of the setup.

If you follow my blog for a while, you might have noticed that I'm a huge fan of automation. I just moved one of our development servers the other day and had one of these moments where something just paid off. Taking for granted that I can spin up fully operational EC2 instances in minutes, I also had our development stack installed and configured in an instant. My recipe basically follows Christer's instructions and because I distribute phpunit's command along with it, editing of the file is no longer required: when the chef run completes, phpunit34 is installed and ready to be used.

He includes the configuration needed to create a recipe for PHPUnit installation including how to use chef-solo to automate the install. It uses a "cookbook" from Till's collection on github to do some of the work for you. You can find out more about Chef on the OpsCode site.

tagged: phpunit chef automate install tutorial

Link:


Trending Topics: