Relay and Open Source
Published: 2020-06-24 15:19:41

---
title: Relay and Open Source
published: true
date: 2020-06-23 00:00:00 UTC
tags: 
canonical_url: https://relay.sh/blog//relay-and-open-source/
---

## Relay and the open source community

Relay is deliberately built to be easy to extend. The more [steps](https://relay.sh/docs/how-it-works/#definitions) there are in the world the better it is for everyone who wants to write a workflow. It’s sort of like fax machines or MySpace: you’ll want to use the same technology that the people you’re communicating with use. OK, maybe the fax machine isn’t not a great analogy… the point is, nourishing a healthy open-source ecosystem and community around Relay is super important to its success.

In this post I’ll talk about the different aspects of Relay’s open source DNA: the ecosystem model, the codebase itself, and upstream projects.

### The Relay Ecosystem

First and foremost, Relay is about [workflows](https://relay.sh/docs/how-it-works/#workflow-execution). Relay workflows are a well-defined YAML dialect that’s readily sharable. The first batch of workflows we’ve been writing to exercise the system and demonstrate its capabilities are on the [Workflows section of the website](https://relay.sh/workflows/) with READMEs for example usage and a one-click button to add them to your account. The code for all of them is [collected in the puppetlabs/relay-workflows repo](https://github.com/puppetlabs/relay-workflows). We’d love to see pull requests with bug fixes or improvements, new workflows you’ve written to solve problems with Relay, or [requests for features](https://github.com/puppetlabs/relay/issues/new). The workflow syntax is [documented at relay.sh/docs](https://relay.sh/docs/reference/relay-workflows/) along with instructions on how to [set up VSCode](https://relay.sh/docs/setting-up-editor/) to do automatic syntax validation and completion.

Relay workflows make use of containers to both respond to incoming events and to run as steps to accomplish the task you’re trying to automate. Step and Trigger container definitions that interact with a particular tool or service can be bundled up into what we call an Integration. The [Integrations library on the website](https://relay.sh/integrations/) has a browsable, taxonomized list of the currently supported integrations.

We expect the current list will cover a lot of common Relay use cases, but there’s no way it’s going to cover _all_ of them. If you run into the situation where there’s an integration with a service you use, but not a specific Step or Trigger that does what you want, we’d love to hear about it! Many of the features marked “Coming soon” on the integration pages just need some prioritization and tweaking to get out the door, and your vote counts to help get them on the list. Plus, all of the integrations are aggregated together under the [relay-integrations Github organization](https://github.com/relay-integrations), and by now it should go without saying that we welcome any PRs or issues on them.

To make a new integration, or if you want to go further than tweaking the existing containers, there’s a long-form [Integrating with Relay](https://relay.sh/docs/integrating-with-relay/) guide that breaks down the different container types, the [Python SDK](https://pypi.org/project/relay-sdk), and best practices for integrating with the internal Relay service APIs.

### The Relay Codebase

Speaking of documentation, the entire [Relay documentation site](https://github.com/puppetlabs/relay-docs/) is available on Github. If you run across anything in the docs that doesn’t seem right, from typos to examples that don’t work, we’d welcome corrections in the form of PRs or issues. Sending pull requests into the docs can be a great way to get involved with a project. Docs are generally on a quicker release cycle than the codebase and everybody benefits from having improved documentation.

If you’re a Go developer, whether aspirational (like me!) or expert, the [Relay CLI tool](https://github.com/puppetlabs/relay) could present a fun opportunity to dig into a relatively constrained codebase and improve the Relay development experience. I’ve written at length about our [philosophy of CLI design](https://relay.sh/blog/command-line-ux-in-2020/), something I personally am pretty passionate about, and it’s been really gratifying to see those design principles come to life in the Relay CLI. There are a few issues [tagged with CLI](https://github.com/puppetlabs/relay/labels/cli) to get started, and of course we welcome your ideas too.

Going deeper into the architecture, the Kubernetes execution backend for the service is published at [puppetlabs/relay-core](https://github.com/puppetlabs/relay-core). There are some intriguing possibilities for this codebase, like adding a local executor that could use minikube to run workflows locally. The metadata service would also be useful to have as a self-hosted version, because it would allow better validation and testing of step definitions while you’re developing workflows.

Of potential interest to front-end folks, the [Puppet Design System](https://github.com/puppetlabs/design-system) is an open source collection of [React components](https://reactjs.org) that the Relay web app (among other Puppet products) uses to provide gorgeous, modern look-and-feel.

### Upstream

Relay makes heavy use of upstream open source technology. We try to be good citizens of these projects by contributing bug fixes and enhancements back upstream. This helps everybody because we don’t end up maintaining forks or carrying our own patches, the code gets more eyes on it, and the rest of the community can make use of the features too.

The projects we’re most heavily involved in are [Tekton pipelines](https://tekton.dev), which we’ve [blogged about](https://relay.sh/blog/whats-going-on-with-tekton-part-1/) [extensively](https://relay.sh/blog/whats-going-on-with-tekton-part-2/) and [Ambassador](https://www.getambassador.io/), who posted a [detailed technical blog post](https://blog.getambassador.io) describing how Relay uses Knative and Ambassador together to run your Trigger containers.

### Conclusion

To wrap things up, I’d like to acknowledge that open source is tough to get right. Communities are valuable, fragile things, which need lots of love and attention to flourish. We’re deeply committed to investing in community for Relay, but acknowledge up front that we won’t always get it right. We pledge to listen and improve based on your feedback. You can email the team at relay@puppet.com or jump on slack.puppet.com to chat in #relay. Please keep the lines of communication open and let’s build some awesome automation together!