Vagrant
Vagrant Overview :
• Vagrant is a computer software for creating and configuring virtual development environments
• It can be seen as a wrapper around virtualization software such as VirtualBox, KVM, VMware and around configuration management software such as Ansible, Chef, Salt or Puppet
• Vagrant is a simpler way for Virtualization and Configuration Management.
Uses of Vagrant :
• Vagrant is used to set up one or more virtual machines by:
• Importing pre-made images (called "boxes")
• Setting VM-specific settings (IP address, hostnames, port forwarding, memory, etc.)
• Running provisioning software like Puppet or Chef
• Set Up Multi-VM Networks with Ease
• Source Control
• Various Platforms
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
Alternatives to Vagrant :
• Docker
• Kubernetes
• Nanobox
• Apache Mesos
• virt-manager
• Stakkr
• Singularity Container
• Fig
• FreeBSD Jails
• BoxGrinder
• Arkose
• Datacol
• plash
Vagrant Versions : Vagrant has installers for:
• Debian
• Windows
• CentOS
• Linux
• macOS
• Arch Linux
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
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
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
vagrant box add centos-6.5
vagrant up
Comments
Post a Comment