Hi list,I’m wondering Chef kitchen patterns. Right now, I use knife-solo, and I have a general-purpose kitchen. I add nodes as needed (not necessarily for the same app). Since I don’t really deal with a project that requires a more than one (or two) server(s), yet, it’s easy to just do something like:➜ mykitchenv2 git:(master) ✗ lsBerksfile Berksfile.lock Gemfile Gemfile.lock Vagrantfile cookbooks data_bags environments nodes roles site-cookbooks➜ roles git:(master) ✗ lslamp.json rack.json➜ nodes git:(master) ✗ ls127.0.0.1.json anotherhost.json …So, it’s basically a general-purpose kitchen. It’s not really geared towards a specific application. My workflow looks like this:1) New project, hack, app ready to be deployed2) Create new VM @ digital ocean, grab the IP, create a new node json in the kitchen4) It’s probably a Rails app. Add the rack role[lamp] to the run_list for this node. The rack role basically setups a new rack box using the rackbox cookbook (https://github.com/teohm/rackbox-cookbook)3) knife solo prepare4) knife solo cook5) Use capistrano to deploy the app.Then, I do the same thing if I need a staging server.
It works pretty well. However, most of the apps I develop right now are apps with a quite simple infrastructure. They don’t require more than 2 servers (prod,staging). I did work with more elaborated apps before with up to 10 different servers (but without using Chef at the time, go figure).The problem with this approach is that I end up having several unrelated nodes, and in the end, I don’t really describe the infrastructure of a single app/system, but of several ones, which can become clunky. Basically, for now, I’m just using Chef to get the sever ready, but not really using it to *manage* the server afterwards.That being said, I’d like some insights on Chef patterns related to this, for example, when is it time to create a kitchen solely for an app?Thanks in advance,--Marcelo
Archive powered by MHonArc 2.6.16.