DevOps Modernize Data Centers

Three Types of Code, a DevOps Model

In guiding our customers through the journey of implementing and optimizing around best practices in DevOps, we suggest a view that an application comprises three types of code. In this post I aim to describe each DevOps code example and outline the value of understanding them in applying DevOps processes to Infrastructure and Operations (I&O) management and technology usage across the entire DevOps pipeline.

The Three Types of Code DevOps model

The central idea is that, broadly speaking, any given application is made up of three types of code; they are:

  1. feature code
  2. infrastructure code
  3. reliability code

A software development and delivery model built around these types of code can help organizations achieve automation, agility, and continuous delivery.

Feature code shows how apps work in deployment

Feature code is the code that makes up the features of an application. For example, there are various types of code involved in the tiers of a web application. These code types include HTML, CSS and JavaScript that make up the front end of the site that users interact with.

In most organizations, the application development team is responsible for these types of code. With a web app in deployment, any updates, bug fixes or other code change the app development team applies will manifest themselves to users in buttons they click, visualizations they see and any other application feature.

Infrastructure code makes continuous delivery possible

Infrastructure code is, as the name would suggest, code that relates to infrastructure configuration. Many companies today use Infrastructure-as-a-Service (IaaS) or Platform-as-a-Service (PaaS) solutions for their app deployment pipeline and production environment.

Generally, the infrastructure and operations teams (the “Ops” part of a “DevOps team”) makes changes to infrastructure code to manage and maintain IaaS or PaaS solutions. These changes help ensure smooth application delivery and continuous deployment.

Historically, infrastructure and operations teams have used manual GUI-based processes to complete this type of configuration management work. However, part of the DevOps lifecycle can be slow and prone to error. That fact has led to the creation of DevOps guiding principles of Infrastructure as Code (IaC). These principles—as detailed in the VMware whitepaper, “DevOps and Agile Development”—help DevOps teams incorporate automation into the app delivery pipeline.  

The infrastructure code base will also often include configuration code related to governance and compliance of the application.

Reliability code keeps software development pipelines on track

The site reliability engineering (SRE) team is responsible for maintaining the reliability code base. On occasion, the infrastructure and ops or app developer teams will be jointly responsible for this code. Reliability code is used to configure systems an application requires to both demonstrate and maintain reliability. Some of the systems that help usher continuous delivery off applications along include monitoring and telemetry systems. The SRE team must configure these systems to display performance or error information whenever an app is in deployment. Application-specific healing systems that incorporate automation and predictive and reactive application scaling systems also fall under the reliability code category.

Those DevOps professionals familiar with the discipline of site reliability engineering will be aware of standard guidance: SRE practitioners should spend around 50% of their time on engineering tasks.

For an agile DevOps culture, consider the Three Types of Code model 

The Agile Development whitepaper details guiding principles of a DevOps approach, which include achieving an immutable infrastructure. A DevOps teams should create an immutable infrastructure only once, from original source code. The team should not manipulate that source code repository after the fact, especially using manual processes.

In accordance with that principle, teams should aim to deploy applications in a completely automated fashion. This deployment approach requires considering all code required for deployment.

Each DevOps code example must incorporate version control, testing and validation. These processes have different write, manage and maintenance requirements but all come together to run the application through continuous integration and continuous deployment.

There may be a single team responsible for the all the code types or there may be multiple teams that work together to create the codebase that makes up the entire application. When there is code change within any part of the build process, the responsible party must test the entire code base. Any problems to each of the three code types will have implications to application delivery.

There are of course exceptions and grey areas. This Three Types of Code model is merely a way of conceptualizing what makes up an application build within a DevOps pipeline. The model is a helpful way to understand how different disciplines, including SRE, fit into the DevOps model.

The Three Types of Code model can inform DevOps journeys

A DevOps transformation journey can be daunting and complex. Making sense of all the types of code and how they relate to applications, let alone implementing various code changes, can be challenging. The Three Types of Code model may not work for every developer or for every continuous delivery pipeline. For some, the model can help illustrate the implications of changes to various code bases on the application and infrastructure. At the very least, this model may help organizations through parts of their DevOps journey.


James Wirth

James Wirth is a member of the emerging technologies team within VMware Professional Services and focuses on DevOps, Site Reliability Engineering, Multi-Cloud architectures and new and emerging technologies. He is a proven cloud computing and virtualization industry veteran with over 15 years’ experience leading customers through their cloud computing journey.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *