Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Latest commit

 

History

History
executable file
·
38 lines (33 loc) · 1.12 KB

README.md

File metadata and controls

executable file
·
38 lines (33 loc) · 1.12 KB

How to Build a ChatOps Bot

This repo provides the required code, relating to the following articles, around - How to Build a ChatOps Bot.

  • How to Build a Webex Teams Chatbot

Load Environment Variable

Set your environment variables by copying the example .env and defining your settings. Once done run export $(cat .env | xargs) to export your environment variables.

cp .env-example .env

Create Environment

Next create a virtual environment and load your Python dependancies.

virtualenv --python=/usr/bin/python3 venv
source venv/bin/activate
pip install -r requirements.txt

Install System Dependancies

Install the required system dependancies via apt-get, or via the nesscary package manager for your distribution.

apt-get install ipcalc

Setup Ngrok

Download Ngrok into /opt via the instructions on https://dashboard.ngrok.com/get-started/setup. Once done, set your auth token and start your Ngrok tunnel.

/opt/ngrok authtoken ${NGROK_TOKEN_ENV}
/opt/ngrok http -subdomain=chatop 5030

Execute Chatbot

You can now start the Chatbot via:

python chatbot/webex_teams_bot.py