Code Monkey home page Code Monkey logo

cloud-bot's Introduction

Build Status

Cloud Bot

Slack bot to automate stuff on cloud.

The bot server receives messages from Slack's Events API. A message exchange (RabbitMQ) is used to send these messages to workers.

Example worker depoyment

You can find details of deployment in the example/deploy folder. This assumes that you have already setup the bot in your Slack's app management page.

RabbitMQ

The easiest way to install/deploy is with helm charts. First install rabbitmq:

$ helm repo add bitnami https://charts.bitnami.com/bitnami
$ helm install my-release bitnami/rabbitmq
$ cd example/deploy
$ helm install rabbit bitnami/rabbitmq -f rabbitmq.yml

This will create a RabbitMQ service and its deployment. More details about the chart here.

In addition, the environment variables AMQP_SERVICE_HOST and AMQP_SERVICE_PORT are added to bot server and worker pods.

Bot Server and Workers

Refer to values.yml for required variables, mainly values required by Slack.

Add Zetta's helm repo and update dependencies to install required sub-charts.

$ helm repo add zetta http://zetta.ai/helm-charts/charts
$ helm repo update
$ helm dependencies update
$ helm install --debug <release-name> .

Installing workers independently

It is easy to install or deploy just a single worker or a group of related workers as a helm release. Make sure to add the required environment variables so that workers can connect to the message exchange.

Supported message types

A worker can respond to DMs, channels and threads. Refer to different command types in example/example-workers. Responding to threads is especcially helpful for long tasks and providing updates at checkpoints in a thread, use broadcast=True to notify channel for important checkpoints.

Python package click is used to parse user commands, it provides great support for various use cases.

cloud-bot's People

Contributors

akhileshh avatar

Watchers

 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.