Sunday, 28 August 2016

Jenkins and Chef Compared - Someone else's PoV

I'm thinking about DevOps, after a weekend of tinkering with WebSphere Liberty Profile and Docker.

So I asked the internet about Jenkins and Chef, and this is someone's PoV: -

Jenkins is a continuous integration server, it's goal is to allow you to build and test the software you develop. The main strength of Jenkins are:

• Integration with source control (SVN, Git, ...)
• Integration with build systems (sometimes thru plugins), e.g. Maven for Java, XCode for iOS development, ...
• Worker nodes (slaves) are super easy to add (you just need to provide ssh access information)
• Huge repository of plugins for most of the use cases you can think of

The main unit of Jenkins is a Job, usually compilation and test of a piece of software. The common workflow is:

• Something is changed in source control
• Jenkins polls source control, triggers a build for the corresponding job(s)
• The job runs, reports any build or test failure, and stores build artifacts (result executable, .war file, etc ...)

Jenkins support dependency between jobs.

Chef is meant to automate deployment of application stack on servers.

The main unit of Chef is a cookbook. A cookbook contain the list of recipes needed to deploy an application. A recipe can include recipes from other cookbooks, i.e. you can have dependencies between cookbooks.

The main strength of Chef are:

• Big repository of public cookbooks (many of them maintained by Opscode) on
• Idempotency: cookbooks are meant to be idempotent, i.e. they always bring the system to the same state whatever the original state was, further, if no changes are needed, recipes executes pretty fast.
• erubis template engine for templating configuration files
• abstraction over most of the system resources you would need (e.g. files, services, ...), so that cookbook can be designed somehow independently of the Linux distribution used on the server.

So in short, Jenkins is used to build and test, and Chef is used to deploy. Still you can use Jenkins to deploy if your application stack is simple enough.

No comments: