Installation

Compatibility Note

Relay agent runs on Linux, Windows and MacOS distributions. If you require support for a different architecture, please contact support at [email protected].

Web Relay Tools

When using Web Relay, we first recommend registering an account on webhookrelay in order to generate access tokens. This will allow you to easily authenticate your agent.

There are several supported tools, please choose what best suits your needs:

Install CLI

Web Relay provides an official command client for quick configuration of webhook forwarding, tunnels and can also provision authentication tokens. It provides batteries-included agent for developing and testing workflows. It takes only a few seconds for it to start running with one-way HTTP request forwarding, bidirectional tunnels, and CLI for managing your resources.

DOWNLOAD CLIto see alternative methods, please continue

Using with Docker

Webhookrelayd agent can either forward requests to destinations or open bidirectional tunnels. It is a single Docker image that requires access key and secrets for authentication.
This image can be used either in a single machine or in cluster schedulers such as Kubernetes.

If you don’t have Docker installed, we highly recommend checking resources available on https://www.docker.com/.

Forward webhooks

  1. Go to https://my.webhookrelay.com/buckets and create a bucket
  2. Configure output destination (another container or IP address where you want to forward)
  3. Start a webhookrelayd agent:
docker run -it webhookrelay/webhookrelayd -k [access key] -s [access secret] -b mybucketname

Open a tunnel

  1. Go to https://my.webhookrelay.com/tunnels and create a tunnel with your desired destination
  2. Start a bidirectional tunnel:
docker run --name whr-relayd --net host --restart always -d webhookrelay/webhookrelayd:latest --mode tunnel -t mytunnelname -k [access key] -s [access secret]

Using with Kubernetes

Webhook Relay can help you receive webhooks in your internal services. To achieve that you can either use sidecar approach or a standalone deployment. Since container is stateless and only requires your access key & secret, deploying and running it is extremely easy.

First, go to https://my.webhookrelay.com/tokens and create a token key & secret pair. Then, create a Kubernetes secret:

kubectl create secret generic webhookrelay-credentials --from-literal=key=[access key] --from-literal=secret=[access secret]

Once the secret is created, you can deploy webhookrelayd container either as a sidecar or a standalone container.

Sidecar

Webhookrelayd agent can be easily deployed as a sidecar.
This way requests can be forwarded to the service through localhost:

---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: wd
namespace: default
labels:
name: "wd"
spec:
replicas: 1
template:
metadata:
name: wd
labels:
app: wd
spec:
containers:
- image: karolisr/webhook-demo:0.0.15
imagePullPolicy: Always
name: wd
command: ["/bin/webhook-demo"]
ports:
- containerPort: 8090
livenessProbe:
httpGet:
path: /healthz
port: 8090
initialDelaySeconds: 30
timeoutSeconds: 10
securityContext:
privileged: true
# [START webhookrelay_container]
- image: webhookrelay/webhookrelayd:latest
name: webhookrelayd
command: ["/webhookrelayd"]
env:
- name: KEY
valueFrom:
secretKeyRef:
name: webhookrelay-credentials
key: key
- name: SECRET
valueFrom:
secretKeyRef:
name: webhookrelay-credentials
key: secret
- name: BUCKET
value: webhook-demo
# [END webhookrelay_container]

Separate deployment

apiVersion: apps/v1beta2
kind: Deployment
metadata:
name: webhookrelay
namespace: webhookrelay
labels:
app: webhookrelay
spec:
replicas: 1
selector:
matchLabels:
app: webhookrelay
release: webhookrelay
template:
metadata:
labels:
app: webhookrelay
release: webhookrelay
spec:
containers:
- name: webhookrelayd
image: webhookrelay/webhookrelayd:latest
command: ["/webhookrelayd"]
env:
- name: KEY
valueFrom:
secretKeyRef:
name: webhookrelay-credentials
key: key
- name: SECRET
valueFrom:
secretKeyRef:
name: webhookrelay-credentials
key: secret
- name: BUCKET
value: webhook-demo

If agent is deployed as a separate deployment, the output destination should then be a service name.
Repository can be found here: https://github.com/webhookrelay/webhook-demo.

If you are using Kubernetes, you should also check out ingress controller.

Terms