Announcing Cog 0.4

Mark Imbriaco
Operable News
Published in
4 min readApr 22, 2016

--

We’re excited to announce the release of Cog version 0.4. This is our best release yet, with many improvements including a brand new relay, Docker integration, and pipeline triggers. Our focus for this release was on making it easier to build and package commands and on giving you more ways to use the pipelines you’re already creating in new ways.

I want to highlight a few of the biggest changes below, but you can read more in the change log or on our greatly improved documentation site.

Relay Redux

A bunch of things have to happen when you run a command in Cog. We have to parse the pipeline that you provide and make sure the syntax is valid and that the commands exist. We have to make sure that your user has access to run the commands with the options you’ve provided. We have to write audit log entries. And so on; there’s a lot happening behind the scenes.

Once all that happens, the actual commands have to be executed somewhere. That’s where relays come in. Relays are a standalone component that communicates with the Cog core and handles the actual execution of commands.

This separation brings a number of benefits like:

  • Write commands in any language you want.
  • Run multiple relays for resilience.
  • Simplify network management by running your commands in the same environment as the systems they automate.
  • Commands that are installed have no access to the Cog internals. They run in completely separate processes and only interact through a simple API.

We got a lots of positive feedback about our approach, but we also heard loud and clear that relays were too difficult to configure and manage. Challenge accepted!

Today, we’re releasing a brand new relay that was rebuilt from the ground up to make deploying and managing relays and command bundles a breeze, and to incorporate everything we’ve learned since we first released Cog.

First, we built the new relay in Go for ease of deployment. A single relay binary and a configuration file is all it takes to get a relay up and running so you can focus on the workflow you want to build instead of the infrastructure to run it.

Cog tells your relay what command bundles should be available based on the relay group (another new feature!) that they belong to, and keeps you from having to manually install or remove bundles.

You can read more about installing and managing relays in the documentation.

Cog ❤ Docker

In Cog 0.4, we’ve redesigned our bundle packaging around Docker images, making it easier than ever for you to build your bundles using your favorite tools. You have complete control over your language, dependencies, and runtime environment.

All you have to do is upload your bundle configuration file and we take it from there. The new relay communicates directly with a docker engine to handle fetching your bundle images, running your commands, and cleaning up after itself.

Pipeline Triggers

Command pipelines are the foundation of Cog. They’re what allows us to build commands and combine them in new ways to adapt to situations that could not have been predicted in advance. This is adaptability is one of the key strengths of the Unix command line that so many of us know and love.

In our last release we taught Cog how to remember pipelines by building aliases that you can execute from chat. This time around, we’re giving you another way to interact with pipelines by making them available over HTTP!

With Triggers, you can define a pipeline of Cog commands that will be executed in response to an HTTP request. This means that you can easily build pipelines that run in response to things like GitHub webhook events, monitoring alerts, and more. We think you’re going to love them and we can’t wait to see what you build!

What’s Next?

This was a big release and it took us longer than we expected, but we’re very pleased with the result.

Our next few releases are going to be focused on more iterative improvements as we move toward a stable 1.0 release. Don’t worry, we still have new features we plan to add between now and then!

As always, we’re incredibly grateful for the participation of the community. We wouldn’t be here without your ideas and collaboration, so thank you!

Let us know what you think of 0.4 and if there’s anything we can do to help you make the most of Cog in a GitHub issue or in our public Slack team.

--

--