SlideShare a Scribd company logo
Hubot scripting in Slack
Juneyoung Oh
I-ON Communications
2015.08.01
Index of Contents
Purpose of this Presentation
Install Hubot on OSX
Invite Hubot in Slack room
Writing custom script for Hubot (js)
Tips from personal experiences
CAUTION : I will do all this on OSX with Slack, Heroku.
Purpose of this presentation
This presentation for you :
- Want to make fun bot in your slack community
- Who knows little about javascript
- Want to try something fun with js, but do not want to much time
on it
This presentation NOT for you :
- Hardcore programmer who ought know everything running in
background
- Who never heard of javascript (I am not going to talk about js basic
:<)
- Want to write custom script for Hubot in coffee script. (There are
many examples for coffee on web, so go for it :D)
Installing Hubot on OSX
CAUTION : Things NOT going to mention in here, but you need to prepare for
further steps.
- Install node.js on your system
- Install nvm (node version mananger) on your system
Official Hubot installation guide can be found here :
https://hubot.github.com/docs/
This link could be more accurate but I am going to talk about errors I have met while following those
steps.
Installing Hubot on OSX
First, Install `hubot-generator` with `yo`.
Could get following errors. it just need some authority on your system.
Fix this with `sudo` command like :
Installing Hubot on OSX
Now, make a directory for the bot
Move into project directory
Calling hubot!
You could see following on your screen
Installing Hubot on OSX
In Terminal, you should fill some fields to proceed.
[ Fields list ]
- Owner : Bot Owner name, nothing special.
- Bot name : Going to use this name to call this bot. i.e. If your bot name is
‘testbot’, than `testbot what is your name?`
- Description : Nothing special.
- Adapter : Adapters which could use this bot. default is ‘campfire’. However,
you can change this anytime by editing a file named ‘Procfile’
This are sample which I wrote for this
presentation :D
Installing Hubot on OSX
Now, talk about directories & Files.
Can check with `ls` command. It should shows like follow :D
[File List]
- Procfile : can edit ‘Adapter’ options here.
- external-scripts.js : Additional hubot script. User Custom Script Name can be
found here.
- READ.md : This file for git. If you using a service like ‘github’, This document
will be shows at first.
- hubot-scripts.json : Additional hubot script. But these are specific. Details
could be found : https://www.npmjs.com/browse/keyword/hubot-scripts
- scripts(d) : Put your custom script this directory. To use this script, you have to
specify the name on external-script.js
- bin(d) : A directory which has hubot execution file.
Installing Hubot on OSX
Let’s run this :D
For now, a prompt is all. However still hubot can do serveral commands.
Type following command.
remember, this space for your ‘Botname’.
Simple command sample for you.
Now, Let’s connect this with Slack!
Invite Hubot in Slack room
Let’s make this bot work in slack :D
Before start …
- I assume that you already have a slack account
- I assume that you already install heroku tool-belt.
- Official tutorial can be found : https://github.com/slackhq/hubot-slack
1. Let the bot knows our adapter is ‘slack’.
Go to hubot project folder, and open this with `vi` command.
It looks like this.
We need to edit this file. so press ‘a’ or ‘I’ key to switch to ‘insert mode’. check
the left bottom of terminal and you will see…
Invite Hubot in Slack room
2. Replace that line with follow.
If you want to keep the original one, add ‘#’ to the front of the line, so computer
consider that as a comment, not a command.
Than, press ‘esc’ key to manage mode and type ‘:wq’.
‘w’ means ‘write’ and ‘q’ means ‘quit’.
TIPS. In normal mode type ‘:set nu’. now, vi shows line number for you. This
function is quite useful when handling long script.
Invite Hubot in Slack room
3. Deploy this to Heroku.
For further information for Heroku, visit the link : http://www.heroku.com
You will get following as result.
As you can see in the last line, Heroku internally uses git.
So our further jobs should upload and synchronized with that git URL.
In this case,
https://git.heroku.com/testbotapp.git is my heroku git address.
Invite Hubot in Slack room
4. Install Heroku redistogo addon.
Hubot uses redis DB as its brain, so need to install this to Heroku.(do not need to
install redis on your local.)
heroku addons:create (addon name) –app (your app name in Heroku)
green : Heroku command.
orange : variables
purple : which could be skipped (If you have bunch of Heroku apps like me, need
to point specific target application)
* You need to register ACCOUNT INFORMATION to use heroku addons, even
though it is free. It is necessary.
Invite Hubot in Slack room
5-1. Add configurations to Heroku.
To service Slack, it needs to know HEROKU URL and HEROKU_SLACK_TOKEN.
Let’s add.
Go to below URL:
https://{your room}.slack.com/services/new/hubot
After input your bot’s name, get TOKEN from the page.(It is on the top of the
page. Can not be missed)
Invite Hubot in Slack room
5-2. Add configurations to Heroku.
Add information from the Terminal.
HEROKU_URL can be found heroku.com page.
In [Setting] tab, middle of the page [info] section.
Invite Hubot in Slack room
6. Run your bot and meet it in your Slack.
First, need to push our code to heroku. Than, run it!
If you already have other heroku app, need to some extra process.
Move to top folder of your Project. Than type follow before push.
Now run our bot.
As a result, can find bot in slack. See [DIRECT MESSAGES] section.
Writing custom bot script (js)
This pages for custom hubot scripting for javascript, NOT coffee script.
Basic : Write custom script under ‘scripts’ folder .
Writing custom bot script (js)
After, writing script. Edit ‘hubot-scripts.json’ in top folder.
Add your script name without extension.
Left side is my folder structure, and right is contents of hubot-scripts.json.
Writing custom bot script (js)
Finally, use ‘add’, ‘commit’ and ‘push’ command.
Than, ‘heroku open’.
And go to slack, what you can see …
Tips from personal exp
Tips from my experiences.
1. Checking heroku logs.
This will be quite useful, since there are no scripting guides for javascript. By
doing this, can find more information about internal object like message, robot or
adapter.
2. Could not use DOM Elements.
Hubot script can not use ‘document’ Object. (XMLHttpRequest Object also could
not found).
Tips from personal exp
Tips from my experiences.
3. Use ajax with internal API.
For instance, it looks like…
4. In slack, some of APIs are forbidden to bot.
i.e. kick API can not be called by a bot. For more information, refer following
URL : https://api.slack.com/methods
Tips from personal exp
Tips from my experiences.
5. Refer coffee script codes.
There are no documents for javascript. So if you use js, you have to look what
original structure(coffee) is. Refer ‘src’ directory of hubot github.
URL : https://github.com/github/hubot/tree/master/src
Just like coffee, some objects will be found in js version.
i.e. message, brain, robot, user … Can check if you print those in console and read
heroku logs.
Thanks!

