Vagrant: Exemplos de Arquivos Vagrantfile: Difference between revisions
No edit summary |
|||
Line 6: | Line 6: | ||
Vagrant.configure("2") do |config| | Vagrant.configure("2") do |config| | ||
config.vm.box = "hashicorp-vagrant/precise64" | config.vm.box = "'''hashicorp-vagrant/precise64'''" | ||
end | end | ||
Line 13: | Line 13: | ||
Vagrant.configure("2") do |config| | Vagrant.configure("2") do |config| | ||
config.vm.box = "hashicorp-vagrant/centos-7.4" | config.vm.box = "'''hashicorp-vagrant/centos-7.4'''" | ||
end | end | ||
Line 25: | Line 25: | ||
Vagrant.configure("2") do |config| | Vagrant.configure("2") do |config| | ||
config.vm.box = "my-box" | config.vm.box = "my-box" | ||
config.vm.provider "virtualbox" do |v| | config.vm.provider "'''virtualbox'''" do |v| | ||
v.gui = true | v.gui = true | ||
v.memory = 1024 | v.memory = 1024 | ||
Line 36: | Line 36: | ||
Vagrant.configure("2") do |config| | Vagrant.configure("2") do |config| | ||
config.vm.box = "my-box" | config.vm.box = "my-box" | ||
config.vm.provider "vmware_desktop" do |v| | config.vm.provider "'''vmware_desktop'''" do |v| | ||
v.gui = true | v.gui = true | ||
end | end |
Revision as of 23:58, 17 September 2018
Escolhendo Diferentes Boxes
hashicorp/precise64
Baseado no Ubuntu 12.04 LTS, distribuição enxuta
Vagrant.configure("2") do |config| config.vm.box = "hashicorp-vagrant/precise64" end
CentOS 7.4
Vagrant.configure("2") do |config| config.vm.box = "hashicorp-vagrant/centos-7.4" end
Providers
Escolhendo o virtualizador que vamos utilizar: Virtual Box, VM Ware Workstation, HyperV
Virtual Box
Vagrant.configure("2") do |config| config.vm.box = "my-box" config.vm.provider "virtualbox" do |v| v.gui = true v.memory = 1024 v.cpus = 2 end end
VM Ware Workstation
Vagrant.configure("2") do |config| config.vm.box = "my-box" config.vm.provider "vmware_desktop" do |v| v.gui = true end end