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
750
用 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.4k
生成式 AI CodeGPT 開發經驗談
appleboy
0
3k
打造 MLOps 平台 改善 AI 模型開發流程
appleboy
0
2.2k
自動化監控伺服器工具 - Gatus
appleboy
0
4k
Drone CI/CD 自動化測試及部署
appleboy
1
510
初探 Infrastructure as Code 工具 Pulumi
appleboy
2
3.6k
Introduction to Open Policy Agent
appleboy
0
2k
善用 Go 語言效能測試工具來提升執行效率
appleboy
2
4.4k
用 Go 語言打造多台機器 Scale 架構
appleboy
1
4.6k
Other Decks in Technology
See All in Technology
AIの最新技術&テーマをつまんで紹介&フリートークするシリーズ #1 量子機械学習の入門
tkhresk
0
130
PHPでWebブラウザのレンダリングエンジンを実装する
dip_tech
PRO
0
180
AWS Summit Japan 2025 Community Stage - App workflow automation by AWS Step Functions
matsuihidetoshi
1
150
データプラットフォーム技術におけるメダリオンアーキテクチャという考え方/DataPlatformWithMedallionArchitecture
smdmts
5
570
「Chatwork」の認証基盤の移行とログ活用によるプロダクト改善
kubell_hr
1
100
OAuth/OpenID Connectで実現するMCPのセキュアなアクセス管理
kuralab
5
880
原則から考える保守しやすいComposable関数設計
moriatsushi
3
510
本当に使える?AutoUpgrade の新機能を実践検証してみた
oracle4engineer
PRO
1
130
Agentic Workflowという選択肢を考える
tkikuchi1002
1
400
AWS アーキテクチャ作図入門/aws-architecture-diagram-101
ma2shita
29
9.5k
初めてのAzure FunctionsをClaude Codeで作ってみた / My first Azure Functions using Claude Code
hideakiaoyagi
1
190
LinkX_GitHubを基点にした_AI時代のプロジェクトマネジメント.pdf
iotcomjpadmin
0
160
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
46
14k
Scaling GitHub
holman
459
140k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
Balancing Empowerment & Direction
lara
1
350
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
Side Projects
sachag
455
42k
VelocityConf: Rendering Performance Case Studies
addyosmani
330
24k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
20k
For a Future-Friendly Web
brad_frost
179
9.8k
Building a Modern Day E-commerce SEO Strategy
aleyda
41
7.3k
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
謝謝⼤大家參與