More Related Content

What's hot

Py conkr 20150829_docker-python
Py conkr 20150829_docker-pythonPy conkr 20150829_docker-python
Py conkr 20150829_docker-python
Eric Ahn
 
Gael Le Mignot How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
Gael Le Mignot   How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...Gael Le Mignot   How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
Gael Le Mignot How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
Vincenzo Barone
 
Aucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksAucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricks
Glen Ogilvie
 
Perl Dancer for Python programmers
Perl Dancer for Python programmersPerl Dancer for Python programmers
Perl Dancer for Python programmers
xSawyer
 
Ultimate Unix Meetup Presentation
Ultimate Unix Meetup PresentationUltimate Unix Meetup Presentation
Ultimate Unix Meetup Presentation
JacobMenke1
 
An introduction to Rex - FLOSS UK DevOps York 2015
An introduction to Rex - FLOSS UK DevOps York 2015An introduction to Rex - FLOSS UK DevOps York 2015
An introduction to Rex - FLOSS UK DevOps York 2015
Andy Beverley
 
Fullstack Academy - Awesome Web Dev Tips & Tricks
Fullstack Academy - Awesome Web Dev Tips & TricksFullstack Academy - Awesome Web Dev Tips & Tricks
Fullstack Academy - Awesome Web Dev Tips & Tricks
Frances Coronel
 
Riki Fridrich - Grunt, Gulp a spol. - Automatizáciou k maximalizácii lenivosti
Riki Fridrich - Grunt, Gulp a spol. - Automatizáciou k maximalizácii lenivostiRiki Fridrich - Grunt, Gulp a spol. - Automatizáciou k maximalizácii lenivosti
Riki Fridrich - Grunt, Gulp a spol. - Automatizáciou k maximalizácii lenivostiDevelcz
 
CoffeeScript in 5mins
CoffeeScript in 5minsCoffeeScript in 5mins
CoffeeScript in 5minsMasakuni Kato
 
Sphinx autodoc - automated api documentation - PyCon.KR 2015
Sphinx autodoc - automated api documentation - PyCon.KR 2015Sphinx autodoc - automated api documentation - PyCon.KR 2015
Sphinx autodoc - automated api documentation - PyCon.KR 2015
Takayuki Shimizukawa
 
Terminus, the Pantheon command-line interface
Terminus, the Pantheon command-line interfaceTerminus, the Pantheon command-line interface
Terminus, the Pantheon command-line interface
Jon Peck
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Herokuronnywang_tw
 
PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)
xSawyer
 
Docker, c'est bonheur !
Docker, c'est bonheur !Docker, c'est bonheur !
Docker, c'est bonheur !
Alexandre Salomé
 
Go初心者がGoでコマンドラインツールの作成に挑戦した話
Go初心者がGoでコマンドラインツールの作成に挑戦した話Go初心者がGoでコマンドラインツールの作成に挑戦した話
Go初心者がGoでコマンドラインツールの作成に挑戦した話
dcubeio
 
How did puppet change our system's life?
How did puppet change our system's life?How did puppet change our system's life?
How did puppet change our system's life?Hung Phung Dac
 
