pantheon-systems/riker

Name: riker

Owner: Pantheon

Description: Number one here to make it so

Created: 2017-07-10 18:02:08.0

Updated: 2017-09-29 02:26:19.0

Pushed: 2017-12-21 17:42:46.0

Homepage: null

Size: 3471

Language: Go

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Riker

gRPC distributed Chat bot. Riker is the server that other apps register commands with. We call the command providers redshirts. Riker handles the complexity of interfacing with a chat provider such as slack. Redhirts communicate with Riker using gRPC. Authentication between Riker and redshirts is mutual TLS. Redshirts register a command, and users/groups that are authorized to use it.

Getting Started

You need these things to get up and running

First you will have to create a slack bot in the slack admin UI. Whatever you name the bot in slack you will need to pass to Riker as the name field. Make sure you have a TLS cert+key in .pem format for riker.

Get riker

you can get a release from there releases tab.

Configure Riker
Environment variables

Riker supports every commandline flag being specified as an environment variable. To use environment variables prefix any flag with RIKER and convert any dashes to underscores. For example --bind-address would be specified in the environment as RIKER_BIND_ADDRESS

Config files

Riker supports a config file in any of HCL, TOML, YAML, JSON or Java properties formats. Config files are looked for in the current directory ./.riker.<ext> as well as in ~/.riker.<ext>. This simple config should get you up and running.

ace this in  ~/.riker.yaml

name: riker
g: true
-log: true
-address: localhost:6000

ange these to your tokens
token: yourbottoken
token: yourapitoken

e your own certs here
cert: ~/path/to/riker.pem
ert: ~/path/to/ca.crt

lowed-ou are a further restriction on the TLS for connecting redshirts.
ly clients connecting with one of these OUs will be allowed to register a
mmand.
wed-ou:
riker
riker-redshirt
Running Riker

Assuming you have a config file you can run Riker with the slack chat provider:

ker slackbot
Kube / Helm chart

TODO

Chat Providers

Slack

Slack is what we use at pantheon, and what riker first was built against. Currently We don't have plans to implement other backends, but PR's are welcome.

Authenticating riker to slack:

There are 3 things you need (4 if you run your own CA)

Local Terminal

To help develop redshrits we implemented a local mode chat server that disables gRPC authentication. This is meant only for local development. It can also be a way to play with Riker.

You can set the nickname of the terminal mode user and the groups that the user belongs to using the command line options –nickname and –groups. Groups should be a comma seperated list of group names.

Components

Building From Source

Riker should be build using go1.9+. Riker uses the dep tool for handling dependencies, but the deps are not special. You should be able to build with go get.

et -u github.com/pantheon-systems/riker

If that doesn't work you should check out the source and use dep ensure.

clone https://github.com/pantheon-systems/riker.git

Then you just need to run make to setup deps and build

 riker
ke deps build

Developing Redshirts

TODO: add alot more info here, but this is the gist


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.