A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

118
a brief introduction to Vagrant 原來 Virtual Box 可以這樣玩 http://ihower.tw 2013/4/[email protected]
  • date post

    12-Sep-2014
  • Category

    Documents

  • view

    23.942
  • download

    1

description

 

Transcript of A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Page 1: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

a brief introduction to

Vagrant

原來 Virtual Box 可以這樣玩

http://ihower.tw2013/4/[email protected]

Page 2: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

我是誰?• 張⽂文鈿 a.k.a. ihower

• http://ihower.tw

• http://twitter.com/ihower

• Ruby Developer since 2006

• CTO, Faria Systems Ltd.

• The organizer of RubyConf Taiwan

• http://rubyconf.tw

Page 3: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

We’re hiringRuby on Rails developer

Page 4: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Agenda• Why?

• What’s Vagrant

• Features

• Shared Folder

• Networking

• Provisioning

• Pachaging

• Multi-VM

• More Providers

• Conclusion

Page 5: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Why?

Page 6: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

WebOps

Page 7: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

WebOps

• 如何⾃自動化安裝和設定伺服器?

Page 8: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

WebOps

• 如何⾃自動化安裝和設定伺服器?

• 需要開機器進⾏行安裝測試

Page 9: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

缺點

Page 10: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

缺點

• 無論是實體機器或 VPS, AWS EC2

Page 11: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

缺點

• 無論是實體機器或 VPS, AWS EC2

• 緩慢的 Feedback loop

Page 12: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

缺點

• 無論是實體機器或 VPS, AWS EC2

• 緩慢的 Feedback loop

• 環境弄髒了,重灌很慢

Page 13: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

WebDev

Page 14: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

WebDev

• 如何設定開發環境?

Page 15: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

WebDev

• 如何設定開發環境?

• 拿到⼀一個新專案,怎樣才能跑起來呢?

Page 16: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

WebDev

• 如何設定開發環境?

• 拿到⼀一個新專案,怎樣才能跑起來呢?

• 看 README

Page 17: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

WebDev

• 如何設定開發環境?

• 拿到⼀一個新專案,怎樣才能跑起來呢?

• 看 README

• 有 setup script?

Page 18: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

WebDev

• 如何設定開發環境?

• 拿到⼀一個新專案,怎樣才能跑起來呢?

• 看 README

• 有 setup script?

• 不斷嘗試錯誤,找出 dependency

Page 19: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

WebDev (cont.)

Page 20: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

WebDev (cont.)

• 這功能在我電腦上是正常的

Page 21: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

WebDev (cont.)

• 這功能在我電腦上是正常的• 開發環境跟 Production 環境越接近,bug 就越少

Page 22: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

缺點

Page 23: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

缺點

• 不總是 works

Page 24: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

缺點

• 不總是 works

• 不是⾃自動化

Page 25: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

缺點

• 不總是 works

• 不是⾃自動化• 無法驗證正確

Page 26: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

缺點

• 不總是 works

• 不是⾃自動化• 無法驗證正確• 不是 Isolated,不同機器環境就不同

Page 27: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

缺點

• 不總是 works

• 不是⾃自動化• 無法驗證正確• 不是 Isolated,不同機器環境就不同

• 也是很慢

Page 28: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Solution

Page 29: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Virtual Machine⽼老梗: 虛擬化

Page 30: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

VM Providers

• Virtual Box

• Vmware Fusion

• Parallels

• LXC

• KVM

• Cloud computing:

• AWS EC2

• Rackspace Cloud

Page 31: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

使⽤用 VM 的好處

Page 32: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

使⽤用 VM 的好處• Isolated

Page 33: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

使⽤用 VM 的好處• Isolated

• Repeatable

Page 34: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

使⽤用 VM 的好處• Isolated

• Repeatable

• Local (i.e. Fast)

Page 35: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

使⽤用 VM 的好處• Isolated

• Repeatable

• Local (i.e. Fast)

• Host-OS agnostic

Page 36: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

使⽤用 VM 的好處• Isolated

• Repeatable

• Local (i.e. Fast)

• Host-OS agnostic

• Anyone can do it (Faster on-boarding)

Page 37: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

使⽤用 VM 的好處• Isolated

• Repeatable

• Local (i.e. Fast)

• Host-OS agnostic

• Anyone can do it (Faster on-boarding)

• Less bugs

Page 38: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Vagranthttp://www.vagrantup.com/