[H3 2012] 우리가 모르는 Node.js로 할 수 있는 몇가지
[H3 2012] 우리가 모르는 Node.js로 할 수 있는 몇가지[H3 2012] 우리가 모르는 Node.js로 할 수 있는 몇가지
[H3 2012] 우리가 모르는 Node.js로 할 수 있는 몇가지
KTH, 케이티하이텔
 
Tame your Infrastructure with Puppet
Tame your Infrastructure with PuppetTame your Infrastructure with Puppet
Tame your Infrastructure with Puppet
delimiter
 
Perl Dancer, FPW 2010
Perl Dancer, FPW 2010Perl Dancer, FPW 2010
Perl Dancer, FPW 2010
Alexis Sukrieh
 
Making environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeMaking environment for_infrastructure_as_code
Making environment for_infrastructure_as_code
Soshi Nemoto
 

What's hot (20)

Py conkr 20150829_docker-python
Py conkr 20150829_docker-pythonPy conkr 20150829_docker-python
Py conkr 20150829_docker-python
 
Gael Le Mignot How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
Gael Le Mignot   How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...Gael Le Mignot   How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
Gael Le Mignot How To Minimize Cpu And Memory Usage Of Zope And Plone Appli...
 
Aucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricksAucklug slides - desktop tips and tricks
Aucklug slides - desktop tips and tricks
 
Perl Dancer for Python programmers
Perl Dancer for Python programmersPerl Dancer for Python programmers
Perl Dancer for Python programmers
 
Ultimate Unix Meetup Presentation
Ultimate Unix Meetup PresentationUltimate Unix Meetup Presentation
Ultimate Unix Meetup Presentation
 
An introduction to Rex - FLOSS UK DevOps York 2015
An introduction to Rex - FLOSS UK DevOps York 2015An introduction to Rex - FLOSS UK DevOps York 2015
An introduction to Rex - FLOSS UK DevOps York 2015
 
Fullstack Academy - Awesome Web Dev Tips & Tricks
Fullstack Academy - Awesome Web Dev Tips & TricksFullstack Academy - Awesome Web Dev Tips & Tricks
Fullstack Academy - Awesome Web Dev Tips & Tricks
 
Riki Fridrich - Grunt, Gulp a spol. - Automatizáciou k maximalizácii lenivosti
Riki Fridrich - Grunt, Gulp a spol. - Automatizáciou k maximalizácii lenivostiRiki Fridrich - Grunt, Gulp a spol. - Automatizáciou k maximalizácii lenivosti
Riki Fridrich - Grunt, Gulp a spol. - Automatizáciou k maximalizácii lenivosti
 
CoffeeScript in 5mins
CoffeeScript in 5minsCoffeeScript in 5mins
CoffeeScript in 5mins
 
Sphinx autodoc - automated api documentation - PyCon.KR 2015
Sphinx autodoc - automated api documentation - PyCon.KR 2015Sphinx autodoc - automated api documentation - PyCon.KR 2015
Sphinx autodoc - automated api documentation - PyCon.KR 2015
 
Terminus, the Pantheon command-line interface
Terminus, the Pantheon command-line interfaceTerminus, the Pantheon command-line interface
Terminus, the Pantheon command-line interface
 
2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku2012 coscup - Build your PHP application on Heroku
2012 coscup - Build your PHP application on Heroku
 
PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)PerlDancer for Perlers (FOSDEM 2011)
PerlDancer for Perlers (FOSDEM 2011)
 
Docker, c'est bonheur !
Docker, c'est bonheur !Docker, c'est bonheur !
Docker, c'est bonheur !
 
Go初心者がGoでコマンドラインツールの作成に挑戦した話
Go初心者がGoでコマンドラインツールの作成に挑戦した話Go初心者がGoでコマンドラインツールの作成に挑戦した話
Go初心者がGoでコマンドラインツールの作成に挑戦した話
 
How did puppet change our system's life?
How did puppet change our system's life?How did puppet change our system's life?
How did puppet change our system's life?
 
[H3 2012] 우리가 모르는 Node.js로 할 수 있는 몇가지
[H3 2012] 우리가 모르는 Node.js로 할 수 있는 몇가지[H3 2012] 우리가 모르는 Node.js로 할 수 있는 몇가지
[H3 2012] 우리가 모르는 Node.js로 할 수 있는 몇가지
 
Tame your Infrastructure with Puppet
Tame your Infrastructure with PuppetTame your Infrastructure with Puppet
Tame your Infrastructure with Puppet
 
Perl Dancer, FPW 2010
Perl Dancer, FPW 2010Perl Dancer, FPW 2010
Perl Dancer, FPW 2010
 
Making environment for_infrastructure_as_code
Making environment for_infrastructure_as_codeMaking environment for_infrastructure_as_code
Making environment for_infrastructure_as_code
 

Viewers also liked

