OSS ç Redash ãããã Slack Bolt ã§ä½ãç´ãã
Redash ã®ãªã³ãã¬ã® bot ããSlack ã® Bolt ã¨ãããã¬ã¼ã ã¯ã¼ã¯ã使ã£ã¦ä½ãç´ãã¾ããã
Redash ã¨ã¯
Redash ã¯æ§ã ãªãã¼ã¿ã½ã¼ã¹ã¨æ¥ç¶ã㦠SQL/å¯è¦åã«ä½¿ãã OSS/SaaS ã§ããæè¿ãDatabricks ã«è²·åããããã¨ã§è©±é¡ã«ããªãã¾ããã
Redash æ¬ä½ã¯ OSS ã§å ¬éããã¦ãã¾ãããSlack ãããã«é¢ãã¦ã¯ OSS ã§ã¯ããã¾ãã(OSS ã§ãªããã®ãå ¬å¼æä¾ããã¦ã)ããã®ãããRedash æ¬ä½ã¯ãªã³ãã¬(ã¯ã©ã¦ã)ã«ãããã¤ã§ããã«ãé¢ãããããããããªã³ãã¬ã«ç½®ããªãã¨ãã課é¡ãããã¾ããããã®ãããã®èª²é¡æã¯ããããã®ãã©ã¼ã¯å ã§ãããhakoberaããã®Qiitaãã覧ãã ããã
ã¾ããOSS ç Redash ãéç¨ãã工夫ã¯ãã¡ãã«è¨è¼ãã¦ãã¾ããä»åã®ãªãªã¼ã¹ã«ä¼´ããJXé信社㮠Slack ã«ãã¤ã³ã¹ãã¼ã«ãã¦ãã¾ãã
Slack ã® Bolt ã¨ã¯
Slack ã® Bolt ã¯ãããã®ããã®ãã¬ã¼ã ã¯ã¼ã¯ã§ãã¨ã¦ãçç£æ§é«ãæ¸ãã¾ããã¾ããPython çãæè¿ Î± çããªãªã¼ã¹ããã¾ããã
ãã¦ãSlack ã® bot ã¯ããã¨ã㨠RTM (Real Time Messaging)ã¨å¼ã°ãããWebsocket ãã¼ã¹ã®ã¢ã¼ããã¯ãã£ã§ããããããæ°ãã Slack ã®ã¢ããªã§ã¯ãEvents API ã¨ãã Webhook(HTTP) ãã¼ã¹ã®æ°ãã bot ãä½ãå¿ è¦ãããã¾ããããã¯ã¢ã¼ããã¯ãã£çã«å¾è¿°ããå®å®æ§ãªã©ã®ã¡ãªãããããã¾ãã
使ãæ¹
詳ãã㯠README ãèªãã§ãã ãããDocker ã使ãå ´å㯠docker run yamitzky/redashbot:2.0.0
ã§ä½¿ãã¾ã
æ¸ãç´ããçç±
ã³ã¼ããæ¸ãç´ãããã¨ã«ããã次ã®ã¡ãªãããçã¾ãã¾ããã
- RTM API ãã Events API ã¸ç§»è¡ãããã¨ã§ãå®å®æ§ãå¢å ãã
- HTTP ã§ãã¼ããã©ã³ãµã¼ã«ã¶ãä¸ããã°ããã®ã§è² è·åæ£ãããã
- Websocket ã«æ¯ã¹ããã«ã¹ãã§ãã¯ããããã
- TypeScript ã¸ç§»è¡
- ã½ã¼ã¹ã³ã¼ããåå²ãããããªã£ã
ç¹ã«ãåã®ãã©ã¼ã¯ãããã¼ã¸ã§ã³ã§ã¯ããã·ã¥ãã¼ããè¦ãããªã©ã®è¿½å æ©è½ããã£ããããã½ã¼ã¹ã³ã¼ããå°çã§ãã(ã½ã¼ã¹)ã
ã¾ããå°å³ã«æ¬¡ã®ãããªå¤æ´ããã¦ãã¾ã
- ããã©ã«ããã©ã³ãã master ã§ã¯ãªã main ã«
- Chromium 以å¤ã«ãFirefox ã Webkit ã®ãµãã¼ã (playwright ãå©ç¨ããã¹ãã§ãã¦ãªã)
- Serverless ç°å¢ã¸ã®ããã㤠(éä¸...誰ããã¹ããã¦...)
playwright 㯠Microsoft ããåºã¦ãã Puppeteer ã®å¾ç¶ããã±ã¼ã¸ã¿ãããªæãã§ããã«ããã©ã¦ã¶ã§ã® Puppeteer ç¸å½ã®ãã¨ãã§ãã¾ããã¾ããå ¬å¼ã§ Docker ã¤ã¡ã¼ã¸ãæä¾ããã¦ããã®ã§ãDocker åãç°¡åã§ããã(æååã対ç㧠fonts-noto ã ãã¤ã³ã¹ãã¼ã«ãã)
ã§ãããã¨
å ¬å¼ã®ãããã使ã£ã¦ãªãã®ã§ããããªãã§ããã
- ã°ã©ãã®ãã£ãã㣠(ããã¯å½ããåã§ããï¼)
- ããã·ã¥ãã¼ãã®ãã£ããã£
- 表ãã¼ã¿ãããã£ããã£ã§ã¯ãªãããã©ã¼ããããã表ããã¹ãã¨ãã¦æ稿ãã
ãªã©ãã§ãã¾ããã¾ã Bolt ã§ä½ããã¦ãã OSS ãªã®ã§ãæ©è½è¿½å ãç°¡åãã¨æãã¾ãããã£ãããªã®ã§ã対話æ©è½ã¨ãã使ãããªããããããããªãã
@bot <URL>
ã¨ãã£ãå½¢å¼ã§ä½¿ãã®ã§ããã¡ãã Slack ã®ãªãã¤ã³ãã¼ã¨çµã¿åããã¦ä½¿ããã¨ãã§ãã¾ããä¾: /remind #hoge @redash https://your-redash-url/dashboards/fuga
*1
*1:ãªãã¤ã³ãã¼ã®å¯¾å¿ã«ã¤ãã¦ã¯ãå ¬å¼ã® directMention ã ã¨å é ä¸è´ã¨ãªã£ã¦ãããããç¾å¨ã¯ç¬èªå®è£ ãã¦ãã¾ãããã¡ãã®ã¹ã¬ããã§è©±ãã¦ãã¾ã