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
590
用 Go 語言打造 DevOps Bot
Bo-Yi Wu
April 26, 2017
Tweet
Share
More Decks by Bo-Yi Wu
See All by Bo-Yi Wu
生成式 AI CodeGPT 開發經驗談
appleboy
0
1.9k
打造 MLOps 平台 改善 AI 模型開發流程
appleboy
0
1.6k
自動化監控伺服器工具 - Gatus
appleboy
0
3.4k
Drone CI/CD 自動化測試及部署
appleboy
0
360
初探 Infrastructure as Code 工具 Pulumi
appleboy
2
3.2k
Introduction to Open Policy Agent
appleboy
0
1.6k
善用 Go 語言效能測試工具來提升執行效率
appleboy
2
4.1k
用 Go 語言打造多台機器 Scale 架構
appleboy
1
4.5k
Job Queue in Golang
appleboy
1
1.1k
Other Decks in Technology
See All in Technology
How to Lead? Testimonial of a Lead Android Engineer
oleur
1
120
個人のAWSアカウントをマルチ運用してみた
miura55
2
250
Cloud Service Mesh に触れ合う
phaya72
1
310
Microsoft for Startups Founders Hub_20240429 update
daikikanemitsu
1
2.5k
uvを使ってストレスフリーな Python開発をしよう!
r74tech
0
260
QAエンジニアが伝えたい品質保証の羅針盤 / Compass for Quality Assurance
mii3king
1
180
NewSQL Landscape
oracle4engineer
PRO
2
2.6k
kcp: Kubernetes APIs Are All You Need #techfeed_live / TechFeed Experts Night 28th
ytaka23
1
160
Babylon.js JAPAN活動紹介 (2024/4)
limes2018
1
130
データベース03: 関係データモデル
trycycle
0
110
Kaggleで学ぶ系列データのための深層学習モデリング
yu4u
6
940
Gitlab本から学んだこと - そーだいなるプレイバック / gitlab-book
soudai
7
1.4k
Featured
See All Featured
Making Projects Easy
brettharned
109
5.5k
The Invisible Customer
myddelton
114
12k
Rebuilding a faster, lazier Slack
samanthasiow
74
8.3k
Automating Front-end Workflow
addyosmani
1357
200k
Fontdeck: Realign not Redesign
paulrobertlloyd
76
4.9k
Gamification - CAS2011
davidbonilla
77
4.6k
Writing Fast Ruby
sferik
622
60k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
242
1.2M
How STYLIGHT went responsive
nonsquared
92
4.8k
Done Done
chrislema
178
15k
Building Adaptive Systems
keathley
32
1.9k
Documentation Writing (for coders)
carmenintech
60
4k
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
謝謝⼤大家參與