Create Your Own Chatbot with Hubot and CoffeeScript
Create Your Own Chatbot with Hubot and CoffeeScriptCreate Your Own Chatbot with Hubot and CoffeeScript
Create Your Own Chatbot with Hubot and CoffeeScript
Rob Scaduto
 
ChatOps meetup: les humains parlent aux robots
ChatOps meetup: les humains parlent aux robotsChatOps meetup: les humains parlent aux robots
ChatOps meetup: les humains parlent aux robots
Olivier Jacques
 
도커의 기초 - 김상필 솔루션즈 아키텍트 :: AWS Container Day
도커의 기초 - 김상필 솔루션즈 아키텍트 :: AWS Container Day도커의 기초 - 김상필 솔루션즈 아키텍트 :: AWS Container Day
도커의 기초 - 김상필 솔루션즈 아키텍트 :: AWS Container Day
Amazon Web Services Korea
 
When Splunk meets Slack
When Splunk meets SlackWhen Splunk meets Slack
When Splunk meets Slack
Bertrand Marron
 
Let's talk ChatOps - Hubot with less CoffeeScript
Let's talk ChatOps - Hubot with less CoffeeScriptLet's talk ChatOps - Hubot with less CoffeeScript
Let's talk ChatOps - Hubot with less CoffeeScript
SarahKowalik
 
Introduction to hubot
Introduction to hubotIntroduction to hubot
Introduction to hubot
Tencent
 
Embrace chatops, stop installing deployment software - Laracon EU 2016
Embrace chatops, stop installing deployment software - Laracon EU 2016Embrace chatops, stop installing deployment software - Laracon EU 2016
Embrace chatops, stop installing deployment software - Laracon EU 2016
Geshan Manandhar
 
ChatOps
ChatOpsChatOps
ChatOps with Hubot
ChatOps with HubotChatOps with Hubot
ChatOps with Hubot
Yoshiaki Yoshida
 
Chat ops .. a beginner's guide
Chat ops .. a beginner's guideChat ops .. a beginner's guide
Chat ops .. a beginner's guide
Jason Hand
 
aws/docker/rails를 활용한 시스템 구축/운용 - docker편
aws/docker/rails를 활용한 시스템 구축/운용 - docker편aws/docker/rails를 활용한 시스템 구축/운용 - docker편
aws/docker/rails를 활용한 시스템 구축/운용 - docker편negabaro
 
Gaming on AWS - 6. AWS 환경에서의 유연하고 신속한 코드 관리 및 배포
Gaming on AWS - 6. AWS 환경에서의 유연하고 신속한 코드 관리 및 배포Gaming on AWS - 6. AWS 환경에서의 유연하고 신속한 코드 관리 및 배포
Gaming on AWS - 6. AWS 환경에서의 유연하고 신속한 코드 관리 및 배포
Amazon Web Services Korea
 
今日から始める人工知能 × 機械学習 Meetup ライトニングトーク1
今日から始める人工知能 × 機械学習 Meetup ライトニングトーク1今日から始める人工知能 × 機械学習 Meetup ライトニングトーク1
今日から始める人工知能 × 機械学習 Meetup ライトニングトーク1
Nguyen Tuan
 
Landset 8 的雲層去除技巧實作
Landset 8 的雲層去除技巧實作Landset 8 的雲層去除技巧實作
Landset 8 的雲層去除技巧實作
鈵斯 倪
 
小魯蛇與他快樂的夥伴
小魯蛇與他快樂的夥伴小魯蛇與他快樂的夥伴
小魯蛇與他快樂的夥伴
鈵斯 倪
 
合同勉強会20160821
合同勉強会20160821合同勉強会20160821
合同勉強会20160821
Nguyen Tuan
 
AWS를 활용한 첫 빅데이터 프로젝트 시작하기(김일호)- AWS 웨비나 시리즈 2015
AWS를 활용한 첫 빅데이터 프로젝트 시작하기(김일호)- AWS 웨비나 시리즈 2015AWS를 활용한 첫 빅데이터 프로젝트 시작하기(김일호)- AWS 웨비나 시리즈 2015
AWS를 활용한 첫 빅데이터 프로젝트 시작하기(김일호)- AWS 웨비나 시리즈 2015
Amazon Web Services Korea
 
20150419_pbtech_openstack_nyah #pbtech
20150419_pbtech_openstack_nyah #pbtech20150419_pbtech_openstack_nyah #pbtech
20150419_pbtech_openstack_nyah #pbtech
ume3_
 
LINE Bot 作ってみた
LINE Bot 作ってみたLINE Bot 作ってみた
LINE Bot 作ってみた
Masahiko Yoshikawa
 
ChatOps@研究室
ChatOps@研究室ChatOps@研究室
ChatOps@研究室
Akihiko Horiuchi
 

Viewers also liked (20)

Create Your Own Chatbot with Hubot and CoffeeScript
Create Your Own Chatbot with Hubot and CoffeeScriptCreate Your Own Chatbot with Hubot and CoffeeScript
Create Your Own Chatbot with Hubot and CoffeeScript
 
