Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Errbotで得られる、ChatOps入門
Search
attakei
September 06, 2017
Programming
1.4k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Errbotで得られる、ChatOps入門
PyconJP Reject Conference 2017 (
https://techplay.jp/event/630686
) で発表したスライドです
attakei
September 06, 2017
More Decks by attakei
See All by attakei
Sphinxを通して考える、「拡張」の仕方 / First approach for development sphinx extension
attakei
2
5.1k
PyPIデビュー手前の人のための地下活動手法 -PyPICloudを使ったプライベートレジストリの構築- / Using PyPICloud as private registry for pre-debut to PyPI
attakei
1
670
「〇〇のプラグインを作る」ことのすゝめ / Let's develop plugins
attakei
0
1.3k
プレゼン?それもSphinxで出来るよ -ドキュメントツールSphinxのちょっと変わった利用法- / You can presentation too by Sphinx!
attakei
1
1.6k
Cloud RunとFastAPIで、ChatBotをミニマムスタートしよう / Getting start ChatBot with FastAPI and Cloud RUN
attakei
0
3.3k
Web制作において、プレビューにあえてCloudRun(とFirebase)を使う / Using Cloud Run (and Firebase) as preview environment of HTML in web development
attakei
0
1.5k
Ansibleを通じて「べき等性」を 理解してみよう / Try understanding idempotency by Ansible
attakei
1
1.5k
素材の良さを活かしつつ、reST をReveal.jsに変換してみる話 / Converting pure reST to Revealjs
attakei
0
570
Eelで作ってみる WHOISアプリと スライド
attakei
0
1.1k
Other Decks in Programming
See All in Programming
AHC070解法紹介
eijirou
0
120
SREの越境 / SRE Collaboration
y0hgi
1
190
The Good Stuff, Not the Slop: Engineering High-Quality Android Apps with Modern AI Tooling
danybony
1
250
JPUG勉強会 OSSデータベースの内部構造を理解しよう(第2回)
oga5
0
230
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
170
XHTMLが残したもの
yosuke_furukawa
PRO
2
800
kubernetes コンポーネント開発入門 / 新卒N年目の勉強会&交流会!〜〇〇への誘い〜 #n_study
mazrean
0
240
速く作れる。その次は、速く確かめられる開発へ 〜AIネイティブ開発を支える、Shift Down〜 / Can build fast. Next, moving to development where we can verify fast.
rkaga
4
3k
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
140
巨大モノリシックアプリ モダン化大作戦
ktcryomm
1
1k
A2UI for Android: Safely Rendering AI-Generated UI with Jetpack Compose - DroidKaigi 2026
itsmedreamwalker
0
140
Building an Out-of-Order CPU
latte72
1
780
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
500
Prompt Engineering for Job Search
mfonobong
0
450
Claude Code のすすめ
schroneko
67
230k
The untapped power of vector embeddings
frankvandijk
2
1.9k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
240
Building a Scalable Design System with Sketch
lauravandoore
464
34k
Git: the NoSQL Database
bkeepers
PRO
432
67k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
300
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
540
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
540
Transcript
Errbotによって得られる、 ChatOpsライフ入門 PyconJP Reject Conference 2017 株式会社ニジボックス 武居和也
Agenda l自己紹介 l【PR】ニジボックスについて lChatBotとChatOps lErrbotについて lErrbotの始め方 lcommandを作る l便利な機能を知る
> 自己紹介 lKazuya Takei l株式会社ニジボックス lインフラ関係 l事業外全般 lエンジニアに啓蒙する系 l@attakei lTwitter/GitLab/GitHub/Qiita
l技術的に面白そうなら、雑に手を出すタイプ
> 【PR】ニジボックスについて lNIJIBOX Co., Ltd. lhttps://nijibox.jp lリクルートグループ発の新規事業開発会社 lやってること l新規事業開発の支援 lO2Oキャンペーン受託
l自社サービス/パッケージ l レシポ l Biztom
> 雑) ChatBot と ChatOps ChatBot = Chat + Bot
Øチャット(Chat)サービスのインターフェースを介して 自動で動作するプログラム(Bot) ⦁ 自然対話が主目的 ⦁ ChatOpsが主目的 ChatOps = Chat + Ops Øチャット(Chat)サービスをベースに システム運用(Ops)をしていくこと
Errbotについて
> Errbotについて lPython製のChatBotフレームワーク lhttp://errbot.io/ lhttps://github.com/errbotio/errbot lhubot, rubotyなどが類似ライブラリ lバージョン: 5.1.2 (2017/09/06現在)
l現行バージョンはPython3.3以降のみ対応 lプラグイン方式
> Errbotについて (2) Backend plugin Storage plugins User plugins
> Backend plugins <Built in> •Slack •HipChat •Telegram •XMPP •IRC
•Text •Local GUI <Community> •Gitter •Skype •Discord •Mattermost •Cisco Spark
> Storage plugins <Built in or Official> •Shelf •SQL •Google
Cloud Datastore <Community> •Redis •RethinkDB
Errbotの始め方
Errbotの始め方 (1) 最速で始める $ mkdir mybot $ pip install errbot
$ errbot --init $ sed -i -e 's/CHANGE ME/@you/g' config.py $ errbot -T
Errbotの始め方 (2) 構造 + config.py | + data/ | +
plugins/ + err-example/ + example.plug + example.py <-- 設定ファイル <-- 永続データやらなんやら <-- プラグインの置き場その1
Errbotの始め方 (3) l.plugファイルには、プラグインの情報を記述 lErrbot上の名前と使用するモジュール lhelpコマンド時の説明 [Core] Name = Example Module
= example [Documentation] Description = This is a simple plugin
Errbotの始め方 (ex) lGitリポジトリに.plugと対応する.pyファイルが有る なら、reposコマンドでcloneからのプラグインインス トールが可能
commandを 作ってみる
> Errbotのcommand Errbotのコマンドは、デコレータで定義 l@botcmd l@arg_botcmd l@re_botcmd これらを知ってれば、プラグインを作れる
> @botcmd botcmdがBotPluginのメソッドを勝手にcommandと みなす 最終的に何か返せばOKなので、 出来ることの制限は(ほぼ)無い class Example(BotPlugin): @botcmd def
hello(self, msg, args): return 'Hello {}!'.format(msg.frm) >>> !hello Hello you!
> @botcmd メソッド名に _ (アンダースコア)があると、 勝手に半角スペース扱い lcloudfront_create -> cloudfront create
lcloudfront_invalidate -> cloudfront invalidate https://github.com/attakei/errbot-cloudfront/ サブコマンドっぽい!
> @arg_botcmd argparseライクな記述で、commandに引数を指定 することが可能 class Route53(BotPlugin): @arg_botcmd('zone', type=str) def route53_create(self,
msg, zone): # Expression return 'Now creating'
> template Jinja2が利用可能 import boto3 class Route53(BotPlugin): @botcmd(template='route53_list') def route53_list(self,
msg, zone): client = boto3.client('route53') result = client.list_hosted_zones() return {'zones': result['HostedZones']} **List of zones** {% for zone in zones %} - {{ zone.Id }}: {{ zone.Name }} {% endfor %}
> schedule 「定期的に◦ ◦ をさせる」「10分後に◦◦させる」 をやりたいときに from errbot import BotPlugin,
botcmd, arg_botcmd import demo class Example(BotPlugin): @arg_botcmd('min', type=int) def noodle_timer(self, msg, min): self.start_poller(min * 60, self.finished, (msg.frm, min,)) return 'Start {} mins'.format(min) def finished(self, frm, min): self.send(frm, 'Finished') self.stop_poller(self.finished, (frm, min,))
> extra lWebhook lFlow ※今回はスキップ
> Repositories lhttps://github.com/errbotio/errbot lhttps://github.com/attakei/errbot-route53 lhttps://github.com/attakei/errbot-cloudfront lhttps://github.com/attakei/ lhttps://gist.github.com/attakei/6d43b8733d891b9 8a9b6a3bcf9b902a3
ご清聴、ありがとうございました 日本でErrbotユーザーが増えることを願いつつ