This is exciting: my first post that straddles my day-to-day work and my love of computer games! I recently started work on a Chef cookbook that installs the SteamCMD tool created by Valve, as well as providing a method through which to install arbitrary titles from the Steam platform. I’ve noticed there’s quite a few Chef cookbooks geared towards spinning up gaming infrastructure: TeamSpeak, Minecraft, not to mention all the work Riot does with the Chef platform. However, I didn’t find anything for managing Valve games (Left 4 Dead, CounterStrike, etc.), so I started my own little project; this cookbook is the first step, as pretty much all the Source engine dedicated servers rely on it for installation now.
At first, the cookbook simply consisted of a single recipe that installed the SteamCMD utility, but after learning how applications were pulled down from the Steam network to be installed, I decided to add a lightweight resource provider (LWRP) to allow this and other cookbooks to install game servers. If you look at the code, it feels a little “hacky” the way I’m passing the SteamCMD parameters, but I’m hoping this will allow me to add further functionality in future without too much hassle.
You can find the Cookbook over on Github if you fancy checking it out, please feel free to submit comments, issues, or even Pull Requests! I’ve used Berkshelf and Vagrant to facilitate local development, but there’s a caveat when working with a VM locally: I found that the installation of dedicated servers would sometimes be unsuccessful, throwing the following error out to the console:
Error! App '740' state is 0x402 after update job.
Subsequent Chef runs would usually result in the installation finishing OK, suggesting that the download picked up where it left off, but I have yet to find a reason for this strange error. One thing to note is that when I’ve trialled the cookbook in EC2, I haven’t managed to replicate the issue, so perhaps there’s a bandwidth issue when working with a local VM?
Anyway, I’m excited to finally be able to release this to the world and I hope to get some constructive feedback and maybe some contributions in the not too distant future!