ChatOps meetup: les humains parlent aux robots
ChatOps meetup: les humains parlent aux robotsChatOps meetup: les humains parlent aux robots
ChatOps meetup: les humains parlent aux robots
 
도커의 기초 - 김상필 솔루션즈 아키텍트 :: AWS Container Day
도커의 기초 - 김상필 솔루션즈 아키텍트 :: AWS Container Day도커의 기초 - 김상필 솔루션즈 아키텍트 :: AWS Container Day
도커의 기초 - 김상필 솔루션즈 아키텍트 :: AWS Container Day
 
When Splunk meets Slack
When Splunk meets SlackWhen Splunk meets Slack
When Splunk meets Slack
 
Let's talk ChatOps - Hubot with less CoffeeScript
Let's talk ChatOps - Hubot with less CoffeeScriptLet's talk ChatOps - Hubot with less CoffeeScript
Let's talk ChatOps - Hubot with less CoffeeScript
 
Introduction to hubot
Introduction to hubotIntroduction to hubot
Introduction to hubot
 
Embrace chatops, stop installing deployment software - Laracon EU 2016
Embrace chatops, stop installing deployment software - Laracon EU 2016Embrace chatops, stop installing deployment software - Laracon EU 2016
Embrace chatops, stop installing deployment software - Laracon EU 2016
 
ChatOps
ChatOpsChatOps
ChatOps
 
ChatOps with Hubot
ChatOps with HubotChatOps with Hubot
ChatOps with Hubot
 
Chat ops .. a beginner's guide
Chat ops .. a beginner's guideChat ops .. a beginner's guide
Chat ops .. a beginner's guide
 
aws/docker/rails를 활용한 시스템 구축/운용 - docker편
aws/docker/rails를 활용한 시스템 구축/운용 - docker편aws/docker/rails를 활용한 시스템 구축/운용 - docker편
aws/docker/rails를 활용한 시스템 구축/운용 - docker편
 
Gaming on AWS - 6. AWS 환경에서의 유연하고 신속한 코드 관리 및 배포
Gaming on AWS - 6. AWS 환경에서의 유연하고 신속한 코드 관리 및 배포Gaming on AWS - 6. AWS 환경에서의 유연하고 신속한 코드 관리 및 배포
Gaming on AWS - 6. AWS 환경에서의 유연하고 신속한 코드 관리 및 배포
 
今日から始める人工知能 × 機械学習 Meetup ライトニングトーク1
今日から始める人工知能 × 機械学習 Meetup ライトニングトーク1今日から始める人工知能 × 機械学習 Meetup ライトニングトーク1
今日から始める人工知能 × 機械学習 Meetup ライトニングトーク1
 
Landset 8 的雲層去除技巧實作
Landset 8 的雲層去除技巧實作Landset 8 的雲層去除技巧實作
Landset 8 的雲層去除技巧實作
 
小魯蛇與他快樂的夥伴
小魯蛇與他快樂的夥伴小魯蛇與他快樂的夥伴
小魯蛇與他快樂的夥伴
 
合同勉強会20160821
合同勉強会20160821合同勉強会20160821
合同勉強会20160821
 
AWS를 활용한 첫 빅데이터 프로젝트 시작하기(김일호)- AWS 웨비나 시리즈 2015
AWS를 활용한 첫 빅데이터 프로젝트 시작하기(김일호)- AWS 웨비나 시리즈 2015AWS를 활용한 첫 빅데이터 프로젝트 시작하기(김일호)- AWS 웨비나 시리즈 2015
AWS를 활용한 첫 빅데이터 프로젝트 시작하기(김일호)- AWS 웨비나 시리즈 2015
 
20150419_pbtech_openstack_nyah #pbtech
20150419_pbtech_openstack_nyah #pbtech20150419_pbtech_openstack_nyah #pbtech
20150419_pbtech_openstack_nyah #pbtech
 
LINE Bot 作ってみた
LINE Bot 作ってみたLINE Bot 作ってみた
LINE Bot 作ってみた
 
ChatOps@研究室
ChatOps@研究室ChatOps@研究室
ChatOps@研究室
 

Similar to How to build a slack-hubot with js

Behat - Drupal South 2018
Behat  - Drupal South 2018Behat  - Drupal South 2018
Behat - Drupal South 2018
Berend de Boer
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntu
kesavan N B
 
Setup Kubernetes with flannel on ubuntu platform
Setup Kubernetes with flannel on ubuntu platformSetup Kubernetes with flannel on ubuntu platform
Setup Kubernetes with flannel on ubuntu platform
Ajeet Singh
 
Installation instructions p8p bb bridge
Installation instructions   p8p bb bridgeInstallation instructions   p8p bb bridge
Installation instructions p8p bb bridgeYuri Grin
 
How to install Open Atrium over LAMP stack
How to install Open Atrium over LAMP stackHow to install Open Atrium over LAMP stack
How to install Open Atrium over LAMP stack
cercer
 
