狠狠撸

狠狠撸Share a Scribd company logo
网站上线了,然后呢?
陳小風 @ DevOpsDay 2017
1
自我介紹
? 陳鋒逸(陳小風)
? 經歷
? KKTIX 工程師
? 微軟最有價值專家 (MVP)
? SkillTree兼任講師
? 社群研討會講師
? @TechPodcastNight
? twMVC
? AgileCommunity.tw
? Javascript.tw
2
粉絲團: 愛流浪的小風
Software in 2017
? 趨勢變化
? 競爭激烈
? 時間就是金錢
? 提早確認
? 修正方向
修正 修正 修正 修正
適應改變
產品團隊的挑戰
持續交付新產品
保持系統穩定
瞭解服務狀態
應付意外狀況
5
持續交付高品質軟體
6
持續交付的痛點
7
穩定性
相容性
可回復性
應變性
你有聽過測試嗎?
? 驗證結果符合預期
? 找出潛在問題
? 安全防護網
? 有重構的機會
8
你做的是測試嗎?
? 預期會發生的行為 => 驗證
? 找出意料外的行為 => 測試
? 讓 驗證 自動化
9
順暢
穩定防呆
100
120
137
160
20
17
23
15
0
20
40
60
80
100
120
140
160
180
200
Sprint 1 Sprint 2 Sprint 3 Sprint 4
程式碼行數與測試需求
Code Increasement
測
試
工
作
量
10
為什麼需要自動化測試
11
0
1
2
3
4
5
6
7
8
2 4 6 8 10 12
測試人員需求
有自動化測試 沒自動化測試
測試人員是原本的 7 倍
惡性循環
開發時間少
測試問題多
加班趕工上線
發現程式很難改
投入更多資源
12
讓測試自動化
單元
測試
整合
測試
壓力
測試
驗收
測試
系統
測試
13
有測試就安全了嗎?
涵蓋率 重複 安全性
風格 技術債
14
自動化部署
? 避免手誤
? 標準化流程
? 節省時間
? 減少人力介入
15
持續交付流程
Source Code Production
CI Server
Build Unit Test
Integration
Test
Code
Analysis
Deploy
16
http://www.ambysoft.com/essays/whyAgileWorksFeedback.html
17
Developer
? 工具不是萬能
? 人工確認
? Definition of Done
? 同步資訊
18
持續交付流程
Source Code Production
CI Server
Build Unit Test
Integration
Test
Code
Analysis
Deploy
Code Review
Pair Programming
19
Development
Test
RD
QA
Test DB
開發
測試
Production DBStage
測試
Production
使用服務
正式上線
Multiple Stage
20
環境落差
? 環境不一致
? 資料量大
? 資料複雜度高
? 效能問題
? 架構問題
21
Canary & Rolling Release
App 1
App 1 App 1 App 1
App 1 App 1
App 1
App 1
V2
App 1
V2
App 1
V2
App 1
V2
App 1
V2
App 1
V2
App 1
V2
CI Server
app.com
Canary
Production
22
壓力測試的難題
? 與現實有落差
? 人類 vs 機器
? 測試的死角
? 瞬間的瓶頸
23
模擬使用者行為
? PhantomJs
? 根據 Request Log
? 根據 GA
? 客制化腳本
? 同時發動
24
Customize Script
Runner
Admin
模擬使用者行為
25
Recap
? 確保品質
? 持續交付
? 避免意外
? 有效產出
26
Immutable Infrastructure
27
網站架構
WebSite
Database
Redis
28
Scalable Application
App App
Redis Database
? Stateless
? Recoverable
? Reuse
? Scale out & Scale up
29
Maintainable
? Install
? Setup
? Maintain
30
Maintainable
? Install
? Setup
? Maintain
31
Infrastructure as Code
App App
Redis Database
Terraform
32
Infrastructure as Code
App
Redis Database
Puppet
provition
33
Infrastructure as Code
App
DockerWeb
DB
Redis
34
Infrastructure as Code
Branch A
Web
DB
Redis
35
Testing
Environment
Branch B
Web
DB
Redis
Production
Environment
App App
Web Web Web Web
DB
Redis
Terraform
? 使用 HCL / JSON
? 容易閱讀
? 支援多平台
? 可匯入現有資源
? 搭配版本控管
36
多平台
https://www.terraform.io/docs/providers/
目前有 70 多個 Provider
37
版本控管
38
Puppet
? Provision
? Package AWS AMI
? Role Profile Pattern
? Easy Reuse
? Auto Scaling Group
39
Role
Nginx
Rails
Fluentd
AMI
Cloudwatch Log
Docker
? 快速建置環境
? 開發與正式環境一致
? 環境隔離
? 資源有效利用
? 降低維運成本
? 比虛擬化更輕量
WebSite
Database
Redis
20%
50%
15%
資源最佳化
Docker
Docker
WebSite
Database
Redis
Recap
? Stateless
? Scalable
? Stable
? Reuseable
43
System Monitor and
Profiling
44
監控維度
Infrastructure
Server
Application
Flow
45
Intrastructure Status
App App
Redis Database
AWS
CloudWatch
? ELB Request Count
? CPU Usage
? Network Thoughput
? Disk IO
46
App
Server Status
Monit
? CPU Usage
? Memory Usage
? Disk Usage
? Application Status
? Custom Script
47
Application Level
Application Status
Nginx
Rails Go
? Access Log
? Error Log
? Audit Log
? Others
48
替 Log 加分
? 持續分析
? 資料視覺化
? 監控問題
? 預防異常
49
ELK
Web Server Buffer
AWS CloudWatch Log
50
Log Processing
Normalize Filter Aggregate Visualizize
51
Flow Status
? 服務流程是否正常
? 交易中斷
? 無法登入
? 歷史數據比較
? 可透過 Google Analytics 實現
52
Dashboard
即時更新
健康狀況
關鍵資訊
53
資訊整合
Profiling
? 特定時間
? 狀態分析
? 資訊記錄
? 效能改善
? 系統優化
Infrastruct
ure
Server
Applicatio
n
Flow
54
Analysis Event
Infrastruct
ure
Server
Applicatio
n
Flow
Collect Data
55
Cron Job
Recap
? 資訊收集
? 分析應用
? 關注重點
56
Chatops
57
Notification
Infrastructure
CI Server
DashboardSlack
58
Notification
? 即時通知
? 信箱不會爆炸
? 盡量避免雜訊
? 重要訊息
? 減少干擾
Infrastructure
CI Server
Dashboard
Slack
59
Notification
? 即時通知
? 信箱不會爆炸
? 盡量避免雜訊
? 重要訊息
? 減少干擾
60
Interaction
Infrastructure
CI Server
DashboardSlack
61
Interaction
Infrastructure
CI Server
Dashboard
Slack
Robot
62
Robot
? 不需要介面
? 指令操作
? 權限管理
? 隨時隨地
Slack
Robot
63
Query Log Aggregation
Slack
Robot Dashboard
64
Apply Infrastructure
Slack
Robot
App
65
綜合應用
InfrastructureDashboard
Slack
Robot
User
Request
機器數量不足 是否加開機器?
66
Recap
? 降低門檻
? 方便操作
? 重點提示
? 改善流程
67
總結
? 有效利用資源
? 減少重複工作
? 可靠度
? 穩定性
? 解決問題
? 預防問題
? 工具只是輔助
? 持續改善
68
團隊文化
? 減少浪費
? 達成目標
? 消除瓶頸
?解決問題
69
人 工具>
70
71
版本
控制
產品
單元
測試
整合
測試
代碼
風格
自動
部署
結對
編程
Code
Review
持續
集成
實例化
需求
敏捷
開發
Terraform
Puppet
Docker
不可變
架構
架構即
代碼
Bash
Automation
自動
延展
高可
用性
Elastic
Search
Fluentd
Kibana
Cloud
Watch
Monit
Dashboard
Alarm
Chatops
Notification
Operation
72
產品
穩定
持續交付
想要瞭解更多嗎?
73
We're Hiring
jobs.kktix.cc
74
謝 謝 大 家
75
Ad

