anadimisra / ramukaka

Chatbot in use at Agility Roots - "Robotic Automated Monotony Undoer"
MIT License
0 stars 0 forks source link

Gitter chat Twitter Follow Website

RAMUkaka

Drawing

Ramukaka, stylized as RAMUkaka, is the affectionate name for the chatbot in use at Agility Roots.

About the name:

How to run

The instructions below tell you how to get your own instance of RAMUkaka running on your own technology stack.

1. Satisfy Prerequisites

What? Version? Why?
OS Ubuntu 16.04 64-bit (preferred) RAMUkaka has been tested only on Ubuntu.
Python 3+ (3.5.2 recommended) RAMUkaka uses Errbot as its bot framework, which supports Python 3.
pipenv Latest (Install Instructions) Errbot installation is recommended using a virtualenv, so pipenv was the natural option.

If you don't know what the above means, read about Pipenv first.

Note

2. Configure Connectivity

RAMUkaka can connect to the following services, so you need accounts you can use, and need to configure each service separately.

What? What needs to be done?
Slack Follow the instructions for creating a Bot token for Errbot.
AWS
  • Create an AWS account if not already present; then create a "Bot" IAM user for RAMUkaka.
  • It is highly recommended that you set a restricted policy for this user; this limits the resources available to this IAM user and prevents misuse
  • (for e.g. you can restrict the bot IAM user to a certain region or certain instance types).

3. Set environment

RAMUkaka reads the following configuration from Environment Variables.

AWS Connectivity

ERRBOT_AWS_KEYPAIR_NAME # an AWS keypair
ERRBOT_AWS_DEFAULT_REGION # AWS region where RAMUkaka will work
ERRBOT_AWS_SECRET_KEY # AWS secret key
ERRBOT_AWS_ACCESS_KEY # AWS access key
ERRBOT_AWS_ACCOUNT_ID # account ID for AWS

Slack Connectivity

ERRBOT_SLACK_TOKEN # Slack Token

4. Initialize

pipenv install

The above command installs the dependencies mentioned in the Pipfile. To load these dependencies you need to run:

pipenv shell

This creates a new shell process for you where you can start Errbot: just run errbot.

Run Errbot

About The Toolstack

We use the following toolstack to implement RAMUkaka.

Tool Why?
Errbot The Bot framework, based on Python
spaCy For NLP and ML implementation within RAMUkaka
Apache libcloud Python connectivity to any virtualization provider.
py.test Test Cases for the bot.

Testing

References

Errbot

  1. Testing Errbot: http://errbot.io/en/latest/user_guide/plugin_development/testing.html
  2. Errbot: plugin development: http://errbot.io/en/latest/user_guide/plugin_development/development_environment.html
  3. Errbot Getting Started: http://errbot.io/en/latest/index.html
  4. http://errbot.io/en/latest/user_guide/setup.html
  5. http://errbot.io/en/latest/user_guide/configuration/slack.html
  6. config.py template: https://github.com/errbotio/errbot/blob/master/errbot/config-template.py
  7. AWS plugin for errbot adapter from https://github.com/jvasallo/err-plugins/blob/master/err-aws/aws.py

Apache libcloud

  1. API Docs and Examples