RocketScientist's Miscellaneous Ramblings
posts - 76, comments - 354, trackbacks - 3

Configuration Management and Trolls

OK, so finally I'm getting the Configuration Management portion of the responsibilities here, which basically means I'm responsible for doing code/DML deployments from our development environment to our test environment to our production environment. The guy who's been doing it has a very nice checklist and some documentation on how to get it done.

If you've got a checklist, you've got a process that can be automated.

So I'm automating the whole process. I've long been of the opinion that my primary responsibility as a DBA is to automate myself out of a job. Which means reliable, robust, completely-hands-off of every task. This is for two reasons. First, I'm lazy. I like to spend as much time as possible sitting at my desk figuring out the best talent builds for my druid and warlock as possible (World of Warcraft > all). But I have this whole "work" thing that keeps happening around me, people asking me to do stuff. So I automate as much stuff as possible, then I spend a half hour a day checking logs from the automated stuff to make sure it all worked right. Then I get to maximize my time doing neat cool stuff, like setting up Lan to Lan VPN on the concentrator, figuring out how to make Live Communications Server proxies work, and deciding if I should ditch Master Demonologist for the new and improved Conflagrate (not bloody likely, btw).

Oh, the other reason for automation: Occasionally, I like to go on vacation. I don't like getting phone calls from work to fix things while I'm on vacation.

Anyway, so I wrote an automated file-compare system in T-SQL. Yeah, there are other, better ways. Most of those, however, involve me learning VB.Net way more than I want to, and I already had most of the code laying around, so it was a simple matter of stitching some stuff together and slapping some return codes in. Here are the rules for safe file sync, in case you were curious:

  • If the target has a newer file than the source, it aborts
  • If the target has a file not contained on the source, it aborts
  • If the target and source have the same dates and different sizes, it aborts
  • If the target and source files have the same date and same size, it skips the file
  • If the source file is newer than the target, it overwrites the file
  • If the source file doesn't exist on the target, it copies the file

So, pretty simple stuff. Notice there's a lot more ways to abort than there are to actually succeed. That's a good thing.

Next up is writing some code to half-sync environment specific settings tables. Basically we have a table in the database that contains all of our environment specific settings as key/value pairs. We need to make sure that the keys exist in both the target and the source. If the target is missing keys, we abort.

On the topic of trolls, well, Warcraft 1.7 patch dropped yesterday, and Zul'Gurub is a lot of fun. Way more fun that Molten Core, which I found to be tedious. "Wow, look, another pair of molten giants! I bet we just off-tank one and kill one, then kill the off-tank!". Lather, rinse, repeat for 4 hours and you've got a molten core run. ZG is a lot more interesting, there is a larger variety of mobs with more interesting attacks.

If you're a WoW player, or just getting started, look me up on Alleria. I have 2 characters I play there, a Gnome Warlock (level 60) and a Night Elf Druid (level 50).

Print | posted on Wednesday, September 14, 2005 10:08 AM |

Comments have been closed on this topic.

Powered by:
Powered By Subtext Powered By ASP.NET