Recommended

PPTX
我們與Azure DevOps的距離
Edward Kuo
?
PPTX
[2020 .NET Conf] 企業Azure DevOps Service 實際應用架構與秘辛
Edward Kuo
?
PPTX
持續交付高品質程式碼 公開版
Kirk Chen
?
PDF
当当网顿辞肠办别谤应用实践
正炎 高
?
PPTX
[2021 .NET Conf]善用 Azure Monitor 服務打造 DevOps 監控一環
Edward Kuo
?
PDF
W3CTech美团react专场-React Native 初探
美团点评技术团队
?
PDF
Train.IO 【第六期-OpenStack 二三事】
inwin stack
?
PPTX
[2018 .NET Conf].NET Core與Azure DevOps應用於企業開發
Edward Kuo
?
PDF
W3CTech美团react专场-Thinking in React
美团点评技术团队
?
PPTX
[ Study4TW Visual Studio Everywhere ] Vsts + microsoft teams 建構企業的Devops
Edward Kuo
?
PPTX
GDG Taichung: Cloud Study Jam ML API
Duran Hsieh
?
PDF
[Agile Tour Hsinchu 2019] Our practice in the DevOps Process for Manufacture ...
Edward Kuo
?
PDF
Lightning Hedis
Mu Chun Wang
?
PDF
美团点评技术沙龙14美团云-顿辞肠办别谤平台
美团点评技术团队
?
PDF
敏捷模式下的百度研发基础环境建设 1
drewz lin
?
PPTX
GitHub Action Introduction
Duran Hsieh
?
PPTX
Team Foundation Server
國昭 張
?
PPTX
GDG Taichung - Firebase Introduction 01
Duran Hsieh
?
PDF
Elastic Stack 最新动态
Elasticsearch
?
PDF
美团点评技术沙龙05 - 前后端联调方案探索与应用
美团点评技术团队
?
PPTX
顿顿顿系统分析
國昭 張
?
PDF
DevSecOps-The Key of Continuous Security
4ndersonLin
?
PPTX
領域驅動設計 (Domain Driven Design)
Jeff Chu
?
PDF
从颁滨到颁顿摆麻袋理财王天青闭惫1
天青 王
?
PDF
狈驳颈苍虫深度开发与客制化
Joshua Zhu
?
PDF
Partner Session - Alibaba
Elasticsearch
?
PDF
网站可靠性工程工作手册
偉君 方
?
PPTX
架构设计-资料存取的选择
國昭 張
?
PPTX
迟飞惭痴颁#31网站上线了然后呢
twMVC
?
PDF
該怎麼樣(認真的)部署你的 Python Web 應用程式?
Andy Dai
?

