豆瓣广告系统持续集成相关的实践

33
+ 豆瓣广告系统 持续集成的相关实践 豆瓣网 张伟 [email protected] @叔叔的测试

description

分享于2013 AgileChina http://agilechina.org.cn/YjjbInfo.php?id=106

Transcript of 豆瓣广告系统持续集成相关的实践

+

豆瓣广告系统���᠋᠌᠍持续集成的相关实践 �

豆瓣网 张伟 [email protected] @蓝叔叔的测试笔记

+

0 4 0 S

How fast we can?

+agenda

n 产品背景基本介绍 �

n 从测试出发,持续集成 �

n 持续集成运用于开发周期各阶段 �

n 持续发布相关实践 �

+产品概要 �

n 豆瓣广告系统 �

n  内容 �

n  文本广告 �

n  音频 �

n  视频 �

n  平台 �

n  Web

n  App

+技术背景 �

n 广告投放系统 �

n 投放策略系统 �

n 投放引擎 �

n 监控系统 �

+Development Environment init

n  Long doc for env init fab  dev.init  

fab  dev.gen_config:  

Ref http://tinyurl.com/mcnqdua

+Fab  as  tasks  tool  

+Remote import package

n  bitbucket.org

n  github.com

n  code.google.com

Ref: http://golang.org/src/cmd/go/help.go

Remote import

目录中的package

+OuT OF CoNTRoL

Ref http://book.douban.com/subject/1483021/

+ Package by reversion

+初涉CI,从测试出发 �

n  Go Lang n  Fab as tasks tool

n  Remote import package by reversion

n  CI for master n  go2xunit

+CI for Master

GUI Tests

Unit Test

API Tests

+Configuration management

+Subversion Feature Branch

Test for Branch

Ref http://dou.bz/39qbOT

+CI for SVN branch

n  Create continuous build job for branch update

n  Publish failed build result to developer

+Github (Pull Request) flow

n  Master branch is deployable

n  Create a descriptively named branch off of master

n  Commit to that branch locally and push to the server

n  When you need feedback or help, or branch is ready for merging, open a pull request

n  After reviewed and signed off on the feature, merge it into master

n  After merged, deploy immediately

ref: http://scottchacon.com/2011/08/31/github-flow.html

+CI for github flow

Continuous Deployment

From Continuous Integration to

+

dev

pre

online

环境的隔离

+

Monitor T

est &

Build

Deploy PreRelease

Push

Dat

a

Pre release

After merged

Pre-release: traffic, traffic

Nn% NN:与主站的pre-release联动

nn% Nn:tcpcopy 流量复制 N:手工检查页面

n%

https://github.com/wangbin579/tcpcopy

+

Deploy

Flow

+Binary file

n  Only one file

n  Version as filename

n  Keep old files

+Deployment

n  Single Node

n  Cluster

n  All server

+

5 %

Single Node

+Cluster

40 %

+

100 %

All Servers

+Configuration service

n  Cluster Configuration Files in git n  Pull Request

n  Push Configuration to cluster

n  Notification

Via http://tinyurl.com/ncbfazn

+Monitoring

n  Graph n  QPS

n  ERROR

n  All in one n  LOG

n  REPORT

n  DUTY

n  Notification

+Summary

n 补充测试 �

n 持续集成 �

n  Master

n  branch

n 自动部署预发布和线上环境 �

n  模拟了访问量 �

n  配置和数据推送 �

n 监控作为反馈 �

+

Q&A

豆瓣网 张伟 [email protected] @蓝叔叔的测试笔记 https://github.com/jollychang