Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
用 Go 語言打造 DevOps Bot
Search
Bo-Yi Wu
April 26, 2017
Technology
0
690
用 Go 語言打造 DevOps Bot
Bo-Yi Wu
April 26, 2017
Tweet
Share
More Decks by Bo-Yi Wu
See All by Bo-Yi Wu
如何設計一套具備 Container 容器化技術的 CI/CD 平台?
appleboy
0
1.2k
生成式 AI CodeGPT 開發經驗談
appleboy
0
2.9k
打造 MLOps 平台 改善 AI 模型開發流程
appleboy
0
2.1k
自動化監控伺服器工具 - Gatus
appleboy
0
3.8k
Drone CI/CD 自動化測試及部署
appleboy
1
480
初探 Infrastructure as Code 工具 Pulumi
appleboy
2
3.5k
Introduction to Open Policy Agent
appleboy
0
1.9k
善用 Go 語言效能測試工具來提升執行效率
appleboy
2
4.3k
用 Go 語言打造多台機器 Scale 架構
appleboy
1
4.6k
Other Decks in Technology
See All in Technology
フォーイット_エンジニア向け会社紹介資料_Forit_Company_Profile.pdf
forit_tech
1
1.7k
JAWS DAYS 2025 アーキテクチャ道場 事前説明会 / JAWS DAYS 2025 briefing document
naospon
0
2.5k
Amazon Aurora のバージョンアップ手法について
smt7174
2
160
実は強い 非ViTな画像認識モデル
tattaka
3
1.3k
生成AI “再”入門 2025年春@WIRED TUESDAY EDITOR'S LOUNGE
kajikent
0
140
どちらかだけじゃもったいないかも? ECSとEKSを適材適所で併用するメリット、運用課題とそれらの対応について
tk3fftk
2
210
役員・マネージャー・著者・エンジニアそれぞれの立場から見たAWS認定資格
nrinetcom
PRO
4
6.4k
【詳説】コンテンツ配信 システムの複数機能 基盤への拡張
hatena
0
280
日経のデータベース事業とElasticsearch
hinatades
PRO
0
250
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
3
530
Pwned Labsのすゝめ
ken5scal
2
470
2/18 Making Security Scale: メルカリが考えるセキュリティ戦略 - Coincheck x LayerX x Mercari
jsonf
0
230
Featured
See All Featured
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.3k
A better future with KSS
kneath
238
17k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
10
520
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
650
A designer walks into a library…
pauljervisheath
205
24k
How to Think Like a Performance Engineer
csswizardry
22
1.4k
Rails Girls Zürich Keynote
gr2m
94
13k
Writing Fast Ruby
sferik
628
61k
The Pragmatic Product Professional
lauravandoore
32
6.4k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
570
Become a Pro
speakerdeck
PRO
26
5.2k
Transcript
Bo-Yi Wu 2017.04.27
聯發科技後端⼯工程師 DevOps Golang, PHP, Node.js 維護數個
Go 開源專案 Gitea Gin Drone Plugin appleboy @github appleboy @twitter appleboy @slideshare appleboy46 @facebook
None
None
5 Develop Git Push Git Tag Develop Git Push
Git Tag Testing Deploy Deploy Deploy Production Staging Production Testing Deploy Staging
None
None
None
None
None
None
None
Jenkins Drone Gitlab CI
None
None
None
⽀支援 Command Line Flag 參數功能 ⽀支援 Bot API
WebHook 功能 ⽀支援 Https for WebHook Tunnel ⽀支援⾃自動更新 https 憑證功能 (Let’s Encrypt) ⽀支援監控 WebHook 服務功能 ⽀支援多種訊息格式 (圖⽚片, 影⽚片, 表情符號 … 等) ⽀支援跨平台編譯執⾏行檔 ⽀支援透過 Docker 發送訊息 ⽀支援⾼高並發 (處理⼤大量發送訊息)
⽀支援 Command Line Flag 參數功能 ⽀支援 Bot API
WebHook 功能 ⽀支援 Https for WebHook Tunnel ⽀支援⾃自動更新 https 憑證功能 (Let’s Encrypt) ⽀支援監控 WebHook 服務功能 ⽀支援多種訊息格式 (圖⽚片, 影⽚片, 表情符號 … 等) ⽀支援跨平台編譯執⾏行檔 ⽀支援透過 Docker 發送訊息 ⽀支援⾼高並發 (處理⼤大量發送訊息)
https://golang.org/pkg/flag/
不⽀支援系統環境變數
⽀支援 Command Line Flag 參數功能 ⽀支援 Bot API
WebHook 功能 ⽀支援 Https for WebHook Tunnel ⽀支援⾃自動更新 https 憑證功能 (Let’s Encrypt) ⽀支援監控 WebHook 服務功能 ⽀支援多種訊息格式 (圖⽚片, 影⽚片, 表情符號 … 等) ⽀支援跨平台編譯執⾏行檔 ⽀支援透過 Docker 發送訊息 ⽀支援⾼高並發 (處理⼤大量發送訊息)
http.NewServeMux()
⽀支援 Command Line Flag 參數功能 ⽀支援 Bot API
WebHook 功能 ⽀支援 Https for WebHook Tunnel ⽀支援⾃自動更新 https 憑證功能 (Let’s Encrypt) ⽀支援監控 WebHook 服務功能 ⽀支援多種訊息格式 (圖⽚片, 影⽚片, 表情符號 … 等) ⽀支援跨平台編譯執⾏行檔 ⽀支援透過 Docker 發送訊息 ⽀支援⾼高並發 (處理⼤大量發送訊息)
firewall
https://ngrok.com/
drone-line –s secret –t token ––tunnel –port 2002 webhook https://localtunnel.github.io/www/
⽀支援 Command Line Flag 參數功能 ⽀支援 Bot API
WebHook 功能 ⽀支援 Https for WebHook Tunnel ⽀支援⾃自動更新 https 憑證功能 (Let’s Encrypt) ⽀支援監控 WebHook 服務功能 ⽀支援多種訊息格式 (圖⽚片, 影⽚片, 表情符號 … 等) ⽀支援跨平台編譯執⾏行檔 ⽀支援透過 Docker 發送訊息 ⽀支援⾼高並發 (處理⼤大量發送訊息)
不⽤用擔⼼心憑證過期
None
http.Serve(autocert.NewListener("example.com"), handler) http://bit.ly/one-line-autotls
drone-line –s secret –t token ––autotls –host foo.bar webhook
⽀支援 Command Line Flag 參數功能 ⽀支援 Bot API
WebHook 功能 ⽀支援 Https for WebHook Tunnel ⽀支援⾃自動更新 https 憑證功能 (Let’s Encrypt) ⽀支援監控 WebHook 服務功能 ⽀支援多種訊息格式 (圖⽚片, 影⽚片, 表情符號 … 等) ⽀支援跨平台編譯執⾏行檔 ⽀支援透過 Docker 發送訊息 ⽀支援⾼高並發 (處理⼤大量發送訊息)
Memory 使⽤用量 …
⾃自訂監控數據
https://prometheus.io/
https://grafana.com/
None
None
None
⽀支援 Command Line Flag 參數功能 ⽀支援 Bot API
WebHook 功能 ⽀支援 Https for WebHook Tunnel ⽀支援⾃自動更新 https 憑證功能 (Let’s Encrypt) ⽀支援監控 WebHook 服務功能 ⽀支援多種訊息格式 (圖⽚片, 影⽚片, 表情符號 … 等) ⽀支援跨平台編譯執⾏行檔 ⽀支援透過 Docker 發送訊息 ⽀支援⾼高並發 (處理⼤大量發送訊息)
drone-line –s secret –t token –to xxxx –message “Hi”
drone-line –s secret –t token –to xxxx –image “xxxxx” drone-line
–s secret –t token –to xxxx –video “xxxxx” drone-line –s secret –t token –to xxxx –audio “xxxxx”
⽀支援 Command Line Flag 參數功能 ⽀支援 Bot API
WebHook 功能 ⽀支援 Https for WebHook Tunnel ⽀支援⾃自動更新 https 憑證功能 (Let’s Encrypt) ⽀支援監控 WebHook 服務功能 ⽀支援多種訊息格式 (圖⽚片, 影⽚片, 表情符號 … 等) ⽀支援跨平台編譯執⾏行檔 ⽀支援透過 Docker 發送訊息 ⽀支援⾼高並發 (處理⼤大量發送訊息)
write once run anywhere
https://github.com/mitchellh/gox
None
真⼼心不騙
None
http://www.banana-pi.org/m64.html
⽀支援 Command Line Flag 參數功能 ⽀支援 Bot API
WebHook 功能 ⽀支援 Https for WebHook Tunnel ⽀支援⾃自動更新 https 憑證功能 (Let’s Encrypt) ⽀支援監控 WebHook 服務功能 ⽀支援多種訊息格式 (圖⽚片, 影⽚片, 表情符號 … 等) ⽀支援跨平台編譯執⾏行檔 ⽀支援透過 Docker 發送訊息 ⽀支援⾼高並發 (處理⼤大量發送訊息)
Jenkins Drone Gitlab CI
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build
None
https://github.com/urfave/cli
None
Drone
None
發送給原 commit 作者 避免團隊成員收到太多無意義訊息
None
⽀支援 Command Line Flag 參數功能 ⽀支援 Bot API
WebHook 功能 ⽀支援 Https for WebHook Tunnel ⽀支援⾃自動更新 https 憑證功能 (Let’s Encrypt) ⽀支援監控 WebHook 服務功能 ⽀支援多種訊息格式 (圖⽚片, 影⽚片, 表情符號 … 等) ⽀支援跨平台編譯執⾏行檔 ⽀支援透過 Docker 發送訊息 ⽀支援⾼高並發 (處理⼤大量發送訊息)
go f(“goroutine”)
專案: https://github.com/appleboy/drone-line 下載: https://github.com/appleboy/drone-line/releases Docker: https://hub.docker.com/r/appleboy/drone-line
專案: https://github.com/appleboy/drone-facebook 下載: https://github.com/appleboy/drone-facebook/releases Docker: https://hub.docker.com/r/appleboy/drone-facebook
結合⼿手機 App 服務
None
None
Gorush Server
A push notification server written in Go https://github.com/appleboy/gorush
(drone-line or drone-facebook) + Gorush
Why not Node.js, Python, PHP?
None
None
類似 C 語法
http://bit.ly/oneday-golang
謝謝⼤大家參與