More Related Content

What's hot (20)

PDF
W3CTech美团react专场-Thinking in React
美团点评技术团队
?
PPTX
[ Study4TW Visual Studio Everywhere ] Vsts + microsoft teams 建構企業的Devops
Edward Kuo
?
PPTX
GDG Taichung: Cloud Study Jam ML API
Duran Hsieh
?
PDF
[Agile Tour Hsinchu 2019] Our practice in the DevOps Process for Manufacture ...
Edward Kuo
?
PDF
Lightning Hedis
Mu Chun Wang
?
PDF
美团点评技术沙龙14美团云-顿辞肠办别谤平台
美团点评技术团队
?
PDF
敏捷模式下的百度研发基础环境建设 1
drewz lin
?
PPTX
GitHub Action Introduction
Duran Hsieh
?
PPTX
Team Foundation Server
國昭 張
?
PPTX
GDG Taichung - Firebase Introduction 01
Duran Hsieh
?
PDF
Elastic Stack 最新动态
Elasticsearch
?
PDF
美团点评技术沙龙05 - 前后端联调方案探索与应用
美团点评技术团队
?
PPTX
顿顿顿系统分析
國昭 張
?
PDF
DevSecOps-The Key of Continuous Security
4ndersonLin
?
PPTX
領域驅動設計 (Domain Driven Design)
Jeff Chu
?
PDF
从颁滨到颁顿摆麻袋理财王天青闭惫1
天青 王
?
PDF
狈驳颈苍虫深度开发与客制化
Joshua Zhu
?
PDF
Partner Session - Alibaba
Elasticsearch
?
PDF
网站可靠性工程工作手册
偉君 方
?
PPTX
架构设计-资料存取的选择
國昭 張
?
W3CTech美团react专场-Thinking in React
美团点评技术团队
?
[ Study4TW Visual Studio Everywhere ] Vsts + microsoft teams 建構企業的Devops
Edward Kuo
?
GDG Taichung: Cloud Study Jam ML API
Duran Hsieh
?
[Agile Tour Hsinchu 2019] Our practice in the DevOps Process for Manufacture ...
Edward Kuo
?
Lightning Hedis
Mu Chun Wang
?
美团点评技术沙龙14美团云-顿辞肠办别谤平台
美团点评技术团队
?
敏捷模式下的百度研发基础环境建设 1
drewz lin
?
GitHub Action Introduction
Duran Hsieh
?
Team Foundation Server
國昭 張
?
GDG Taichung - Firebase Introduction 01
Duran Hsieh
?
Elastic Stack 最新动态
Elasticsearch
?
美团点评技术沙龙05 - 前后端联调方案探索与应用
美团点评技术团队
?
顿顿顿系统分析
國昭 張
?
DevSecOps-The Key of Continuous Security
4ndersonLin
?
領域驅動設計 (Domain Driven Design)
Jeff Chu
?
从颁滨到颁顿摆麻袋理财王天青闭惫1
天青 王
?
狈驳颈苍虫深度开发与客制化
Joshua Zhu
?
Partner Session - Alibaba
Elasticsearch
?
网站可靠性工程工作手册
偉君 方
?
架构设计-资料存取的选择
國昭 張
?

