mastering vagrant in 1 hour

17
MASTERING VAGRANT IN 1 HOUR [email protected]

Upload: bien-hoang-giang

Post on 16-Jan-2017

45 views

Category:

Software


0 download

TRANSCRIPT

Page 1: Mastering vagrant  in 1 hour

MASTERING VAGRANT IN 1 HOUR

[email protected]

Page 2: 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

Page 3: Mastering vagrant  in 1 hour

Before Vagrant ComeDevelopment Team

Page 4: Mastering vagrant  in 1 hour

Before Vagrant Come

Page 5: Mastering vagrant  in 1 hour

Before Vagrant Come

It’s Work On My PC, Why??????

Page 6: Mastering vagrant  in 1 hour

And Vagrant Come

vagrant upSave the world !!!

Page 7: Mastering vagrant  in 1 hour

What the fuck is a Vagrant?

Page 8: Mastering vagrant  in 1 hour

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

Page 9: Mastering vagrant  in 1 hour

What the fuck Vagrant really do?

Page 10: Mastering vagrant  in 1 hour

Time to explain

Page 11: Mastering vagrant  in 1 hour

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

Page 12: Mastering vagrant  in 1 hour

Time to practice

Page 13: Mastering vagrant  in 1 hour

Let’s do the things belowUnderstand vagrant box

How to get the box

Vagrant box manage

Init vagrant Virtual Machine

Understand basic configuration

Page 14: Mastering vagrant  in 1 hour

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

Page 15: Mastering vagrant  in 1 hour

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

Page 16: Mastering vagrant  in 1 hour

Share your box- Vagrant package --help

Page 17: Mastering vagrant  in 1 hour

Thank for listening