Envrionment as a code with vagrant & chef

1,513 views
1,403 views

Published on

This deck is from my sharing about Environment as a code with vagrant & chef on office internal WE-Day.

Published in: Business, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,513
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
16
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Envrionment as a code with vagrant & chef

  1. 1. Environment as a Code with Vagrant & Chef 金明 @imingjin
  2. 2. Scenario 1如何满足团队需要新机器的需求?
  3. 3. Scenario 1IS同学给我们订购一台机器,但要等半个月IS同学给我们创建一台虚拟机,但服务器资源有限
  4. 4. Scenario 2如何快速搭建一套完全可用的应用环境?
  5. 5. Scenario 2团队ghost标准环境,ghost文件缺乏维护大多数时候,团队仍然需要去做手工部署每个人基本上都有自己的部署过程,千人千面
  6. 6. Scenario 3如何保持团队机器上的工具与库等一致?
  7. 7. Scenario 3各人的机器配置很快就变得面目全非升级工具或者库,需要逐台机器进行
  8. 8. 缺乏管理,环境的问题无休无止发、测试、CI、Staging、Production⋯
  9. 9. 环境 也要做 配置管理
  10. 10. Scenario 1如何满足团队需要新机器的需求?何不试试本地的虚拟机?
  11. 11. Vagrant Sample 1创建一台CentOS服务器
  12. 12. 与VirtualBox/VMWare有啥区 ?
  13. 13. 没有区 ,只不过⋯用Ruby脚本描述机器配置自动化、可以集成到CI等流程Base box的维护、管理社区化集成对环境provision的支持
  14. 14. Let’s Look Closer...Box operations add/remove/list packagevm instance operations up/resume/reload suspend/halt/destroy ssh/provision
  15. 15. Let’s Look Closer...Networking NAT host-only bridgedShared folder
  16. 16. Scenario 2如何快速搭建一套完全可用的应用环境?如何对应用环境进行配置管理?
  17. 17. Vagrant Sample2Provision刚才创建的服务器
  18. 18. 应用环境配置 OS Runtime Container app app app lib
  19. 19. 应用环境配置 OS Runtime Container app app app lib Infrastracture as Code
  20. 20. ChefManage your servers by writing code, not by runningcommands. (via Cookbooks)Integrate tightly with your applications, databases, LDAPdirectories, and more. (via Libraries)Easily configure applications that require knowledge aboutyour entire infrastructure ("What systems are running myapplication?" "What is the current master databaseserver?") (via Search)Create perfect clones of QA environments, pre-productionenvironments, partner preview environments and more. (viaEnvironments)
  21. 21. Chef sample1chef-solo配置一台服务器
  22. 22. 与我自己写shell/powershell有啥区 ?
  23. 23. 没有区 ,只不过⋯Chef对shell的命令与系统提供了良好的抽象对脚本的管理(knife)与版本管理(chef-repo.git)cookbook/recipe社区Ruby!!client/server的架构支持“pub/sub”
  24. 24. Let’s Look Closer
  25. 25. Scenario 3如何保持团队机器上的工具与库等一致?如何自动监听应用环境的变更并更新?
  26. 26. Chef Sample 2chef-client配置一台服务器
  27. 27. Let’s Look Closer
  28. 28. Scenario 4How about windows?
  29. 29. Scenario 4How about Windows?Chef也行!
  30. 30. Chef Sample 3chef + windows server 2008winrm + knife-windows
  31. 31. 多余的话本地虚拟机私有云公有云
  32. 32. Referencesvagrant(http://vagrantup.com)veewee(https://github.com/jedi4ever/veewee)chef(http://wiki.opscode.com/display/chef/Home)knife-windows(https://github.com/opscode/knife-windows)puppet(http://docs.puppetlabs.com)
  33. 33. Q&A

×