Bettercap
BettercapBettercap
Learning Puppet Chapter 1
Learning Puppet Chapter 1Learning Puppet Chapter 1
Learning Puppet Chapter 1
Vishal Biyani
 
Dexterity in 15 minutes or less
Dexterity in 15 minutes or lessDexterity in 15 minutes or less
Dexterity in 15 minutes or less
rijk.stofberg
 
WordPress modern development
WordPress modern developmentWordPress modern development
WordPress modern development
Roman Veselý
 
OpenWhisk by Example - Auto Retweeting Example in Python
OpenWhisk by Example - Auto Retweeting Example in PythonOpenWhisk by Example - Auto Retweeting Example in Python
OpenWhisk by Example - Auto Retweeting Example in Python
CodeOps Technologies LLP
 
Intro to Github Actions @likecoin
Intro to Github Actions @likecoinIntro to Github Actions @likecoin
Intro to Github Actions @likecoin
William Chong
 
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSHTame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
David Stockton
 
Install laravel on openshift
Install laravel on openshiftInstall laravel on openshift
Install laravel on openshift
Samy Saad
 
Drupal theming training
Drupal theming trainingDrupal theming training
Drupal theming trainingdropsolid
 
Creating Openbravo Workspace Widgets
Creating Openbravo Workspace WidgetsCreating Openbravo Workspace Widgets
Creating Openbravo Workspace Widgets
Rob Goris
 
Puppet at GitHub / ChatOps
Puppet at GitHub / ChatOpsPuppet at GitHub / ChatOps
Puppet at GitHub / ChatOps
Puppet
 
Behavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWestBehavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWestJoshua Warren
 
php-and-zend-framework-getting-started
php-and-zend-framework-getting-startedphp-and-zend-framework-getting-started
php-and-zend-framework-getting-startedtutorialsruby
 
php-and-zend-framework-getting-started
php-and-zend-framework-getting-startedphp-and-zend-framework-getting-started
php-and-zend-framework-getting-startedtutorialsruby
 

Similar to How to build a slack-hubot with js (20)

Behat - Drupal South 2018
Behat  - Drupal South 2018Behat  - Drupal South 2018
Behat - Drupal South 2018
 
Setting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntuSetting up the hyperledger composer in ubuntu
Setting up the hyperledger composer in ubuntu
 
Setup Kubernetes with flannel on ubuntu platform
Setup Kubernetes with flannel on ubuntu platformSetup Kubernetes with flannel on ubuntu platform
Setup Kubernetes with flannel on ubuntu platform
 
Installation instructions p8p bb bridge
Installation instructions   p8p bb bridgeInstallation instructions   p8p bb bridge
Installation instructions p8p bb bridge
 
Software Instructions
Software InstructionsSoftware Instructions
Software Instructions
 
How to install Open Atrium over LAMP stack
How to install Open Atrium over LAMP stackHow to install Open Atrium over LAMP stack
How to install Open Atrium over LAMP stack
 
Bettercap
BettercapBettercap
Bettercap
 
Learning Puppet Chapter 1
Learning Puppet Chapter 1Learning Puppet Chapter 1
Learning Puppet Chapter 1
 
Dexterity in 15 minutes or less
Dexterity in 15 minutes or lessDexterity in 15 minutes or less
Dexterity in 15 minutes or less
 
WordPress modern development
WordPress modern developmentWordPress modern development
WordPress modern development
 
OpenWhisk by Example - Auto Retweeting Example in Python
OpenWhisk by Example - Auto Retweeting Example in PythonOpenWhisk by Example - Auto Retweeting Example in Python
OpenWhisk by Example - Auto Retweeting Example in Python
 
Intro to Github Actions @likecoin
Intro to Github Actions @likecoinIntro to Github Actions @likecoin
Intro to Github Actions @likecoin
 
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSHTame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
Tame Your Build And Deployment Process With Hudson, PHPUnit, and SSH
 
Install laravel on openshift
Install laravel on openshiftInstall laravel on openshift
Install laravel on openshift
 
Drupal theming training
Drupal theming trainingDrupal theming training
Drupal theming training
 
Creating Openbravo Workspace Widgets
Creating Openbravo Workspace WidgetsCreating Openbravo Workspace Widgets
Creating Openbravo Workspace Widgets
 
Puppet at GitHub / ChatOps
Puppet at GitHub / ChatOpsPuppet at GitHub / ChatOps
Puppet at GitHub / ChatOps
 
Behavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWestBehavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWest
 
php-and-zend-framework-getting-started
php-and-zend-framework-getting-startedphp-and-zend-framework-getting-started
php-and-zend-framework-getting-started
 
php-and-zend-framework-getting-started
php-and-zend-framework-getting-startedphp-and-zend-framework-getting-started
php-and-zend-framework-getting-started
 

More from Juneyoung Oh

Docker introduction for the beginners
Docker introduction for the beginnersDocker introduction for the beginners
Docker introduction for the beginners
Juneyoung Oh
 
