36. PROVISIONING
Provisioners in Vagrant allow you to automatically install
software, alter configurations, and more on the machine
as part of the vagrant up process.
Provisioners
File
Shell
Ansible
CFEngine
Chef Solo
Chef Client
Chef Apply
Docker
Puppet Apply
Puppet Agent
Salt
38. SHELL PROVISIONING
$script = <<SCRIPT
echo I am provisioning...
date > /etc/vagrant_provisioned_at
SCRIPT
Vagrant.configure("2") do |config|
...
config.vm.provision "shell", inline: $script
...
end
43. VAGRANT-VBOX-SNAPSHOT
Sub Commands
back
vagrant snapshot back [vm-name]
delete
vagrant snapshot delete [vm-name] <SNAPSHOT_NAME>
go
vagrant snapshot go [vm-name] <SNAPSHOT_NAME>
list
vagrant snapshot list
take
vagrant snapshot take [vm-name] <SNAPSHOT_NAME>
51. REFERENCE
Vagrant
https://www.vagrantup.com/
Atlas by HashiCorp
https://atlas.hashicorp.com/
Vagrant - Create and configure lightweight, reproducible,
and portable development environments - Level Up- 點
部落
http://www.dotblogs.com.tw/larrynung/archive/2013/06/14/1055
17.aspx
Vagrant - VBox Snapshot - Level Up
http://larrynung.github.io/2015/10/19/vagrant-vbox-snapshot/
51
52. REFERENCE
Vagrant - Creating a new box from an existing VM -
Level Up
http://larrynung.github.io/2015/10/17/vagrant-creating-a-new-
box-from-an-existing-vm/
Vagrant - SSH in windows - Level Up
http://larrynung.github.io/2014/10/02/vagrant-ssh-in-windows/
Vagrant (software) - Wikipedia, the free encyclopedia
https://en.wikipedia.org/wiki/Vagrant_(software)
52