I think vmware is fantastic. It allows me to spend vastly less time on indirect tasks – like setting up new development and testing environments – and more time getting the actual things that need to be done, done. Time consumed in getting all set up to do a piece of work quickly becomes like driving all the way to Dubbo just to go to the bathroom. It’s hard to explain to a client. VMWare, however, is a teleport.
Most people, I know, are happy to take a leak in their backyard; but I have great difficulty making icky compromises because I know that, before long, they’re the ones complaining about the smell. I’m always working to do things ‘right’. It’s more work, but it doesn’t smell. So having got this funky new website thing happening, I am now compelled to create an offline version. A place to fiddle, play, try things out. A place which is not production.
So what’s this got to do with vmware? Well, rather than waste hours building-running-administering a separate LAMP machine I’m using this to run the whole lot on my Windows workstation. Very sweet is that I don’t have to pollute it with other projects. Different projects always have different needs; needs which too often conflict and interfere. An apache tweak, a specific version of php, an unusual set of permissions, an special library or program or filter or configuration; there’s always something.
Now, with VM’s, need to do a project on the side? No problem: just fire up another VM. Start with a neatly preconfigured point and get on directly with the job. Do it ‘right’ for that project without compromise. Want to try something out when midstream? No problem: copy the VM and play with it, if it doesn’t work out, bin it. Now projects can sit in their own little VM worlds without interfering with each other. For example I decided to try out Textpattern in case I might like to switch to that. I fired up a new Virtual Appliances LAMP VM, installed it, played with it, ditched it. Took about an hour. Didn’t interfere with anything I’ve already got.
I can’t wait to introduce VM Test Database’s at my next gig. One of the bigger pains in the neck at jobs is getting together a large sample of test data which is realistic, restorable, and distributable. With a VM we can build a test database and rerun tests ad infinitum without having to painstakingly restore the test database to the start position. Need to run a bunch of tests without interfering with someone else? No problem – everyone can fire up copies of the test database VM on their own workstation without wasting hours installing and configuring.
So I’m quite pleased to be writing this on a development environment. I can edit, tweak, publish till the cows come home without messing up production. To deploy code changes I can run lftp‘s ‘mirror’ command. I don’t get direct access to the production database however (only phpmyadmin) so I have to push database updates by uploading and executing sql scripts; fortunately the database is very small, so I can export the whole thing from dev, and import to prod via a sql script.
Doing this, the WordPress database does have a couple of gotcha’s. For some reason they store the root url path inthe wp_options table (as well as in the wp_config.php!). So I have to omit this from every import. I’m also expecting some issues with attachments to posts as I see the wp_postmeta table holds full physical paths – and the dev and prod paths are different. I have a couple of ideas and will deal with this in time. I’ll let you know.
Recent Comments