Vagrant for Devops
By Deepanshu
(@deep0x00)
What is vagrant ?
● Open source tool for creating virtual test
evironments
● Written in ruby by Mitchell Hashimoto
● Wrapper over traditional Virtualization Software
like virtualbox, etc
● Provides CLI to manage VM
How to install vagrant ?
● Download and Install Virtualbox
https://www.virtualbox.org/wiki/Downloads
● Download and Install Vagrant
https://www.vagrantup.com/downloads.html
Done :)
Few Basic Terminologies
● Box
● Vagrantfile
● Halt
● Ssh
● destroy
DEMO 1
Setting VM regular way
VS
Using Vagrant
Problem
Setting up VM regular way
Solution
Is
Vagrant
Setting up VM using vagrant
● Mkdir ubuntuV
● Cd ubuntuV
● Vagrant init
● Gedit Vagrantfile
● Vagrant up
Problem Solved !!
Why Vagrant ?
● Lowers setup time
● Easy and quick to use
● Eliminate works on my machine excuse
● Command line tool
More intermediate concepts
● Synced Folder - Allows vagrant to share files
between Host computer and the vagrant box
● Provisioning – Allows to automatically run
some script after virtual machine is installed
● Multi machine – Allows to create multiple VM
with same Vagrantfile
Demo 2
shell script which uses the
provisioning option in the Vagrantfile
to install apache
My incomplete website running from
provisioned vagrant box
Demo 3
Multiple machines are defined within
the same project Vagrantfile
Via config.vm.define
Deployed 4 vagrant boxes in less
than 10 mins !!
Creating your own boxes
● vewee - Automated way of creating virtualboxes
● It also supports Virtualbox,VMWare fusion
Whats next?
● Currently I am working on combining Vagrant
with Virtual LTSP server
● Vagrant advantage is easy and quick to deploy
● LTSP allows computers of a LAN to boot
through network from a single server
● Combining these 2 would definitely be a cool
project
Thats all folks..
Question time..!
Thank you

Vagrantfordevops

  • 1.
    Vagrant for Devops ByDeepanshu (@deep0x00)
  • 2.
    What is vagrant? ● Open source tool for creating virtual test evironments ● Written in ruby by Mitchell Hashimoto ● Wrapper over traditional Virtualization Software like virtualbox, etc ● Provides CLI to manage VM
  • 3.
    How to installvagrant ? ● Download and Install Virtualbox https://www.virtualbox.org/wiki/Downloads ● Download and Install Vagrant https://www.vagrantup.com/downloads.html Done :)
  • 4.
    Few Basic Terminologies ●Box ● Vagrantfile ● Halt ● Ssh ● destroy
  • 6.
    DEMO 1 Setting VMregular way VS Using Vagrant
  • 7.
  • 8.
  • 9.
    Setting up VMusing vagrant ● Mkdir ubuntuV ● Cd ubuntuV ● Vagrant init ● Gedit Vagrantfile ● Vagrant up
  • 10.
  • 11.
    Why Vagrant ? ●Lowers setup time ● Easy and quick to use ● Eliminate works on my machine excuse ● Command line tool
  • 12.
    More intermediate concepts ●Synced Folder - Allows vagrant to share files between Host computer and the vagrant box ● Provisioning – Allows to automatically run some script after virtual machine is installed ● Multi machine – Allows to create multiple VM with same Vagrantfile
  • 13.
    Demo 2 shell scriptwhich uses the provisioning option in the Vagrantfile to install apache
  • 14.
    My incomplete websiterunning from provisioned vagrant box
  • 15.
    Demo 3 Multiple machinesare defined within the same project Vagrantfile Via config.vm.define
  • 17.
    Deployed 4 vagrantboxes in less than 10 mins !!
  • 18.
    Creating your ownboxes ● vewee - Automated way of creating virtualboxes ● It also supports Virtualbox,VMWare fusion
  • 19.
  • 20.
    ● Currently Iam working on combining Vagrant with Virtual LTSP server ● Vagrant advantage is easy and quick to deploy ● LTSP allows computers of a LAN to boot through network from a single server ● Combining these 2 would definitely be a cool project
  • 21.
  • 22.
  • 23.