mastering vagrant in 1 hour
TRANSCRIPT
MASTERING VAGRANT IN 1 HOUR
About meBien Hoang Giang - Call me Jino :)
Age: 23
Sex: Female
Status: Had a boyfriend
bienhoang@github
bienhoanggiang@twitter
jinohoang1994@facebook
Before Vagrant ComeDevelopment Team
Before Vagrant Come
Before Vagrant Come
It’s Work On My PC, Why??????
And Vagrant Come
vagrant upSave the world !!!
What the fuck is a Vagrant?
Vagrant come from heaven !!!Create and configure lightweight, reproducible, and portable development environments.
Vagrant is write in Ruby and some fucking technology :D
Offers a very simple command-line interface to manage VMs
Supports all major virtual solutions: VirtualBox, VMWare, and Hyper-V
Supports most popular software configuration tools, including Ansible, Chef, Puppet, and Salt
Facilitates procedures to distribute and share virtual environments
What the fuck Vagrant really do?
Time to explain
Vagrant Advantages/Disadvantages
Ad
- Run one command “vagrant up” to setup and run environment
- Save time
- Setup one, run everywhere
- Cross-platform
- Make the real environment for develop and testing.
- Easy to manage Virtual Machine
- Version Control
- Easy to use
Dis
- Need a power PC to run
- Easy to use but difficult to understand and master
Time to practice
Let’s do the things belowUnderstand vagrant box
How to get the box
Vagrant box manage
Init vagrant Virtual Machine
Understand basic configuration
State of Virtual MachineHow to see vagrant machine status?Vagrant global-status
Vagrant status
Machine State- Power off
- Not created
- Running
- Saved
Vagrant Command- Vagrant up
- Vagrant halt
- Vagrant reload
- Vagrant suspend
- Vagrant resume
Provisioning - Let’s ExplainSome type of Provision
- Shell:
Bash script, python, ruby script, shell…
- Server Configuration Manager Tool
Puppet
Ansible
SailStack
Chef
Ex: Shell ScriptConfig.vm.provision “shell”, path: “script.sh/.py”, run: “always”
Ex: AnsibleConfig.vm.provision “ansible”, playbook: “playbook.yml”
Ex: Deal with ProvisionVagrant up/reload --provision “name” / --no-provision
Vagrant provision
Share your box- Vagrant package --help
Thank for listening