Monday, December 12, 2016

Speeding up Habitat Iterations [feedly]

Speeding up Habitat Iterations
https://blog.chef.io/2016/12/06/speeding-up-habitat-iterations/

-- via my feedly newsfeed 

I'm not a developer. I'm an ops — at least I was one. For several years, I've been teaching and consulting individuals and companies about DevOps and automation and how to change the way they think about, manage and build infrastructure, using Chef tooling.

When Chef launched Habitat this past summer, I worked through the online tutorials and learned the basic concepts. However, I didn't really begin automating applications with Habitat until this past week. Within a day, I sufficiently learned how to begin revising and writing plans, but I found myself in a loop where the process was taking too long. In short, as I iterated through writing my plan, config and hook files, I would experience a build fail, often due to typos in the config and/or hook files. Each time I fixed an error, I had to wait upwards of 10 minutes to perform a new build (build times can vary from super quick to loooong depending on the application). Often, I'd repeat this loop many, many times.

I was sad.

Two days later everything changed.

I learned that I could simply make the needed edits within config and hook files and skip the rebuild!! Simply adding the --config-from <foo> argument to hab start <origin>/<app> allows the newly edited config and hook files to be read from the directory indicated, typically /src.

hab start core/kibana --config-from /src

Of course, once everything is working as it should, you DO need to perform a final build and re-test your code. But, this abbreviated process should dramatically speed up the rate at which you iterate through edits to your config and hook code.

Read more about iterative development in the Habitat documentation

I hope this is as helpful for you as it has been for me.

The post Speeding up Habitat Iterations appeared first on Chef Blog.  


No comments:

Post a Comment