Skip to content

Instantly share code, notes, and snippets.

@smetj
smetj / bootstrap.yaml
Last active April 28, 2016 08:35
wishbone.flow.tippingbucket
---
modules:
input:
module: wishbone.input.httpclient
arguments:
url:
- http://elasticnode-1:9200/_cluster/stats
- http://elasticnode-1:9200/_cluster/health
@smetj
smetj / bootstrap.yaml
Created April 17, 2016 12:11
wishbone.flow.switch
---
modules:
input:
module: wishbone.input.httpserver
switch:
module: wishbone.flow.switch
arguments:
outgoing: backend_az_1
@smetj
smetj / bootstrap.yaml
Created April 17, 2016 08:47
roundrobin
---
modules:
input:
module: wishbone.input.httpclient
arguments:
url:
- http://elasticnode-1:9200/_cluster/stats
- http://elasticnode-1:9200/_cluster/health
- http://elasticnode-1:9200/_nodes/stats
@smetj
smetj / bootstrap.yaml
Created April 11, 2016 20:26
wishbone.flow.fresh
modules:
input:
module: wishbone.input.httpserver
read_json:
module: wishbone.decode.json
validate:
module: wishbone.flow.jsonvalidate
arguments:
@smetj
smetj / bootstrap.yaml
Created April 8, 2016 19:33
funnel example
modules:
input_json:
module: wishbone.input.tcp
arguments:
port: 10000
json_decode:
module: wishbone.decode.json
input_msgpack:
@smetj
smetj / bootstrap.yaml
Last active April 7, 2016 20:53
fanout example
modules:
input:
module: wishbone.input.tcp
fanout:
module: wishbone.flow.fanout
output_az1:
module: wishbone.output.tcp
arguments:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# from gevent.monkey import patch_all; patch_all()
from amqp.connection import Connection as amqp_connection
from amqp import basic_message
@smetj
smetj / boostrap.yaml
Created February 25, 2016 09:44
A wishbone bootstrap file to consume logs from a RabitMQ queue and filter out the ones matching the jq expression
---
modules:
input:
module: wishbone.input.amqp
arguments:
host: rabbitmq-server.somecompany.local
user: wishbone
password: xxxxxxx
exchange: "logs"
exchange_type: topic
@smetj
smetj / bootstrap.yaml
Created February 21, 2016 20:08
wishbone example usage for "fresh" module
---
lookups:
randomword:
module: wishbone.lookup.randomword
event:
module: wishbone.lookup.event
modules:
input:
@smetj
smetj / gist:a7f8499e75c2855da417
Created February 16, 2016 14:51
Docker file to build wishbone development
FROM centos:centos7
MAINTAINER Jelle Smet
EXPOSE 19283
RUN yum install -y wget automake autoconf make file libtool gcc gcc-c++ python-dev bzip2
RUN wget -qO- https://bitbucket.org/squeaky/portable-pypy/downloads/pypy-4.0.1-linux_x86_64-portable.tar.bz2|tar xjv -C /opt
RUN wget -O /tmp/get-pip.py https://bootstrap.pypa.io/get-pip.py
RUN /opt/pypy-4.0.1-linux_x86_64-portable/bin/pypy /tmp/get-pip.py
RUN /opt/pypy-4.0.1-linux_x86_64-portable/bin/pip install cython
RUN /opt/pypy-4.0.1-linux_x86_64-portable/bin/pip install --process-dependency-link https://github.com/smetj/wishbone/archive/develop.zip
ENTRYPOINT ["/opt/pypy-4.0.1-linux_x86_64-portable/bin/wishbone"]