Upload
foxgem
View
1.552
Download
8
Embed Size (px)
DESCRIPTION
AgileTour 2011 西安站,冯智超。
Citation preview
持续交付使用云计算和虚拟化技术
个人简介
冯智超
chaojiwudi.com
程序员;
准Geek;
伪军迷;
向客户交付价值
手工部署
自动化
一切皆代码
流水线
流水线监控
尽可能模拟产品环境
云和虚拟化
Chef
• chef server/client
• chef solo
• role
• cookbook
• recipe
• resource/provider
Amazon VPC
• ec2-run-instances ami-a54d67d1 --instance-type t1.micro --region us-west-1 --key MY_AMZ_KEY
• knife ec2 server create "role[rails_server]" --image ami-31814f58 --flavor t1.micro --availability-zone us-east-1a --ssh-key MY_AMZ_KEY
vagrant
Vagrant::Config.run do |config|config.vm.box = "centos6"
config.vm.provision :chef_solo do |chef|chef.cookbooks_path = "/PATH/TO/chef-repo/cookbooks"chef.roles_path = "/PATH/TO/chef-repo/roles"chef.add_role "db_master_server"end
end
• yun node create NODE_NAME
• yun node list
• yun node destroy NODE_NAME
• yunssh NODE_NAME
• yun chef NODE_NAME ROLE
+---------------------+------------+--------------+--------------+-------+---------+----------+
| created_at | id | image | ip | name | state | type |
+---------------------+------------+--------------+--------------+-------+---------+----------+
| 2011-12-09 19:06:45 | i-b3442af4 | ami-2e10406b | | test2 | stopped | t1.micro |
| 2011-12-09 20:03:34 | i-e95a34ae | ami-2e10406b | | test3 | stopped | t1.micro |
| 2011-12-09 21:05:15 | i-3f513f78 | ami-2e10406b | 50.18.4.229 | ci | running | m1.small |
| 2011-12-10 01:15:36 | i-8782ecc0 | ami-2e10406b | 50.18.36.117 | qa | running | t1.micro |
+---------------------+------------+--------------+--------------+-------+---------+----------+
4 rows in set
button-click 部署
PackageAcceptanceStandalone
Git Repo
PackageAcceptanceStandalone
AcceptanceStaging
Publish
local machine CI server
CIRepo Dist
Repo
EC2/VMWare
Pre-Production Production
EC2/VMWare
EC2/VMWare
QA / Performance / BAT …
EC2/VMWare
Prod A Prod B
the same as local
nodeOS: centosserver: apacheapp: tomcat + warconfig files
web db
searchbackend
environment
QA test uat
showcaseperfomance
test
staging
个人经验
github.com/flanker/yungithub.com/flanker/infoq-demo