Create your own HuBot on the free Openshift Servers and run on different platforms

Thx to this article I started using OpenShift for hosting my own bots. It’s a walk though that has some small pitfalls, but any suitable dev will overcome this with some debugging.

Running a Slack BOT

Source: https://github.com/slackapi/hubot-slack

Local

HUBOT_SLACK_TOKEN=<slack_app_token> HUBOT_LOG_LEVEL=debug ./bin/hubot -a slack -n 'botje'

Server (Package.json)

"start": "PORT=$OPENSHIFT_NODEJS_PORT BIND_ADDRESS=$OPENSHIFT_NODEJS_IP HEROKU_URL=$OPENSHIFT_APP_DNS REDIS_URL=redis://:$REDIS_PASSWORD@$OPENSHIFT_REDIS_HOST:$OPENSHIFT_REDIS_PORT HUBOT_SLACK_TOKEN=<slack_app_token> HUBOT_LOG_LEVEL=debug bin/hubot -n 'botje' -a slack"

Running a Facebook Messenger BOT

Source: https://github.com/ClaudeBot/hubot-messenger-bot

Local

MESSENGER_VERIFY_TOKEN=<verify_token> MESSENGER_ACCESS_TOKEN=<facebookaccesstoken> HUBOT_LOG_LEVEL="debug" ./bin/hubot --a messenger-bot

Server (Package.json)

"start": "PORT=$OPENSHIFT_NODEJS_PORT BIND_ADDRESS=$OPENSHIFT_NODEJS_IP HEROKU_URL=$OPENSHIFT_APP_DNS REDIS_URL=redis://:$REDIS_PASSWORD@$OPENSHIFT_REDIS_HOST:$OPENSHIFT_REDIS_PORT MESSENGER_VERIFY_TOKEN=<verify_token> MESSENGER_ACCESS_TOKEN=<facebookaccesstoken> HUBOT_LOG_LEVEL=debug bin/hubot -n '' -a messenger-bot"

Running an Skype BOT

Source: https://github.com/ClaudeBot/hubot-skype-bot

Local

MESSENGER_VERIFY_TOKEN=<verify_token> MESSENGER_ACCESS_TOKEN=<facebookaccesstoken> HUBOT_LOG_LEVEL="debug" ./bin/hubot --a messenger-bot

Server (Package.json)

"start": "PORT=$OPENSHIFT_NODEJS_PORT BIND_ADDRESS=$OPENSHIFT_NODEJS_IP HEROKU_URL=$OPENSHIFT_APP_DNS REDIS_URL=redis://:$REDIS_PASSWORD@$OPENSHIFT_REDIS_HOST:$OPENSHIFT_REDIS_PORT SKYPE_BOT_ID=<skype_bot_id> MICROSOFT_APP_ID=<microsoft_app_id> MICROSOFT_APP_SECRET=<microsoft_app_secret> HUBOT_LOG_LEVEL=debug bin/hubot -a skype-bot"

 

Leave a Reply

Your email address will not be published. Required fields are marked *