Docker 사내교육 자료
Docker 사내교육 자료Docker 사내교육 자료
Docker 사내교육 자료
Juneyoung Oh
 
휴봇-슬랙 OSX 설치
휴봇-슬랙 OSX 설치휴봇-슬랙 OSX 설치
휴봇-슬랙 OSX 설치
Juneyoung Oh
 
Github 의 release 기능
Github 의 release 기능Github 의 release 기능
Github 의 release 기능
Juneyoung Oh
 
Html5 canvas6 week6n7n8
Html5 canvas6 week6n7n8Html5 canvas6 week6n7n8
Html5 canvas6 week6n7n8
Juneyoung Oh
 
Html5 canvas study week1n2
Html5 canvas study week1n2Html5 canvas study week1n2
Html5 canvas study week1n2
Juneyoung Oh
 
Tizen installation guide for OSX
Tizen installation guide for OSXTizen installation guide for OSX
Tizen installation guide for OSX
Juneyoung Oh
 

More from Juneyoung Oh (7)

Docker introduction for the beginners
Docker introduction for the beginnersDocker introduction for the beginners
Docker introduction for the beginners
 
Docker 사내교육 자료
Docker 사내교육 자료Docker 사내교육 자료
Docker 사내교육 자료
 
휴봇-슬랙 OSX 설치
휴봇-슬랙 OSX 설치휴봇-슬랙 OSX 설치
휴봇-슬랙 OSX 설치
 
Github 의 release 기능
Github 의 release 기능Github 의 release 기능
Github 의 release 기능
 
Html5 canvas6 week6n7n8
Html5 canvas6 week6n7n8Html5 canvas6 week6n7n8
Html5 canvas6 week6n7n8
 
Html5 canvas study week1n2
Html5 canvas study week1n2Html5 canvas study week1n2
Html5 canvas study week1n2
 
Tizen installation guide for OSX
Tizen installation guide for OSXTizen installation guide for OSX
Tizen installation guide for OSX
 

Recently uploaded

Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
Kamal Acharya
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
Pipe Restoration Solutions
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
Robbie Edward Sayers
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
fxintegritypublishin
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
Divya Somashekar
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
Osamah Alsalih
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
DuvanRamosGarzon1
 

Recently uploaded (20)

Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
 
The Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdfThe Benefits and Techniques of Trenchless Pipe Repair.pdf
The Benefits and Techniques of Trenchless Pipe Repair.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
HYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generationHYDROPOWER - Hydroelectric power generation
HYDROPOWER - Hydroelectric power generation
 
Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdfHybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
Hybrid optimization of pumped hydro system and solar- Engr. Abdul-Azeez.pdf
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
block diagram and signal flow graph representation
block diagram and signal flow graph representationblock diagram and signal flow graph representation
block diagram and signal flow graph representation
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
MCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdfMCQ Soil mechanics questions (Soil shear strength).pdf
MCQ Soil mechanics questions (Soil shear strength).pdf
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSETECHNICAL TRAINING MANUAL   GENERAL FAMILIARIZATION COURSE
TECHNICAL TRAINING MANUAL GENERAL FAMILIARIZATION COURSE
 

