fpga中的slack
by Rick Mak
麥瑞克(Rick Mak)
是否想減少部署過程的恐怖程度? 在Slack中構建ChatOps。 (Want to make the deployment process less scary? Build ChatOps in Slack.)
In a company that makes mobile and web products, developers shouldn’t be the only ones who can launch the latest version of an app. You need proper testing beyond getting colleagues to give ad hoc feedback by clicking through the app. At Oursky, our QA built an automatic testing pipeline. But testing needs to be coordinated and the report needs to go to the relevant people. The QA team needs to know when to test the latest version of the app. The PM needs to check the latest progress. And the designer needs to support and fine-tune the details. While building command line tools is the obvious go-to for developers, we wanted to find a tool that everyone in the company uses. We created our deployment ChatOp on Slack. Read on to see how you can do it with your chat service. You can automate your deployment, which saves everyone time and reduces coordination errors (Campfire, Hipchat, and Flowdock are also supported). We’ve been using ChatOps in 15+ simultaneous projects within our team.
在生產移動和Web產品的公司中,開發人員不應該是唯一能夠啟動應用程序最新版本的人。 您不但需要適當的測試,還需要使同事通過單擊應用程序提供臨時反饋。 在Oursky ,我們的質量檢查人員建立了自動測試管道 。 但是測試需要協調,報告需要交給相關人員。 質量檢查團隊需要知道何時測試該應用程序的最新版本。 PM需要檢查最新進度。 設計人員需要支持和微調細節。 盡管開發人員顯然很喜歡構建命令行工具,但我們希望找到公司中每個人都可以使用的工具。 我們在Slack上創建了部署ChatOp。 繼續閱讀以了解如何使用您的聊天服務。 您可以自動化您的部署,這可以節省每個人的時間并減少協調錯誤 (還支持Campfire , Hipchat和Flowdock )。 我們已經在團隊中的15個以上同步項目中使用了ChatOps。
ChatOps is a great way to make the deployment procedure less complex, less black-boxed, and less scary. I adapted GitHub’s use of ChatOps for our deployment with Slack. GitHub’s open source chatbot (Hubot) does automating deployment, graphing, monitoring, provisioning, tweeting, and many other things. GitHub even created MySQL database back-up jobs so they can do important operations without leaving the chatroom with a set of instructions.
ChatOps是使部署過程變得更簡單,更少黑框和更少恐懼的好方法。 我在Slack的部署中調整了GitHub對ChatOps的使用。 GitHub的開源聊天機器人( Hubot )確實實現了部署,制圖,監視,配置,推文和許多其他事情的自動化。 GitHub甚至創建了MySQL數據庫備份作業,這樣他們就可以進行重要的操作,而無需離開聊天室并獲得一組指令。
ChatOps部署的概況 (The big picture of ChatOps deployment)
ChatOps simplifies deployment with automation: it removes manual coordination errors, and allows everyone in a project to jump in. It also encourages open communication so team members don’t have to interrupt each other for updates or documentation. They can access information whenever they need it.
ChatOps通過自動化簡化了部署:它消除了手動協調錯誤,并允許項目中的每個人參與其中。它還鼓勵開放式交流,因此團隊成員不必為了更新或文檔而互相打擾。 他們可以在需要時訪問信息。
So how does it work and how do you set it up?
那么它是如何工作的以及如何設置呢?
This graph shows how deployment interactions would work via Github.
該圖顯示了如何通過Github進行部署交互。
Our company implemented a similar version using open Slack channels for all our operations. Each project has its own channel. We introduced two Slack botsk, Chima and Faseng, to assist the deployment process. (Chima and Faseng are the names of our resident office cats.) The core idea is summarized in this sentence:
我們公司使用開放的Slack渠道為我們的所有業務實施了類似的版本。 每個項目都有自己的渠道。 我們引入了兩個Slack僵尸程序Chima和Faseng來協助部署過程。 ( Chima和Faseng是我們常駐辦公室貓的名字。) 核心思想總結如下:
Tell Chima(CEO), to make Faseng(CTO) deploy.
Tell Chima (CEO), to make Faseng (CTO) deploy.
機器人的角色:創建和執行 (Roles of the bots: Creating & executing)
For each project, we set up respective deployment jobs with Faseng. It’s not only easily to deploy, but deployment notifications make the progress and status of the project clear.
對于每個項目,我們與Faseng一起設置各自的部署作業。 它不僅易于部署,而且部署通知使項目的進度和狀態變得清晰。
創建部署作業(聊天命令機器人) (Creating the deployment job (chat command bot))
Chima is a github/hubot which helps to understand our commands from Slack. For example chima deploy
is a deployment command. We have to configure these settings for each project:
Chima是一個github / hubot ,可幫助您從Slack了解我們的命令。 例如, chima deploy
是一個部署命令。 我們必須為每個項目配置以下設置:
Specify a deployment
provider
such as Fabric, Capistrano, Heroku, or any Ruby Rescue task指定部署
provider
例如Fabric , Capistrano , Heroku或任何Ruby Rescue任務Whether to support
auto_merge
for the target branch for deployment是否為部署的目標分支支持
auto_merge
The
repository
name of the project項目的
repository
名稱- Available environments of the deployment 部署的可用環境
Only channel members in the
allowed_rooms
list can create the deployment只有
allowed_rooms
列表中的頻道成員才能創建展開
We put this configuration in the app.json file. Below is an example of how you can configure for project-x
:
我們將此配置放在app.json文件中。 以下是如何為project-x
配置的示例:
{ "project-x": { "provider": "fabric", "auto_merge": false, "repository": "oursky/project-x", "environments": ["live", "edge"], "allowed_rooms": ["deployment"] }}
執行部署作業(部署機器人) (Executing the deployment job (deployment bot))
Faseng is an atmos/heaven program. When it receives GitHub webhooks, it will run deployment jobs as background tasks with Resque. There are several supported ways to create deployment jobs, such as:
Faseng是一個atmos / heaven程序。 收到GitHub Webhooks后,它將與Resque作為后臺任務運行部署作業。 有幾種支持的方法來創建部署作業,例如:
Fabric
布
Capistrano
Capistrano
Heroku
Heroku
- Any Ruby rescue task 任何Ruby救援任務
Lita: Written in Ruby
麗塔 :用Ruby寫
Err: Written in Python
錯誤 :用Python編寫
Deployment task creation and completion will send out notifications into the integrated chat services. Campfire, Hipchat, SlackHQ, and Flowdock can receive deployment status event notifications.
部署任務的創建和完成會將通知發送到集成的聊天服務中。 Campfire , Hipchat , SlackHQ和Flowdock可以接收部署狀態事件通知。
我們公司的用例 (Use cases in our company)
1.開發人員使用它來部署到暫存環境 (1. Developers use it to deploy to the staging environment)
Although we planned to use ChatOps to ease the difficulties for non-developers, it also benefits me as a developer. For example, when I want to deploy trellhub/edge
to pandawork,
I can just type chima deploy trelhub/edge to pandawork
and then brew some coffee while I wait. To deploy using a chat command, I have to set up the environment settings at Chima. To make sure the deployment is authorized, I have also provided Faseng the access to the pandawork
server.
盡管我們計劃使用ChatOps緩解非開發人員的困難,但作為開發人員,這也使我受益。 例如,當我想將trellhub/edge
部署到pandawork,
我可以鍵入chima deploy trelhub/edge to pandawork
,然后在等待時沖泡咖啡。 要使用聊天命令進行部署,我必須在Chima處設置環境設置。 為了確保部署得到授權,我還向Faseng提供了對pandawork
服務器的訪問權限。
2.質量檢查人員還可以將最新版本部署到邊緣 (2. QA can also deploy the latest version to the edge)
After each milestone, the QA team is responsible for performing functional tests, usability tests, and performance tests for the pre-deliverable software. In this example, our QA engineer, Joyz, wants to ensure that the latest version of modmod-web
is ready on the edge environment before she runs the tests. She can trigger the deployment and receive notifications as well.
在每個里程碑之后,質量保證團隊將負責對可交付軟件的功能測試,可用性測試和性能測試。 在此示例中,我們的質量檢查工程師Joyz希望確保在運行測試之前在邊緣環境中準備好最新版本的modmod-web
。 她可以觸發部署并接收通知。
3.檢查當前作業 (3. Checking up the current jobs)
To see the current building jobs, everyone who is relevant to the project can talk to Chima and check on the Travis building progress. This one-time initial ChatOps setup has helped our team manage our projects in the following ways:
要查看當前的建筑工作,與該項目相關的每個人都可以與Chima交談并檢查Travis的建筑進度。 一次性的ChatOps初始設置已通過以下方式幫助我們的團隊管理我們的項目:
- Enables less technical members on the team to contribute to the development process. 使團隊中較少的技術人員為開發過程做出貢獻。
- Notifications are pushed to the relevant project channel, which means that every relevant team member receives and can access status updates. 通知被推送到相關的項目通道,這意味著每個相關的團隊成員都可以接收并可以訪問狀態更新。
We are working towards doing more via ChatOps , such as backing up servers and performing automated tests. Look out for future updates or share your tips with us! We’d love to hear from you.
我們正在努力通過ChatOps進行更多工作,例如備份服務器和執行自動化測試 。 尋找未來的更新或與我們分享您的提示! 我們很樂意聽取您的意見。
進一步閱讀 (Further reading)
關于持續集成 (About continuous integration)
Issue 6: Build Tools · Issue Travis CI for iOS
問題6:生成工具·發布iOS的Travis CI
關于部署 (About deployment)
Github Developer — Deployments
Github開發人員-部署
Remote multi-server automation tool — Capistrano
遠程多服務器自動化工具— Capistrano
Python tool for streamlining deployment- Fabric
用于簡化部署的Python工具-Fabric
Footnote: Now, we’ve moved to GitHub trigger deploy.
腳注:現在,我們已移至GitHub觸發器部署。
Building an app? Our free developer tools and open source backend will make your job easier.
建立應用程式? 我們免費的開發人員工具和開源后端將使您的工作更加輕松。
Liked what you read? Give me some claps so more people see this article! Thanks!
喜歡您閱讀的內容嗎? 給我一些鼓掌,讓更多的人看到這篇文章! 謝謝!
翻譯自: https://www.freecodecamp.org/news/want-to-make-the-deployment-process-less-scary-build-chatops-in-slack-b2accc72e2a9/
fpga中的slack