Giter Club home page Giter Club logo

ukhomeoffice.upbot's Introduction

Logo of the project

UpBot

An awesome little Slack bot to help update and communicate the stuses of a project's services to Slack

Welcome to UpBot! I'm a bot app that connects to Slack and responds to requests for the current status of services that are being monitored by upbot and allows authorised users to update the statuses and register new services to be monitored.

Installing & getting started

Upbot can be installed either from source or as a docker image. It requires a Redis server for data storage.

Developing

The upbot project is maintained in the Home Office GitHub organisation. As an open source project you are free to clone and install the project with the following command:

git clone ssh://[email protected]:UKHomeOffice/upbot.git
cd upbot
npm i --only=dev

Once cloned you can run the application (and Redis database) using docker-compose up from the project's root directory. This will launch two containers; one running the app and one running the Redis database.

# launch the app and database locally in Docker containers
docker-compose up

Building and Publishing

This application is intended to be built and published as a docker app using docker build based on the project's Dockerfile.

docker build -t homeoffice/upbot:0.0.2 .

The current docker image is published to Quay.

Deploying

The application is deployed as docker container(s). If you only want to deploy locally we recommend using docker-compose otherwise you should docker pull the image from Quay.

Deploying locally

The following command will deploy upbot along with a fresh, standalone Redis server:

git clone ssh://[email protected]:2222/dacc-dq/upbot.git
cd upbot
docker-compose up

Deploying in Production

Update this section once the image is hosted on Quay

Configuration

upbot requires certain environment variables to be present. These are:

  • the redis connection requires a host and port - set in UPBOT_REDIS_HOST & UPBOT_REDIS_PORT)
  • the Slack API token to use - set in HODQ_SLACK_API_TOKEN

You will usually want to treat the Slack API token as a secret.

Currently using config.yaml for setting the intents

upbot uses a config.yaml file to register the phrases that upbot monitors for to determine intent. For a standard deployment you can leave this file as is. This method may be changed in the future.

Running the application locally (not in a container)

Running upbot is really simple, just:

# at the project's root directory
npm start

Features

upbot is a simple Slack bot that helps the DevOps team quickly manage the status of the team's services, directly from Slack.

Currently upbot provides the following features:

  • register new services
  • update a service's status (including a timestamp of when the status last changed)
  • list the services currently being monitored
  • request the current state of all services

Further features are currently work-in-progress and some are still to be imagined.

One feature that we intend to add soon is to allow a (short) message to be entered when updating a service's status, so that the message can be used to provide context to those viewing the status. This is currently work in progress.

Contributing

Feel free to fork our project and/or open any issues, we appreciate all input and feedback.

The following people have contributed to the development of upbot:

  • Tom Fitzherbert

Licensing

upbot is released under the MIT license.

Credits

Our logo is based on an icon made by Roundicons from www.flaticon.com

ukhomeoffice.upbot's People

Contributors

tomfitzherbert 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.