Page 39: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
Page 40: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Vagrant• Vagrant uses VirtualBox to build configurable,

lightweight, and portable virtual machines dynamically

• Open Source: MIT license

• It support more providers recently:

• VMware Fusion

• AWS EC2

• Rackspace

Page 41: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

The creator

• Mitchell Hashimoto

• 從 2010 年開始

• 2012/11 成⽴立 Hashicorp 公司作商業⽀支持,並提供更多(付費) Providers,包括 VMware Fusion, Workstation 和 vSphere 等等。

Page 42: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Who use it?• Mozilla, Firefox

• BBC News

• New York Times

• Openstack

• NOKIA

• Livingsocial

• yammer

• shopify

• disqus

• eventbrite

• ngmoco

Page 43: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

安裝 Vagrant

• 下載安裝 Virtualbox

• 下載安裝 Vagrant

• ⽀支援 Windows, Mac, Linux

Page 44: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
Page 45: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
Page 46: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Warning for Ruby developers

• Vagrant 1.1+ 之後不⽤用 rubygems 安裝了

• 主要理由: For non-rubyist

• http://mitchellh.com/abandoning-rubygems

Page 47: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

從現有的專案開 VM

• git clone git://github.com/eduvo/pair_tdd_get_started.git

• vagrant up

• 可以開始寫 Ruby 了

Page 48: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Live Demo請不要在會場做

第⼀一次跑需要下載 VM image, 306mb

Page 49: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

新開⼀一個 Ubuntu VM

• vagrant box add precise64http://files.vagrantup.com/precise64.box

• mkdir my_box

• cd my_box

• vagrant init precise64

• vagrant up

Page 50: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Demo真的,請不要在會場做

第⼀一次跑需要下載 VM image, 306mb

Page 51: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

VM Lifecycle(基本指令)

• vagrant up 開機

• vagrant ssh 登⼊入

• vagrant suspend 暫停

• vagrant halt 關機

• vagrant destroy 刪除

Page 52: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Vagrantfile

• Vagrant 是 project-oriented

• 每個專案都有 Vagrantfile 設定檔

• Ruby DSL 語法,不會 Ruby 也很簡單

Page 53: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Vagrant.configure("2") do |config|

config.vm.box = "precise64"

# 如果找不到上述的 box 檔案,從下列網址下載 config.vm.box_url = "http://files.vagrantup.com/precise64.box" end

最基本的 Vagrantfile

Page 54: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Base Boxes

• 開 VM 的基本 image

• box 是⼀一個檔案

• Vagrant 是 project-oriented,在 project 裡⾯面玩,不影響 Box。

• 官⽅方有包 Ubuntu 10.04/12.04, 32bit/64bit for VirtualBox 的 boxes

• 更多第三⽅方 http://vagrantbox.es

Page 55: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩
Page 56: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Box 指令

• vagrant box list 列出

• vagrant box add 新增

• vagrant box remove 刪除

Page 57: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

進階功能• Shared Folder

• Networking

• Provisioning

• Packaging

• Multi-VM

• More providers via plugins

Page 58: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Host OS

Guest VM Guest VM Guest VM

Host OS v.s. Guest VM

Page 59: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

How to Work in a VM?

Page 60: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Shared folderconfig.vm.share_folder "foo", "/guest/path", "/host/path", :nfs => true

Page 61: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Shared folder

• 在 host 和 guest 之間共享檔案

config.vm.share_folder "foo", "/guest/path", "/host/path", :nfs => true

Page 62: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Shared folder

• 在 host 和 guest 之間共享檔案

• 例如開發⽤用 Editor 在 host 跑,但是程式是在 guest 裡執⾏行

config.vm.share_folder "foo", "/guest/path", "/host/path", :nfs => true

Page 63: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Shared folder

• 在 host 和 guest 之間共享檔案

• 例如開發⽤用 Editor 在 host 跑,但是程式是在 guest 裡執⾏行

• 預設 guest 裡的 /vargant 就是專案⺫⽬目錄

config.vm.share_folder "foo", "/guest/path", "/host/path", :nfs => true

Page 64: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Shared folder

• 在 host 和 guest 之間共享檔案

• 例如開發⽤用 Editor 在 host 跑,但是程式是在 guest 裡執⾏行

• 預設 guest 裡的 /vargant 就是專案⺫⽬目錄

• VirtualBox shared folder 效能差,Vagrant ⽀支援 NFS

