Infrastructure As Code: Managing Your Chef Code

Managing your code in Chef is just as important as managing your application’s source code. Improper management of your cookbooks will almost guarantee mistakes, frustration and even failure. For the sake of this post, I will assume that you will be able to use git as your SCM. So first, we will set up an […]

Read more
Dynamic Versioning of Maven POM

In a typical CI/CD pipeline, code is build, code is deployed, code is tested. In our specific scenario the code is built through Jenkins and maven on a Jenkins build slave, then the build artifacts are uploaded to an artifact repository. Through an Infrastructure-as-code tool, like Chef, the code is deployed to a test environment […]

Read more
Completing your CD Pipeline for your PHP Project

On my last two posts I went through setting up CI for your PHP project. As promised, this post will walk through the CD pipeline that I setup for the project. The Continuous Integration jobs were a good start, but I wanted to throw in additional testing, on architecture that better mimics production. I created two additional […]

Read more
Filling out your CI Pipeline for Your PHP Project

Last month I started writing about the DevOps pipeline that I built out for a PHP project. Today I plan on filling it out a bit more. What I described last week is what many people consider a full CI Pipeline, executing unit tests, code coverage, and static analysis. I threw in a little more […]

Read more
knife zero

Dear Loyal Readers, If you ever wish you could bootstrap a machine with chef-zero, but remotely, then knife-zero plugin is for you (aka: “do you ever wish Chef were more like Ansible?”). Last week, I was trying to combine multiple knife commands: “-z” for using chef zero, and “bootstrap” for making a remote computer install chef-client first.  But, […]

Read more
My hardening workflow

Dear Loyal Readers, Here are some tips for keeping your OS environment secure, the DevOps way. Scanning Get your environment scanned early and often. And your first scan should happen even earlier. Nothing is worse than getting your first set of scan result back and realizing you have just been given 2 weeks worth of […]

Read more
Zero to Continuous at the speed of Jenkins

I recently gave two versions of a talk at Jenkins User Conference 2015 World Tour in Washington, D.C. Here are the slides for anyone who wants to review them: JUC Zero to Jenkins. That talk comes in two forms which you will notice from two cover pages. Zero to Federated at the Speed of Jenkins – […]

Read more
Chef Con 2015

I’m presenting at Chef Con! So if you have any free time, you should drop by Santa Clara next week. Schedule Direct link to me I’m going to talk more in depth about migrating to the cloud using Chef, Design decisions which can save you some time, and talk to them about some debugging tips […]

Read more
Chef Advanced Debugging: Detecting bad attributes earlier

As I talked about last month when trying to demystify  “UNDEFINED METHOD `[]’ FOR NIL:NILCLASS” error, it can be challenging to make sure all your attributes are set the way you want, or even at all. One thing that should be detectable is anytime you get nothing (nil) back from a Node[] call, we might as […]

Read more
Chef Best Practices: undefined method `[]’ for nil:NilClass

Typically you’ll get an error that looks like this: NoMethodError ————- undefined method `[]’ for nil:NilClass   Cookbook Trace: —————  /cookbooks/test/recipes/default.rb:15:in `from_file’   Relevant File Content: ———————- /cookbooks/test/recipes/default.rb:    12:  13:  puts “JPM Recipe start”  14:  puts node[‘att1’]  15>> puts node[‘att2’][‘att3’]  16: What just happened? Well, this recipe just referenced a sub-attribute (‘att3’) of a […]

Read more
X