Sup... Slack?
Sup let's you execute commands on remote machines based on predefined and simple rules.
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.
How about using a remote network and not only the local one? Yes:
cd ~/projects
git checkout https://github.com/gophergala2016/supbot.git
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
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
$ heroku create
$ git push heroku master
$ heroku open
or
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