config.vm.share_folder "foo", "/guest/path", "/host/path", :nfs => true

Page 65: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Demo在 Host OS 裡編輯,在 Guest VM 裡⾯面執⾏行

Page 66: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Networking以下三種可以依照需求選擇使⽤用,都⽤用也可以

• Port forwarding

• Host-only networking

• Bridged Networding

Page 67: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Port forwarding

• 設定 host 某個 port 對應到 guest 的某個 port

• 例如 host 8080 對應到 guest 80

• 最簡單

config.vm.network :forwarded_port, guest: 80, host: 8080

Page 68: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Host-only networking

• 指定⼀一個 IP

• Gust VMs 之間可以互通

• Local only,只有本機可以存取

• 最好⽤用,⼜又安全• 缺點: 可能會跟外部 IP 撞到

config.vm.network :private_network, ip: "192.168.33.10"

Page 69: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Bridge Networking

• 將 VM 橋接到 Host OS 上的網路 device

• ⽤用 DHCP 拿⼀一個 IP

• 優點: LAN 上的其他電腦也可以存取

• 缺點: 不總是 works,會依賴 Router,例如飯店或 public wifi

config.vm.network :public_network

Page 70: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Demo在 Guest VM 裡開 Web Server在 Host OS 外⽤用瀏覽器讀取

Page 71: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Provisioning

Page 72: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Server provisioning

Page 73: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Server provisioning

• Server provisioning is a set of actions to prepare a server with appropriate systems, data and software, and make it ready for network operation. (from wikipedia)

Page 74: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Server provisioning

• Server provisioning is a set of actions to prepare a server with appropriate systems, data and software, and make it ready for network operation. (from wikipedia)

• 就是裝 server 啦

Page 75: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Old-schoolI’m System Administrator

Page 76: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Old-schoolI’m System Administrator

• 寫⽂文件,照著作

Page 77: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Old-schoolI’m System Administrator

• 寫⽂文件,照著作• "multi-terminal",開⼀一個視窗打指令,同時好幾個 servers 都會執⾏行

Page 78: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Old-schoolI’m System Administrator

• 寫⽂文件,照著作• "multi-terminal",開⼀一個視窗打指令,同時好幾個 servers 都會執⾏行

• 建⽴立 .iso image 以便拷⾙貝新機器

Page 79: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Old-schoolI’m System Administrator

• 寫⽂文件,照著作• "multi-terminal",開⼀一個視窗打指令,同時好幾個 servers 都會執⾏行

• 建⽴立 .iso image 以便拷⾙貝新機器

• 缺點:版本維護

Page 80: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Old-school (cont.)

Page 81: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Old-school (cont.)

• 撰寫 setup shell script

Page 82: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Old-school (cont.)

• 撰寫 setup shell script

• 缺點: shell script 不聰明,不好維護

Page 83: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Old-school (cont.)

• 撰寫 setup shell script

• 缺點: shell script 不聰明,不好維護• 再跑⼀一次會裝第⼆二次

Page 84: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Old-school (cont.)

• 撰寫 setup shell script

• 缺點: shell script 不聰明,不好維護• 再跑⼀一次會裝第⼆二次

• 套件之間的 dependency 關係

Page 85: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Old-school (cont.)

• 撰寫 setup shell script

• 缺點: shell script 不聰明,不好維護• 再跑⼀一次會裝第⼆二次

• 套件之間的 dependency 關係

• 套件的設定檔要如何管理?

Page 86: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Modern provisioningI’m DevOps

Page 87: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Modern provisioningI’m DevOps

• 利⽤用 Configuration Management tools

Page 88: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Modern provisioningI’m DevOps

• 利⽤用 Configuration Management tools

• Chef

Page 89: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Modern provisioningI’m DevOps

• 利⽤用 Configuration Management tools

• Chef

• Puppet

Page 90: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Modern provisioningI’m DevOps

• 利⽤用 Configuration Management tools

• Chef

• Puppet

• CFEngine

Page 91: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Modern provisioningI’m DevOps

• 利⽤用 Configuration Management tools

• Chef

• Puppet

• CFEngine

• 撰寫 recipe (Chef) 或 manifest (Puppet) 設定要裝什麼東⻄西

Page 92: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Modern provisioningI’m DevOps

• 利⽤用 Configuration Management tools

• Chef

• Puppet

• CFEngine