Similar to 网站上线了,然后呢? (20)

PPTX
迟飞惭痴颁#31网站上线了然后呢
twMVC
?
PDF
該怎麼樣(認真的)部署你的 Python Web 應用程式?
Andy Dai
?
PDF
導讀持續交付 2.0 - 談當代軟體交付之虛實融合
Rick Hwang
?
PDF
Testing in Production, Deploy on Fridays
Yi-Feng Tzeng
?
PDF
2023 08 - SRE 實踐與開發平台指南 - 書友見面會
Rick Hwang
?
PDF
Bitbucket pipeline CI
Zero Huang
?
PPTX
在B2B硬體產業運用 Agile 與 DevOps 的實務與心法
TIM WANG
?
PDF
SRE Study Notes - CH2,3,4
Rick Hwang
?
PDF
Continuous Delivery: automated testing, continuous integration and continuous...
Jimmy Lai
?
PPTX
2019 Cloud Native Forum, Taipei
YiDeWu1
?
PDF
IT 自動化解決方案,包含 APM 與 ARM 等領域,可以有效收集並提供建議資訊
simonkuo62
?
PDF
Foundation of software development 2
netdbncku
?
PDF
软体安全防护大作战
Galaxy Software Services
?
PDF
91APP: 從 "零" 開始的 DevOps
Andrew Wu
?
PPTX
A dev ops team's practice in trend micro in agile summit 2018
Juggernaut Liu
?
PDF
從敏捷開始的測試 從測試開始的自動化
少齊 張
?
PPTX
2024/11/29 DevOps Taiwan #64 : 從初建到進階:打造符合公司需求的混合雲端 GitLab DevOps 流水線
Freddy Fan
?
PDF
如何在有限资源下实现十年的后端服务演进
Mu Chun Wang
?
PDF
Continuous integration
netdbncku
?
PPTX
从无到有建立一个敏捷开发团队的经验甘苦谈
TIM WANG
?
迟飞惭痴颁#31网站上线了然后呢
twMVC
?
該怎麼樣(認真的)部署你的 Python Web 應用程式?
Andy Dai
?
導讀持續交付 2.0 - 談當代軟體交付之虛實融合
Rick Hwang
?
Testing in Production, Deploy on Fridays
Yi-Feng Tzeng
?
2023 08 - SRE 實踐與開發平台指南 - 書友見面會
Rick Hwang
?
Bitbucket pipeline CI
Zero Huang
?
在B2B硬體產業運用 Agile 與 DevOps 的實務與心法
TIM WANG
?
SRE Study Notes - CH2,3,4
Rick Hwang
?
Continuous Delivery: automated testing, continuous integration and continuous...
Jimmy Lai
?
2019 Cloud Native Forum, Taipei
YiDeWu1
?
IT 自動化解決方案,包含 APM 與 ARM 等領域,可以有效收集並提供建議資訊
simonkuo62
?
Foundation of software development 2
netdbncku
?
软体安全防护大作战
Galaxy Software Services
?
91APP: 從 "零" 開始的 DevOps
Andrew Wu
?
A dev ops team's practice in trend micro in agile summit 2018
Juggernaut Liu
?
從敏捷開始的測試 從測試開始的自動化
少齊 張
?
2024/11/29 DevOps Taiwan #64 : 從初建到進階:打造符合公司需求的混合雲端 GitLab DevOps 流水線
Freddy Fan
?
如何在有限资源下实现十年的后端服务演进
Mu Chun Wang
?
Continuous integration
netdbncku
?
从无到有建立一个敏捷开发团队的经验甘苦谈
TIM WANG
?
Ad

网站上线了,然后呢?