How to build a slack-hubot with js

  • 1. Hubot scripting in Slack Juneyoung Oh I-ON Communications 2015.08.01
  • 2. Index of Contents Purpose of this Presentation Install Hubot on OSX Invite Hubot in Slack room Writing custom script for Hubot (js) Tips from personal experiences CAUTION : I will do all this on OSX with Slack, Heroku.
  • 3. Purpose of this presentation This presentation for you : - Want to make fun bot in your slack community - Who knows little about javascript - Want to try something fun with js, but do not want to much time on it This presentation NOT for you : - Hardcore programmer who ought know everything running in background - Who never heard of javascript (I am not going to talk about js basic :<) - Want to write custom script for Hubot in coffee script. (There are many examples for coffee on web, so go for it :D)
  • 4. Installing Hubot on OSX CAUTION : Things NOT going to mention in here, but you need to prepare for further steps. - Install node.js on your system - Install nvm (node version mananger) on your system Official Hubot installation guide can be found here : https://hubot.github.com/docs/ This link could be more accurate but I am going to talk about errors I have met while following those steps.
  • 5. Installing Hubot on OSX First, Install `hubot-generator` with `yo`. Could get following errors. it just need some authority on your system. Fix this with `sudo` command like :
  • 6. Installing Hubot on OSX Now, make a directory for the bot Move into project directory Calling hubot! You could see following on your screen
  • 7. Installing Hubot on OSX In Terminal, you should fill some fields to proceed. [ Fields list ] - Owner : Bot Owner name, nothing special. - Bot name : Going to use this name to call this bot. i.e. If your bot name is ‘testbot’, than `testbot what is your name?` - Description : Nothing special. - Adapter : Adapters which could use this bot. default is ‘campfire’. However, you can change this anytime by editing a file named ‘Procfile’ This are sample which I wrote for this presentation :D
  • 8. Installing Hubot on OSX Now, talk about directories & Files. Can check with `ls` command. It should shows like follow :D [File List] - Procfile : can edit ‘Adapter’ options here. - external-scripts.js : Additional hubot script. User Custom Script Name can be found here. - READ.md : This file for git. If you using a service like ‘github’, This document will be shows at first. - hubot-scripts.json : Additional hubot script. But these are specific. Details could be found : https://www.npmjs.com/browse/keyword/hubot-scripts - scripts(d) : Put your custom script this directory. To use this script, you have to specify the name on external-script.js - bin(d) : A directory which has hubot execution file.
  • 9. Installing Hubot on OSX Let’s run this :D For now, a prompt is all. However still hubot can do serveral commands. Type following command. remember, this space for your ‘Botname’. Simple command sample for you. Now, Let’s connect this with Slack!
  • 10. Invite Hubot in Slack room Let’s make this bot work in slack :D Before start … - I assume that you already have a slack account - I assume that you already install heroku tool-belt. - Official tutorial can be found : https://github.com/slackhq/hubot-slack 1. Let the bot knows our adapter is ‘slack’. Go to hubot project folder, and open this with `vi` command. It looks like this. We need to edit this file. so press ‘a’ or ‘I’ key to switch to ‘insert mode’. check the left bottom of terminal and you will see…
  • 11. Invite Hubot in Slack room 2. Replace that line with follow. If you want to keep the original one, add ‘#’ to the front of the line, so computer consider that as a comment, not a command. Than, press ‘esc’ key to manage mode and type ‘:wq’. ‘w’ means ‘write’ and ‘q’ means ‘quit’. TIPS. In normal mode type ‘:set nu’. now, vi shows line number for you. This function is quite useful when handling long script.
  • 12. Invite Hubot in Slack room 3. Deploy this to Heroku. For further information for Heroku, visit the link : http://www.heroku.com You will get following as result. As you can see in the last line, Heroku internally uses git. So our further jobs should upload and synchronized with that git URL. In this case, https://git.heroku.com/testbotapp.git is my heroku git address.
  • 13. Invite Hubot in Slack room 4. Install Heroku redistogo addon. Hubot uses redis DB as its brain, so need to install this to Heroku.(do not need to install redis on your local.) heroku addons:create (addon name) –app (your app name in Heroku) green : Heroku command. orange : variables purple : which could be skipped (If you have bunch of Heroku apps like me, need to point specific target application) * You need to register ACCOUNT INFORMATION to use heroku addons, even though it is free. It is necessary.
  • 14. Invite Hubot in Slack room 5-1. Add configurations to Heroku. To service Slack, it needs to know HEROKU URL and HEROKU_SLACK_TOKEN. Let’s add. Go to below URL: https://{your room}.slack.com/services/new/hubot After input your bot’s name, get TOKEN from the page.(It is on the top of the page. Can not be missed)
  • 15. Invite Hubot in Slack room 5-2. Add configurations to Heroku. Add information from the Terminal. HEROKU_URL can be found heroku.com page. In [Setting] tab, middle of the page [info] section.
  • 16. Invite Hubot in Slack room 6. Run your bot and meet it in your Slack. First, need to push our code to heroku. Than, run it! If you already have other heroku app, need to some extra process. Move to top folder of your Project. Than type follow before push. Now run our bot. As a result, can find bot in slack. See [DIRECT MESSAGES] section.
  • 17. Writing custom bot script (js) This pages for custom hubot scripting for javascript, NOT coffee script. Basic : Write custom script under ‘scripts’ folder .
  • 18. Writing custom bot script (js) After, writing script. Edit ‘hubot-scripts.json’ in top folder. Add your script name without extension. Left side is my folder structure, and right is contents of hubot-scripts.json.
  • 19. Writing custom bot script (js) Finally, use ‘add’, ‘commit’ and ‘push’ command. Than, ‘heroku open’. And go to slack, what you can see …
  • 20. Tips from personal exp Tips from my experiences. 1. Checking heroku logs. This will be quite useful, since there are no scripting guides for javascript. By doing this, can find more information about internal object like message, robot or adapter. 2. Could not use DOM Elements. Hubot script can not use ‘document’ Object. (XMLHttpRequest Object also could not found).
  • 21. Tips from personal exp Tips from my experiences. 3. Use ajax with internal API. For instance, it looks like… 4. In slack, some of APIs are forbidden to bot. i.e. kick API can not be called by a bot. For more information, refer following URL : https://api.slack.com/methods
  • 22. Tips from personal exp Tips from my experiences. 5. Refer coffee script codes. There are no documents for javascript. So if you use js, you have to look what original structure(coffee) is. Refer ‘src’ directory of hubot github. URL : https://github.com/github/hubot/tree/master/src Just like coffee, some objects will be found in js version. i.e. message, brain, robot, user … Can check if you print those in console and read heroku logs.