• 撰寫 recipe (Chef) 或 manifest (Puppet) 設定要裝什麼東⻄西

• receipt 和 manifests 可以重複執⾏行,保持 server 到最新版。不會發⽣生重裝第⼆二遍的情形。

Page 93: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Modern provisioningI’m DevOps

Page 94: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Modern provisioningI’m DevOps

• 易於設定 dependencies

Page 95: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Modern provisioningI’m DevOps

• 易於設定 dependencies

• 易於除錯

Page 96: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Modern provisioningI’m DevOps

• 易於設定 dependencies

• 易於除錯• 版本控制

Page 97: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Modern provisioningI’m DevOps

• 易於設定 dependencies

• 易於除錯• 版本控制• 社群及商業⽀支援,不需要全部⾃自⼰己寫

Page 98: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Vagrant ⽀支援⽅方便 DevOps 測試 Recipe

• shell

• Chef

• Puppet

• CFEngine

Page 99: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Vagrantfile Example

config.vm.provision :chef_solo do |chef| chef.cookbooks_path = "./cookbooks" chef.add_recipe "nginx" chef.json = { :nginx => { :worker_processes => "4" } } end

Page 100: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Chef Examplepackage "nginx"

service "nginx" do supports :status => true, :restart => true, :reload => true action [:enable, :start]end

template "/etc/nginx/nginx.conf" do source "nginx.conf.erb" notifies :reload, "service[nginx]"end

Page 101: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Demo修改 nginx template,再次 provision

Server 就會套⽤用並重開 nginx

Page 102: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Packaging

Page 103: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

將⺫⽬目前的 VM 打包成 Box

• vagrant package 產⽣生 package.box 檔案

• vagrant box add <name> package.box

• 使⽤用時機• Package up installed software

• Use provisioners for configuration and managing services

Page 104: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Multi-VM

Page 105: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Multi-VM

• 同⼀一個 Vagrantfile 可以設定多個 VM

• vagrant up 就會同時開起來

• 適合 distributed 和 SOA 開發環境• ⼀一台 Web server

• 多台 Application servers

• ⼀一台 Database server

Page 106: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Vagrantfile example指定IP,VMs 之間也可以互通

Vagrant.configure("2") do |config|

config.vm.define :web do |web| web.vm.box = "precise64" web.vm.network :private_network, :ip => "192.168.33.11" end

config.vm.define :app do |app| app.vm.box = "precise64" app.vm.network :private_network, :ip => "192.168.33.12" end

config.vm.define :db do |db| db.vm.box = "precise64" db.vm.network :private_network, :ip => "192.168.33.13" end

end

Page 107: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Demo⼀一次開三台 VMs!

Page 108: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

More providersvia plugins

Page 109: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

VMware Fusion

• 更快• 更穩定• 需付費購買

Page 110: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

AWS

• 同樣的 vagrant up 指令,可以開 VM 在 EC2 或 VPC 上

• 使⽤用情境:

• 可以開運算能⼒力的 EC2 機器作開發或測試運算

• 可以開真正 production 使⽤用的機器作測試

• 從開發、staging 到 production,都⽤用 vagrant 開 VM 管理

• 無論 providers,Vagrantfile 皆共⽤用

Page 111: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Demovagrant up --provider=vmware_fusion

vagrant up --provider=aws

Page 112: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Conclusion使⽤用情境

Page 113: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Conclusion使⽤用情境

• DevOps 開發和測試 Chef/Puppet/etc. scripts

Page 114: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Conclusion使⽤用情境

• DevOps 開發和測試 Chef/Puppet/etc. scripts

• WebDev 可以使⽤用上述 DevOps 開發的 scripts 安裝出⾮非常接近 production 的開發環境

Page 115: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Conclusion使⽤用情境

• DevOps 開發和測試 Chef/Puppet/etc. scripts

• WebDev 可以使⽤用上述 DevOps 開發的 scripts 安裝出⾮非常接近 production 的開發環境

• QA 測試⼯工程師可以使⽤用 CI 搭配 Vagrant 來建構⾃自動化的部署測試、⼤大規模的 test environment 等等

Page 116: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

Vagrant 讓整個 workflow 從 dev 到 production 變的⼀一致好⽤用

Page 117: A brief introduction to Vagrant – 原來 VirtualBox 可以這樣玩

謝謝!Thank you!

(對 Vagrant 或 Chef 有問題歡迎來 Faria 攤位找我們的 DevOps: Vincent)