Brigade 2: A Better Scripting Environment for Kubernetes

Brigade 2: A Better Scripting Environment for Kubernetes

Brigade v2.2 has just been released. I wanted to take a moment to reflect on why Brigade 2 is so exciting. If you're looking for next-gen Kubernetes workflows or a scripting language for your cluster, Brigade is it.

While I am no longer active on that project, I am deeply impressed with the new architecture. When we first set out to build Brigade, we wanted to create a new category of Kubernetes applications. Our guiding intuition was "What if there was a scripting language for Kubernetes?"

In UNIX, a scripting language functions as "workflow glue." One writes small bits of logic -- for loops, if/then statements, error handling--that control the sequence of calling out to existing programs on a UNIX system. Shell scripts pipe data from one program to another, allowing a UNIX user to quickly accomplish a "big" task by orchestrating a series of "small" tasks.

And when you look at the history of UNIX, it is readily evident that shell scripts are key to the operating system's success. Just take a look in your system's /etc directory, and you'll see a litany of scripts that run every single time your Mac, Linux, etc. system boots up.

When we started Brigade five years ago, this was precisely the guiding light we were following. We wanted to build a scripting system for Kubernetes that mirrored UNIX. We quickly discarded the idea of writing a new scripting language from scratch, though. DevOps folks certainly do not need to learn yet another language just to get their jobs done. So we asked a different question: What is the most popular scripting language today?

JavaScript.

Brigade uses JavaScript to describe workflows, just like UNIX shell. But instead of calling out to external binary executables (as a shell script does), Brigade calls out to Docker/OCI containers. Using Brigade, then, you can chain together a sequence of containers to perform larger tasks. And just as with shell scripts, you can orchestrate these with loops, conditionals, error handling, and so on.

Brigade 2

When we built Brigade, we thought of it as an experiment or a proof of concept. We didn't spend much time on scalability, permissions, robustness, and so on. While Brigade was successful in many ways, it was certainly not enterprise-ready.

That's where Brigade 2 comes in. When Kent Rancourt took the reins for Brigade 2 development, he re-conceived the internals of Brigade. He reworked the flow control to handle far more throughput. The platform now has a full authentication and authorization system that is far more configurable than the older Kubernetes-based one. And the system is now capable of recovering from large-scale failure.

Yet none of that comes at the cost of ease of use. It's still just as easy to hack out a quick JavaScript workflow orchestrating containers.

(And, yes, you can use Brigade with Krustlet to script interactions that use both containers and WebAssembly modules.)


Husnain Khan

Catalysing Business Success with AI Recruiting and Automation: Revolutionising Hiring Results and Garnering Acclaim from 100+ Industry Leaders

9 个月

Matt, thanks for sharing!

回复

要查看或添加评论,请登录

Matt Butcher的更多文章

  • Underprovisioning Cloud Services

    Underprovisioning Cloud Services

    The default pattern in cloud operations is to overprovision your cloud resources. At Fermyon Technologies, the…

    1 条评论

社区洞察

其他会员也浏览了