Skip to content

tmtk75/terraform-hubot-slack

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

This provides an instruction to set up a hubot in Slack.

Prerequisites

and, basically only works on MacOSX.

Launch a heroku instance with terraform

Create a file heroku.tfvars

email = "youraccount@gmail.com"
api_key = "aaaaaaaa-1111-bbbb-2222-cccccccccccc"

Let's say you already have a token of hubot for Slack, type like this.

$ VAR_FILE=heroku.tfvars \
  SLACK_TOKEN=<your-token> \
  SLACK_TEAM=<your-tema> \
  SLACK_BOTNAME=<your-botname> make apply
heroku_app.default: Creating...
  config_vars.#:                     "" => "1"
  config_vars.0.HEROKU_URL:          "" => "http://secret-island-8419.herokuapp.com"
  config_vars.0.HUBOT_SLACK_BOTNAME: "" => "secret-island-8419"
...
Outputs:

  heroku_app.default.git_url = git@heroku.com:secret-island-8419.git

SLACK_TOKEN is issued here, https://kii.slack.com/services/new/hubot

Deploy a new bot onto the heroku instance

On the assumption you've already logged in heroku

$ . .env
$ make bot push
hubot --create bot
...

This will create a new git repository to be deployed onto heroku, and will push the repository, so it's deploy.

That's it.
Hey, call the bot on your team of Slack!

Retry

$ VAR_FILE=heroku.tfvars \
  SLACK_TOKEN=<your-token> \
  SLACK_TEAM=<your-tema> \
  SLACK_BOTNAME=<your-botname> make destroy
...
$ make distclean

This cleans up all resources, local files and heroku instance.

You can start from the top.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published