Professional Documents
Culture Documents
L01C - Vagrant
L01C - Vagrant
www.cognixia.com
www.cognixia.com
Vagrant Overview
www.cognixia.com
Uses of Vagrant
www.cognixia.com
Uses of Vagrant
• For Developers
• If you are a developer, Vagrant will isolate dependencies and their
configuration within a single disposable, consistent environment, without
sacrificing any of the tools you are used to working with (editors, browsers,
debuggers, etc.).
• For Operators
• If you are an operations engineer or DevOps engineer, Vagrant gives you a
disposable environment and consistent workflow for developing and
testing infrastructure management scripts
• For Designers
• If you are a designer, Vagrant will automatically set everything up that is
required for that web app in order for you to focus on doing what you do
best: design
www.cognixia.com
Alternatives to Vagrant
• Docker
• Kubernetes
• Nanobox
• Apache Mesos
• virt-manager
• Stakkr
• Singularity Container
• Fig
• FreeBSD Jails
• BoxGrinder
• Arkose
• Datacol
• plash
www.cognixia.com
Vagrant Versions
www.cognixia.com
Installing Vagrant
• Before we start with Vagrant we need to install Virtual Box as Vagrant uses it to run the
virtual machines
• Download VirtualBox from https://www.virtualbox.org/wiki/Downloads
• Next download and install Vagrant
• Go to https://www.vagrantup.com/downloads.html
• And get the appropriate installer or package for your platform
• Install the package using standard procedures for your operating system
www.cognixia.com
Setting up Vagrant
• Once you have vagrant on your machine, open the terminal (Linux or Mac) or command
prompt (Windows)
• Create a separate directory for vagrant and initialise a vagrantfile
mkdir my_vagrant
cd my_vagrant
vagrant init
www.cognixia.com
Setting up Vagrant
• After creating a new Vagrantfile, specifying the box to use for your Vagrant environment
is always the first step
• Instead of building a virtual machine from scratch, which would be a slow and tedious
process, Vagrant uses a base image to quickly clone a virtual machine
• These base images are known as boxes in Vagrant, we will use centos box
• Start the VM and access it using ssh using Putty or Oracle VM Virtualbox
www.cognixia.com www.cognixia.com