Maksim Kabakou - Fotolia

Jenkins Configuration as Code eases dev and admin woes

Version 1.0 of a CloudBees plug-in aims to help developers and administrators advance CI/CD while saving time and effort with Jenkins configuration tasks.

DevOps might be a relatively new paradigm, but some of its core components need a refresh to support even more modern development requirements.

With that in mind, CloudBees, a CI/CD platform provider, recently delivered version 1.0 of a Jenkins plug-in that cuts complexity when it comes to managing Jenkins configurations for system administrators and developers.

Jenkins Configuration as Code (JCasC) lets admins and developers define and manage their Jenkins configurations in human-readable, plain text YAML syntax, instead of verbose XML files, and store them as code in version control systems such as Git. So, with JCasC, a developer can validate, test and commit changes for a Jenkins configuration and reuse the same configuration file to configure multiple Jenkins instances.

Jenkins is the de facto CI/CD system for many enterprises that require a full-time administrator to manually configure Jenkins and its more than 1,400 plug-ins. Applying the method of configuration as code will help remove tedious processes and support more industrialized use, said Mike Wolf, managing director and modern delivery leader who specializes in DevOps and Agile at KPMG in Baltimore and who spoke at the recent DevOps World | Jenkins World 2018 conference in San Francisco.

At the same time, configuration as code will force sys admins to further adopt the process and rigor of modern software development lifecycle methods.

[With configuration as code] we can start applying programming concepts, such as immutability, to the entire delivery pipeline. … Eventually, what's old will be new again.
Mik KerstenCEO, Tasktop

"Over the past decade, the DevOps community has started taking all of these deployment and configuration steps and thinking of them as a part of the program, i.e., as code," said Mik Kersten, CEO at Tasktop Technologies in Vancouver, B.C. "This means we can start applying programming concepts, such as immutability, to the entire delivery pipeline. And eventually, what's old will be new again, when we start thinking of the entire delivery pipeline as a single architecture and body of code, like we did in the days of Smalltalk where everything was code."

Config as code: 'Good enough' for Jenkins users

Meanwhile, companies such as Atomist and Pulumi go beyond the use of YAML to help developers build configuration and infrastructure as code in real programming languages.

"There is a role for configuration, but whenever you are describing rich behaviors, code is a lot better," said Rod Johnson, founder and CEO of Atomist in San Francisco. "Too often configuration like YAML becomes a bad imperative programming language."

Kohsuke Kawaguchi, CloudBees CTO, acknowledged other configuration-as-code approaches that use true programming languages rather than YAML but said the JCasC plug-in is "good enough for ordinary users of Jenkins." Config as code becomes more credible with user adoption, and as more users adopt the plug-in, they'll push the envelope with it, he said.

Kohsuke Kawaguchi, CloudBees
Kohsuke Kawaguchi, CTO, CloudBees

Configuration as code has been a key addition in the DevOps toolkit over the past decade, to apply more rigorous software engineering practices to configuration problems across an enterprise infrastructure, from virtual machines and containers to databases and networks, said Joe Duffy, CEO of Pulumi in Seattle.

Examples include version changes in source control and code reviews, as well as "integrating code-oriented services to enact automated CI/CD pipelines and build reusable abstractions and share packages with our teams and communities," Duffy said.

The related infrastructure-as-code approach brings a similar philosophy to declarative provisioning and infrastructure management. Previously, infrastructure-as-code systems used markup languages and domain-specific languages, but Pulumi and Atomist enable infrastructure as real code using programming languages such as JavaScript, TypeScript and Python.

Code is more amenable to tools support than configuration, because of the power of integrated development environments (IDEs) and the sophistication of modern languages, Atomist's Johnson said. Code in modern languages also is more modular and reusable. And if the code is written using a modern IDE, it is possible to unit test it, which would be difficult or impossible otherwise, he added.

Dig Deeper on Software development lifecycle