GithubHelp home page GithubHelp logo

flowdock_cli's Introduction

flowdock bb tool integration

We use a CLI to deploy, restart or get an overview of our queues:

bb queues top
bb deploy briefkasten
bb restart fbnot

The goal was to allow us doing all this from our mobile clients without always having your computer with you during pager-duty to do small maintenance jobs.

Inspired by message passing from recent Elixir talks, I use shell pipes to pass messages between processes. This example is a bit contrived, but fun.

flowdock_stream

This tool listenes on a particular flowdock stream with a defined regular expression to catch our bb invocations and ouputs the json to the shell, where it can be picked up by another piped command.

shell_command

This is an example of how we process data, transform it with the outcome of the shell command and pay it forward.

flowdock_response

This sends data back to the particular bb tool invocation back in the chat, by receiving data from the shell_command and the thread_id from the flowdock_stream.

Example

# flowdock_bb.sh
export flowdock_token=YOUR_TOKEN
export flowdock_flow=YOUR_FLOW
export flowdock_regexp="^bb "
export flowdock_organization=YOUR_ORGANIZATION

./bin/flowdock_stream | ./bin/shell_command | ./flowdock_response \
| jq "." >> /var/log/flowdock_bb_invocations.log

TODO

  • add wrapper script for bastion server
  • make sure it's always running

flowdock_cli's People

Contributors

riethmayer avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.