The way to continuous delivery
description
Transcript of The way to continuous delivery
AgileChina 2011
赢得 2011 Jolt Excellence Award
“The book will redefine agile process and CI; and it will have as much influence as Refactoring.”
中文版 预计 10 月中旬出版
http://drdobbs.com/joltawards/231500080?pgno=7
AgileChina 2011频繁发布
从用户那里得到反馈
CustomerDevelopment
Agile ProductDevelopment
Eric Ries, 《 The Lean Startup》
AgileChina 2011
可行性评估特性探索与发现
计划与估计 开发 测试与审核 发布
增值时间等待时间
3 天 1 周 10 天 7 周 1 周 2 小时
3 天1 周 10 天 5 天 2 天
AgileChina 2011交付团队 版本控制库 构建和单元测试 自动化验收测试 用户验收测试 发布
提交P
P
触发触发
反馈
反馈
FP
提交 触发触发
反馈
反馈
F提交 触发反馈
P点击按钮
反馈 P点击按键
AgileChina 2011
所用环境与生产环境的相似度增加
提交阶段编译单元测试代码检查构建安装包
验收测试阶段容量测试
用户验收测试生产环境
构建在生产环境上运行的信心指数增加
反馈速度变慢
部署流水线( Deployment pipeline )
AgileChina 2011
com.xxx.journal_sites.feedproxy = offcom.xxx.portal.search_history = off
配置文件
#if($switcher.isOn("portal.search_history"))<a href="#siteUri()/search_history"> <span>Search History</span></a>#end
页面使用
特性开关
AgileChina 2011某个新功能无法在一个发布周期内完成
特性开关 ( Feature Toggle ) 无用的代码要及时清理
不变的部分跟变化的部分分离
特性分支( Feature Branch )
AgileChina 2011某个新功能无法在一个发布周期内完成
特性开关 ( Feature Toggle ) 无用的代码要及时清理
不变的部分跟变化的部分分离
特性分支( Feature Branch )
AgileChina 2011某个新功能无法在一个发布周期内完成
特性开关 ( Feature Toggle ) 无用的代码要及时清理
不变的部分跟变化的部分分离
通过抽象代替分支 ( Branch By Abstraction )
AgileChina 2011
'uat': { 'app': ['ms5uat-proxy-001.my.com', 'ms5uat-proxy-002.my.com', 'ms5uat-proxy-003.my.com', 'ms5uat-proxy-004.my.com'], 'admin': ['ms5uat-cpanel-001.my.com'], 'daemon': ['ms5uat-comm-001.my.com'], 'batcher': ['ms5uat-celery-001.my.com’]},
定义环境及角色
AgileChina 2011
@roles('app', 'admin', 'daemon', 'batcher')def prepare(): with cd(PACKAGE_DIR): run('bin/prepare.sh') with cd(PACKAGE_DIR / 'task'):
run(…)
为任务分配角色
AgileChina 2011
ENV=uat fab -f deploy.py prepare stop_all copy_files install_modules init_master_secret start_all
执行
AgileChina 2011
ENV=uat fab -f deploy.py prepare stop_all copy_files install_modules init_master_secret start_all
执行
AgileChina 2011
ENV=uat fab -f deploy.py prepare stop_all copy_files install_modules init_master_secret start_all
执行
AgileChina 2011
wget http://ci-server/build/install-1.0.44-20110712.shchmod +x install-1.0.44-20110712.shENV=uat ./install-1.0.44-20110712.sh
执行
AgileChina 2011
package { ["java-1.6.0-openjdk-devel", "git", "ant”]: ensure => "present" }
package { "activemq-info-provider-5.4.0-2": provider => "rpm", ensure => "present", source => "http://www.puppetlabs.com/downloads/mcollective/activemq-info-provider-5.4.0-2.el5.noarch.rpm", require => Package["activemq-5.4.0-2"], }
AgileChina 2011
Q & A
乔梁 李剑微博 : http://weibo.com/Tony1130
博客 : http://blog.csdn.net/Tony1130
邮件 : [email protected]
中文站:www.continuousdelivery.info
博客 : http://www.iamxiaodao.com
邮件 : [email protected]