At work, it's finally quiet enough to start (re)rolling out our jenkins staging environment.
Our unmanaged puppet server exploded, so the obvious choice is bringing it back up.
But, the exploded puppet server didn't have any config management information associated with it. Being the config management server in an unmanaged environment, I didn't know which OS variant and what configuration details. Too much irony: to bring puppet back up, I needed puppet for the config management server. And all I had were partial backups.
(╯°□°)╯︵ ┻━┻
Start over. Since down the road I need improved windows support, and the python-based config management tools (fabric, ansible) are variants of 'run some ssh commands on the target' (Windows, Y U NO SSH?), I figured Chef had enough traction to make it worth while. Lots of new improvements.
My plan?
- Spin up chef server in debian stable
- Spin up dev VM(s) in Vagrant that match my deploy environment
- Work with chef provisioning until I can replicate my current environment base.
- Fork configs for dev, staging, and production.
How's that going?
Welp, initial feedback is, poorly.
My default platform of choice, debian stable, doesn't have a very modern chef implementation (10.12, which is from 2012). Only 2 years out of date! And, by default, it also doesn't include the chef-server-webui for logging in and managing things. So, I got to make my first debian backport.
The chef documentation is everywhere, but in the future. If I'm stuck in 1989, I want the 1989 documentation in my distribution. Not a wiki with the new hotness. So, I'm going to need to fix my first issue: bootstrapping the chef server, with a more modern version. But, it's not clear where everything is stored. In the cloud? Sure. But, where is the apt repository? How do I make a deb from source? And all the help says is 'run a batch file as sudo to install something'.
So, I read the shell script. Seems harmless enough. Hey, I can specify the matching old version so I can dev on my mac against Debian! Great! Ugh. Where is the old windows .msi installer? Where do I get that? Facepalm.
At some point, I'm going to have to eat the modern one. And roll out some code to build a production chef server from scratch that prefers the specific version. And roll out a caching apt service. List keeps growing.
I see that there's a set of features I would want to use, but apparently they're reserved for the commercial flavor. I'm going to want an implementation of LDAP/AD account creation and auth.
Ok. Ok. Halt forward progress, let's write some code.
Shit. Vagrant, out of the box, doesn't have a modern wheezy64 image, and I don't trust the random boxes from the interwebs, so I got to use veewee to roll out a cached base box. Fine. Vagrant is up. Let's write some code!
Hard drive on macbook air is full. Switch to windows. Chose non-matching windows installer most closely matching the version of Chef I have deployed locally. FUCK IT. Coding time!
Crap. What is the convention for rolling things out? Huh. I have to manage a cert for myself? Fine. Cert made. Windows config dir is my equivalent of $HOME/.chef? Fine! Let's write some code?
Shit. Isn't there a document convention? Yes. Base kitchen repo cloned from git. Huh. Knife could make that for me? Shouldn't I just be making the knife version of my kitchen (chef skeleton project) because it will match my chef version? Bah. Continue.
Ok. How do I rev on a local box and skip the server version? Oh. Uh. Install something else into my chef base install. Knife-solo? Ok. Sure. Windows chef client gems polluted. Dev environment unknown. Code?
Shit. Knife-solo says to shove my cookbook into site-cookbooks. Is that even a thing? Isn't the whole point that my skeleton dir is the current cookbook? Internets? So many shitty tutorials.
Gah. What the hell is Berkshelf?
HEADDESK.
So, that's pretty much where I'm at. Struggling. Without making the thing I want. Without the new hotness. And, without any results. I'm going to give it another week, but this was not the smoothest route. And there aren't any ACM bookshelf (safari nor books 24x7) references to power though this one.
Leave a comment