Skip to content

Latest commit

 

History

History
91 lines (59 loc) · 2.23 KB

README.md

File metadata and controls

91 lines (59 loc) · 2.23 KB

supbot

Sup... Slack?

What is Sup?

Sup let's you execute commands on remote machines based on predefined and simple rules.

What is Supbot?

Supbot is a Slack bot that listens to Sup commands.

You can easily monitor, deploy, bring-up, bring-down, tail logs... on any environment, across any network directly from your Slack channel.

You can do anything Sup can do, directly from Slack.

screen shot 2016-01-24 at 3 27 42 pm

How about using a remote network and not only the local one? Yes:

screen shot 2016-01-24 at 4 01 04 pm

Checking out the repo

cd ~/projects
git checkout https://github.com/gophergala2016/supbot.git

Obtaining a Slack token

Your deployment of the Slack bot will require a Slack bot token. This token will need to be set to the SLACK_TOKEN environment variable.

To obtain this token, you will need to sign into Slack and request a custom bot integration for your team's subdomain. At the time of writing (Jan 24 2016), you can start this process at the following URL:

https://[your-team-subdomain].slack.com/apps/build/custom-integration

Deploying to a server

You can use sup to deploy to a server as defined in the Supfile.

# This is a portion of the supfile
networks:
  ...
  prod:
    hosts:
      - deploy@162.243.9.244
make deploy

If you want to try it locally, use make docker to build the docker image, then use make docker-run to run this server locally.

SLACK_TOKEN=yyy make docker-run

Deploying to Heroku

$ heroku create
$ git push heroku master
$ heroku open

or

Deploy

Make sure to set your SLACK_TOKEN env variable

$ heroku config:set SLACK_TOKEN=xxx-xxyz-xxzy

Setting config vars and restarting xxxx... done
SLACK_TOKEN: xxx-xxyz-xxzy

$ heroku config
=== xxxx Config Vars
SLACK_TOKEN: xxx-xxyz-xxzy

Some pointers:

  • you might need to run heroku ps:scale worker=1 to scale dyno manually