GreenOps

Green Laptop

The term GreenOps isn’t just a greener CI/CD pipeline. Just how DevOps relates broadly to the implementation of culture change, practices, and tools, GreenOps can be a label applied to these aspects and how they relate to green software engineering.

In this post I’m going to talk briefly on exactly that, the culture change, practices, and tools that I have seen to date, and are yet to come that will help create what form GreenOps.

And a big disclaimer – this is not intended to be comprehensive or final. In 12 months times I’ll look back at this and see gaps, just as I will the moment I post it. Such is the nature of a rapidly evolving domain.

Culture Change

Culture change is the most critical and complex piece of having sustainability conversations and how they relate to software development. If someone does not care about sustainability, or understand how they can have a role in sustainability, nothing will change.

This isn’t as straight forward as running a 1 hour presentation, it takes time. With some teams I have seen it take weeks, with others I have seen it take months.

The key here is to be persistent. A team would do a quick assessment of sustainability on engagements with a quick survey during retro’s at the end of every sprint. Then over time, the conversation continues and starts to shift perspectives and discussion. With a greater understanding teams can come to working agreements where measurement is more formal, and then from that measurement processes and practices can evolve, and eventually tools can evolve to assist facilitate the desired outcomes.

Practices

There are a large number of practices that relate to software engineering and sustainability. Here I’ll go through just a few of what is and will be a growing list. The practicse I will cover in this post are Design, Architecture Decisions, and Measurement.

Design

What design principles help drive sustainability from the inception of a software system?

From the core Principles of Green Software Engineering teams need to form their own principles. These team adopted principles relate more to how a team agrees to deliver against the 8 core princples.

An example principle might be to always use elastic scaling cloud infrastructure to reduce excess compute, in turn reducing carbon emissions (principle 1, 2, and 5). Similarly, there may be visual design principles such as all images below X kb and usage of css image sprites to reduce page weight (1, 6), in turn reducing carbon emissions per page request.

This style of principle adopted by the team helps to bridge the gap between the 8 core principles and the engineering and architectural decisions required when building software. A designer may not understand how file size relates to the 8 core principles, but a team/project’s own principles help create focus and impact without having to review the 8 core principles each time. These agreed principles can also have automated tests to ensure adherence without manual overhead.

Architecture Decisions

While the design principles help us think about an ideal system, architectural decisions lay the path to deliver against the princples. Ensuring sustainability is considered in these decicions throughout a project is critical.

At times however architectural decisions will be made with trade-offs, and similar to flexibility, performance, or scalability, sustainability may be prioritised or deprioritised to deliver certain functionality. Regardless of this decision, it’s critical to capture the rationale.

A common way to capture architectural decisions is with Architecture Decision Records (or ADRs). These are a basic template that captures the rationale of a key architectural decision on a project, such that it can be reviewed, and in many cases to revisit the decision in the future. The ADR’s are checked into source control and over time can be revised.

By adding the sustainable aspects to all architecture decisions, it not only helps influence decisions to be greener – where at times there may be no other downside – but it also helps create awareness and a culture of sustainability. It may be there are no sustainability aspects to an architectural decision, but recording that understanding helps be intentional about sustainability. With new knowledge over time these can be reviewed that contradict the original understanding, and as such changes can be recommended to enhance the sustainability of the system, knowing that at the original point in time the best decision was made with the information at hand.

Measurement

Measurement relates primarily to the ability to measure or observe the sustainability actions you have taken. It does not only relate to the measurement of C02 emissions.

Observability of a systems CO2 emissions is an important place to start, but it is the result of the sustainability actions to reduce the CO2 emissions over time that is critical. Understanding the action that relates to the emissions reduction is critical so there is recorded causation between the action the reduction. It may be that the assumed benefits result in an increase of emissions, and the changes can be reverted. And if the emissions are reduced, the change can be identified as practice to be reused across other software, both legacy and in the future.

Tools

If you are looking at what tools you can build yourself, I suggest starting simple. Calculating total emissions is very complex, and multidimensional. An application running in a cluster, on a VM, on bare metal replaced every 4 years, in a datacentre, using redundant storage replaced every 2 years, and lighting, and air-conditioning, and water… these are complex calculations that eventually will be possible with industry tooling.

BUT! – there are some quick wins. Reducing file sizes, such as images on a web page and redundant JavaScript libraries can dramatically reduce CO2 overheads of a website dramatically. Stopping running nightly builds on CICD pipelines that run on commit already. Shutting down or scaling down development servers out of hours and on the weekends to reduce wasted resources.

And for reference, at the time of writing this page is greener than 97% of web pages on the internet.

By:

Posted in:


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s