Jobs As Code: Selecting the Best Tools and Deconstructing the CI/CD Pipeline

August 12, 2019 By Derek Weeks

3 minute read time

Who wants to mow the lawn with a pair of scissors? No one. Nothing compares to the ease of using the right tool for the job.

Tools have always been part of software development and operations. As organizations transition to DevOps, or to CI/CD, or mature and grow as organizations, tools are essential to assist growth. Whomever has the power to choose the tools often brings the tools they know along with them. A potential problem that emerges is that many tools are often specific to one domain.

Without critical thinking, many people have the notion that whatever hammer they have is the right hammer.

null

Selecting the Best Tools

As DevOps professionals, how do we make sure we have the right tools for the jobs? Joe Goldberg, an Innovation Evangelist at BMC Software, introduced the idea of jobs-as-code at the All Day DevOps conference.

Joe observes there is a lot of talk of "shifting left" (moving security earlier in the pipeline). As DevOps advocates he suggests that we also need to think about shifting development right. Specifically, by evaluating our tools.

null

As organizations evolve into DevOps, CI/CD, cloud operations, and more, one challenge is the diversity of users and the different environments in which they operate. Operations needs to make sure the environments scale, are secure, and meet compliance standards. The tools also have to work well with non-technically savvy users. Early in the software development life cycle (SDLC), users are relatively tech savvy. However, along the process, business users might be tech savvy but don’t have the luxury of time to learn the tooling.

The tooling needs to support these new demands. They must have the flexibility to evolve with the business. Tools have to be integrated with modern development and deployment techniques. By building and managing your toolset during your development, and submitting your tools to rigorous evaluation, deploying to production is a non-event.

This is jobs-as-code.

Jobs As Code

Jobs-as-code is an approach that treats application automation management in the SDLC just like any other code components of an application.

Joe explains that jobs are elements or artifacts you can manage, just like infrastructure as code. The instrumentation you use to run the application is part of the application. The idea of jobs-as-code is that the instrumentation that runs your applications in production -- the stuff that reacts to business events, triggers processes, manages dependencies, debugging, etc. -- is developed at the same time as you develop the application. By using code management and version control, tools travel the whole SDLC.

null

Trucking Software as an Example

Joe invites the audience to imagine we are a dev team starting to build an application. Let's imagine it is a preventative maintenance application for trucks. Data pours in from the vehicle in real time. We must sort and prioritize this data. The goal is to identify potential problems and offer solutions. When a problem arises we get the truck to a service center before it is too late.

We want to keep the truck generating as much revenue as possible. To do this, we train the model every once in awhile by refining the algorithms. For example, we might draw together data on warranties, parts, service centers, fueling stations, and more. As you can see, there are lots of coordination and orchestration of dependencies.

The intent of jobs-as-code is to deconstruct entire CI/CD pipeline. This way we can see what it looks like to write this type of implementation, deploy it to different environments, or build environments in automated fashion.

Jobs-as-code is tooling independent. You build the tooling so you can use it in your code base and submit it to all of the phases. When software lands in production you have the operational tooling you need because the toolset has traveled along with application. You don’t need to rework or make changes between preproduction and production environments.

Joe recommends visiting jobsascode.io to learn more. You can watch Joe’s entire presentation below.

 

Register for the next All DayDevOps, November 6, 2019. It will be a day to discuss DevOps culture, jobs-as-code, and more.

 

Tags: devops tools, devops best practices, News and Views, Post developers/devops, infrastructure as code, jobs as code

Written by Derek Weeks

Derek serves as vice president and DevOps advocate at Sonatype and is the co-founder of All Day DevOps -- an online community of 65,000 IT professionals.