[chef] Re: Chef development model for new cooks


Chronological Thread 
  • From: "Hajducko, Steven" < >
  • To: " " < >
  • Subject: [chef] Re: Chef development model for new cooks
  • Date: Tue, 3 Mar 2015 21:20:06 +0000
  • Accept-language: en-US
  • Authentication-results: lists.opscode.com; dkim=none (message not signed) header.d=none;
  • Domainkey-signature: s=default; d=intuit.com; c=nofws; q=dns; h=X-SBRS:X-IronPort-AV:Received:Received:Received:Received: From:To:Subject:Thread-Topic:Thread-Index:Date:Message-ID: References:In-Reply-To:Accept-Language:Content-Language: X-MS-Has-Attach:X-MS-TNEF-Correlator:x-originating-ip: authentication-results:x-microsoft-antispam: x-microsoft-antispam-prvs:x-exchange-antispam-report-test: x-exchange-antispam-report-cfa-test:x-forefront-prvs: x-forefront-antispam-report:Content-Type:MIME-Version: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id: X-MS-Exchange-Transport-CrossTenantHeadersStamped: Return-Path:X-OriginatorOrg; b=PFXBmSvzOo9IMW9IhjCg46YLJnOK9B9u4U4lmYnyJqaNq7p6jSTsS4AD gpoLFGV2hgnMFNJ/5dkcXy3zk/mK3gAU40RJ9GMSbE8D50fm+qXOhTShh ND4nMphDJDx9IbCzEaKx6rZJkU8yEQh2JCNx7oUE2uX95dHGbfg+90uAP I=;

I don't think you'd use one over the other.


As a relatively new Chef myself, I've found that there is a place for all three.  FoodCritic is a linter.  It catches common mistakes and makes you conform to the ChefStyle guide.


ChefSpec is for testing that your cookbook is saying that it's doing something.  ( https://sethvargo.com/unit-testing-chef-cookbooks/ ).  IE - My cookbook says to install the package httpd on a RedHat system.  You should spend some time on Seth's blog - lots of good information there.


ServerSpec is, for me, the final test.  It actually runs and tests the system to make sure that what I told my cookbook to do, actually works right on a system.


I run all these through TestKitchen and Guard ( This post is a little outdated but helped me out quite a bit: https://micgo.net/ ).


I'm sure other Chefs will have more substantial information ( or correct mine ).


--

sh



From: Robert Freiberger < >
Sent: Tuesday, March 03, 2015 1:09 PM
To:
Subject: [chef] Chef development model for new cooks
 
Hello Chef, 

I'm very new to Ruby and Chef, where I have created basic cookbooks and recipes using various resources. At work, I'm starting to add my cookbooks into production but they need to pass various testing. 

From many Chef guides and books, I'm not understanding the full path of proper Chef development. I have started to learn about using berks, and bundle, but how should I use foodcritic over the other tools like ChefSpec and ServerSpec?

Any comments are greatly welcome!

Thanks,
Robert



Archive powered by MHonArc 2.6.16.

§