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
AWSを活用したIoTにおけるセキュリティ対策のご紹介
kwskyk
0
340
ディスプレイ広告(Yahoo!広告・LINE広告)におけるバックエンド開発
lycorptech_jp
PRO
0
340
アジャイルな開発チームでテスト戦略の話は誰がする? / Who Talks About Test Strategy?
ak1210
1
550
データベースの負荷を紐解く/untangle-the-database-load
emiki
2
500
ABWG2024採択者が語るエンジニアとしての自分自身の見つけ方〜発信して、つながって、世界を広げていく〜
maimyyym
1
140
技術スタックだけじゃない、業務ドメイン知識のオンボーディングも同じくらいの量が必要な話
niftycorp
PRO
0
100
PHPカンファレンス名古屋-テックリードの経験から学んだ設計の教訓
hayatokudou
2
540
Oracle Database Technology Night #87-1 : Exadata Database Service on Exascale Infrastructure(ExaDB-XS)サービス詳細
oracle4engineer
PRO
1
170
Aurora PostgreSQLがCloudWatch Logsに 出力するログの課金を削減してみる #jawsdays2025
non97
1
190
LINEギフトにおけるバックエンド開発
lycorptech_jp
PRO
0
270
サイト信頼性エンジニアリングとAmazon Web Services / SRE and AWS
ymotongpoo
7
1.5k
AIエージェント元年@日本生成AIユーザ会
shukob
1
200
Featured
See All Featured
A Tale of Four Properties
chriscoyier
158
23k
Automating Front-end Workflow
addyosmani
1368
200k
How to train your dragon (web standard)
notwaldorf
91
5.9k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
The World Runs on Bad Software
bkeepers
PRO
67
11k
Building a Scalable Design System with Sketch
lauravandoore
461
33k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.3k
Rebuilding a faster, lazier Slack
samanthasiow
80
8.9k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
Designing for Performance
lara
604
68k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
Facilitating Awesome Meetings
lara
52
6.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
謝謝⼤大家參與