Skip to content

Instantly share code, notes, and snippets.

@jayzeng
Created March 30, 2014 18:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jayzeng/9877315 to your computer and use it in GitHub Desktop.
Save jayzeng/9877315 to your computer and use it in GitHub Desktop.
set up hubot on heroku
- Create a new bot user and invite to the room on hipchat
- Once the bot account is created, go to https://smarttech.hipchat.com/account/xmpp
- Install coffee script and hubot
```
npm install --global coffee-script hubot
```
- Create a new hubot project, cd into the folder and install depenedncies
```
hubot --create hubot-fun
cd hubot-fun
npm install
npm install --save hubot-hipchat
```
- Modify Procfile (already exists)
web: bin/hubot --adapter hipchat
- Init project and commit
```
git init
git add .
git commit -m "init commit"
```
- Create a new heroku instance and name it mybot
```
heroku create
heroku rename mybot
```
- Add and enable redis
```
heroku addons:add redistogo:nano
```
- Configure global vars
```
1 === smarttechbot Config Vars
2 HEROKU_URL:
3 HUBOT_AWS_ACCESS_KEY_ID:
4 HUBOT_AWS_SECRET_ACCESS_KEY:
5 HUBOT_AWS_SQS_REGIONS:
6 HUBOT_FORECAST_API_KEY:
7 HUBOT_HIPCHAT_JID:
8 HUBOT_HIPCHAT_PASSWORD:
9 HUBOT_TEAMCITY_HOSTNAME:
10 HUBOT_TEAMCITY_PASSWORD:
11 HUBOT_TEAMCITY_USERNAME:
12 HUBOT_YELP_CONSUMER_KEY:
13 HUBOT_YELP_CONSUMER_SECRET:
14 HUBOT_YELP_SEARCH_ADDRESS:
15 HUBOT_YELP_TOKEN:
16 HUBOT_YELP_TOKEN_SECRET:
17 REDISTOGO_URL:
```
- Install & enable additional hubot scripts
Hubot scripts catalog:
http://hubot-script-catalog.herokuapp.com/
➜ hubot-fun git:(master) more hubot-scripts.json
["redis-brain.coffee", "shipit.coffee", "aws.coffee", "weather.coffee", "whatis.coffee","yelp.coffee","travis.coffee", "teamcity.coffee", "talkative.coffee","hackernews.coffee", "hashing.coffee","grumpycat.coffee","encourage.coffee","email.coffee","ascii.coffee","status.coffee"]
```
➜ hubot-fun git:(master) more package.json
{
"name": "hosted-hubot",
"version": "2.7.1",
"private": true,
"author": "GitHub Inc.",
"keywords": [
"github",
"hubot",
"campfire",
"bot"
],
"description": "A simple helpful robot for fun",
"licenses": [
{
"type": "MIT",
"url": "https://github.com/github/hubot/raw/master/LICENSE"
}
],
"repository": {
"type": "git",
"url": "https://github.com/github/hubot.git"
},
"dependencies": {
"aws2js": "0.6.12",
"gitio": "1.0.1",
"hubot": ">= 2.6.0 < 3.0.0",
"hubot-hipchat": "~2.6.4",
"hubot-scripts": ">= 2.5.0 < 3.0.0",
"jsdom": "0.2.14",
"moment": "1.6.2",
"nodepie": "0.5.0",
"underscore": "1.3.3",
"yelp": "0.1.1"
},
"engines": {
"node": ">= 0.8.x",
"npm": ">= 1.1.x"
}
}
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment