Fun with GeoTagging
I've recently started playing with geotagging - adding location information to my photos. The basic idea is that you have a GPS keeping track of your location while you are taking photos, and then when you get back you can look through the GPS logs to see where you were when a picture was taken and add that information to the photo. I found a tool called GPSU that downloads the data from my Magellan SportTrak, and can save it as a .gpx file (GPS in XML). Then I run a perl script called gpsphoto that looks at a directory full of photos and the GPX file and finds the photos that have a time stamp matching timestamps in the GPX file. The final output is that each photo gets EXIF tags of Lat, Long, and altitude, plus a google earth .kml file that shows the track as well as 'pushpins' for each photo. Pretty cool. Here are my first two. If you have Google Earth installed, these will open in that.
Rapid Deployment - reducing friction
I got a nice email from Jay Flowers a few weeks ago about my post on "Enterprise Continuous Integration". He also showed me some things he is doing around using cc.net and nAnt to do packaging of an ISO image. Pretty cool stuff! Anyways, I'll let Jay write more about his stuff - what I want to write about is the system we put together for deployment. I told Jay about it in email, now I will share it with you.
For a while, we had been using WiX to create deployment packages, and if you have the right kind of project, I highly recommend it. It was a bit too much power for our needs though - we are developing server-side applications, and we only have 1 production box to deploy to. Maintaining the WiX files was getting to be a pain, so we went with a much simpler solution - zip files. We are pretty much an 'XCOPY' deployment at this point, but we do use nAnt to drive it. The thing that has made us happiest though, is the way we deploy to our development and testing environments.
Like many shops, we have a development environment, a testing environment, a staging environment, and a production environment. Our production environment consists of a completely separate domain, with a Windows domain controller, plus a web server, app server, and database server. To replicate this in our dev and test environments, we have a beefy host machine that runs all those as Virtual Machines. The pain in the neck turned out to be copying things between the build machine and the development environment - IT wouldn't let us do anything like set up a trust relationship between the dev environment domain and the corporate domain, so just copying files was a pain - the machines could see each other, but the permissions weren't there. So here's what we did...
After creating the zip file that contains the images of the web server and app server, we then wrote a simple 'bootstrap' nAnt file that extracts the zip to a temporary directory and then runs a separate nAnt file that is embedded inside it. We then installed CruiseControl.net on the development environment app server. It has one project, "Deploy App Server Dev" that first does an SVN update to get the latest zip file, then executes the bootstrap build. The bootstrap build extracts the zip file contents to a temporary directory, and then runs the nAnt build inside that zip to actually do the deployment. The environmental settings needed (names of the servers, database connection information, etc.) is all part of the deployment build file, and is customized for each of the 2 environments we set this up in - dev and test. At the end of the deployment, we use the StructureMap verification tools to ensure that the environment settings are correct.
When we are going pretty fast, we'll set up the cruise control on the dev environment to actually do a deploy automatically when it sees that a new build is ready. When we want more control, we leave the CC.Net triggers block empty to make it be 'manual only'. We keep it as a manual step on the test environment as well.
So now, to deploy the latest build to dev or test is just a matter of opening up our CCTray app, selecting the "Deploy App Server Dev" project, and forcing a 'build'. That makes things so much smoother.
Now, if we could only get the IT folks to allow us to do this on the production environment...
