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
700
用 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
Introduction to OpenSearch Project - Search Engineering Tech Talk 2025 Winter
tkykenmt
2
220
いまからでも遅くない!コンテナでWebアプリを動かしてみよう!コンテナハンズオン編
nomu
0
180
サイト信頼性エンジニアリングとAmazon Web Services / SRE and AWS
ymotongpoo
7
1.8k
【Snowflake九州ユーザー会#2】BigQueryとSnowflakeを比較してそれぞれの良し悪しを掴む / BigQuery vs Snowflake: Pros & Cons
civitaspo
2
280
ExaDB-XSで利用されているExadata Exascaleについて
oracle4engineer
PRO
3
300
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
3
540
MLflowはどのようにLLMOpsの課題を解決するのか
taka_aki
0
130
LINE NEWSにおけるバックエンド開発
lycorptech_jp
PRO
0
360
Amazon Aurora のバージョンアップ手法について
smt7174
2
190
スクラムというコンフォートゾーンから抜け出そう!プロジェクト全体に目を向けるインセプションデッキ / Inception Deck for seeing the whole project
takaking22
2
130
Snowflakeの開発・運用コストをApache Icebergで効率化しよう!~機能と活用例のご紹介~
sagara
1
530
AWSではじめる Web APIテスト実践ガイド / A practical guide to testing Web APIs on AWS
yokawasa
8
780
Featured
See All Featured
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.7k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
47
5.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
7.1k
Making the Leap to Tech Lead
cromwellryan
133
9.1k
Code Review Best Practice
trishagee
67
18k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
27
1.9k
We Have a Design System, Now What?
morganepeng
51
7.4k
YesSQL, Process and Tooling at Scale
rocio
172
14k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Agile that works and the tools we love
rasmusluckow
328
21k
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
謝謝⼤大家參與