Stackstorm啟動ChatOps

來源:互聯網
上載者:User

如機器上已經運行Hubot執行個體,則可以安裝hubot-stackstorm外掛程式並配置StackStorm環境變數即可。外掛程式地址點擊此處。 否則,啟用StackStorm ChatOps的最簡單方法是使用st2chatops軟體包。

驗證是否安裝了Chatops包,並啟用了通知規則

# 確保chatops包已安裝ls /opt/stackstorm/packs/chatops# 如果未啟用,請建立通知規則st2 rule get chatops.notify || st2 rule create /opt/stackstorm/packs/chatops/rules/notify_hubot.yaml

添加nodejs v6存放庫

curl -sL https://rpm.nodesource.com/setup_6.x | sudo -E bash -
安裝st2chatops包
sudo yum install -y st2chatops
查看並編輯/opt/stackstorm/chatops/st2chatops.env設定檔,將其指向您正在使用的StackStorm安裝和聊天服務。 至少應該產生一個API密鑰並設定ST2_API_KEY變數。 預設情況下,st2api和st2auth應該位於同一主機上。 如果不是這種情況,請更新ST2_API和ST2_AUTH_URL變數,或者僅指向具有ST2_HOSTNAME的正確主機。樣本配置使用Slack。 要進行設定,請轉到Slack Web管理介面,建立一個Bot,然後將身分識別驗證令牌複製到HUBOT_SLACK_TOKEN中。如果您正在使用其他聊天服務,請在st2chatops.env中的聊天服務適配器設定部分下設定相應的環境變數:Slack,HipChat,Yammer,Flowdock,IRC和XMPP。 啟動服務
sudo systemctl start st2chatopssudo systemctl enable st2chatops
重新載入st2包以確保chatops.notify規則登入:
sudo st2ctl reload --register-all

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.