| /dev/null
Blog: PHP, Python, Linux, Web services & Continuous delivery

Tag: Vagrant

Provisioning new Virtualbox LAMP development VMs from scratch can be dome with minimal effort using vagrant. By making this process easy and fast I can dedicate an entire VM environment for each development project I have on hand and be sure that my environment remains consistent. That last part is not new, we have been using VMs like this for years but in my experience the VMs often become too valuable because of the manual effort required for initial set up, provisioning software, and ongoing maintenance. Vagrant scripts enable me to build and destroy VMs several times a day at speed, as and when required - removing the manual overhead.

No more "it works on my machine" scenarios, keep development environments isolated and in line with production specifications.

Read more

I've just added support for xhprof profiler into my base vagrant LAMP (PHP) stack . It automatically adds profiling to any PHP file that is served from the default virtual host (document root: /vagrant/www/) and includes a link at the footer of each page over to the xhprof output. Graphviz has also been installed so callgraphs are generated if you want something more visual.

The vagrant instance is available on github here: https://github.com/pipe-devnull/vagrant-dev-lamp

Read more

In order to keep puppet manifests readable I'm organising the configuration using classes that (roughly) group steps by function such as PHP configuration, VHOST setup or Ruby installation. One of the main problems I (and several of my colleagues) were finding is that the order in which puppet classes are executed can change between one provision run and the next. However, with a little research (AKA reading the manual) I came across stages which exist to help with this very problem.

Puppet Stages

Puppet allows you to take a phased approach with the provisioning process, part of the stage definition is to declare if this stage should be executed before or after other stages. Once a stage is defined you then assign classes to it for execution. Puppet defines a 'main' stage by default in which all classes are added unless you specifically assign them to another stage as just described. The main stage is the starting point from which we reference when creating further stages.

Read more