Introducing Vagrant

Have you ever heard the following? "Welcome to the team! Here's a list of 15 applications to install, the instructions are in the team room, somewhere. See you in a week!" Or: "What do you mean it broke production, it runs fine on my machine?" Or: "Why is this working on her machine and his machine, but not my machine?"
Development environments are becoming more complex, with more moving parts and tricky dependencies. Virtualization has been a huge boon for the IT industry in saving costs, increasing flexibility and maintaining control over complex environments. Rather than focusing on virtualization on the delivery side, let's look at how you can provide that flexibility and control to developers to manage multiple development environments easily using Vagrant.
What Is Vagrant?
Vagrant is an open-source (MIT) tool for building and managing virtualized development environments developed by Mitchell Hashimoto and John Bender. Vagrant manages virtual machines hosted in Oracle VirtualBox, a full x86 virtualizer that is also open source (GPLv2).
A virtual machine is a software implementation of a computer, running a complete operating system stack on a virtualizer. It is a full implementation of a computer with a virtual disk, memory and CPU. The machine running the virtualizer is the Host system. The virtual machine running on the virtualizer is the Guest system. As far as the Guest operating system is concerned, it is running on real hardware. From the perspective of the Host, all of the Guest's resources are used by the virtualizer program. A Box, or base image, is the prepackaged virtual machine that Vagrant will manage.
Installing Vagrant
Starting in version 1.0, Vagrant provides two installation methods: packaged installers for supported platforms or a universal install with Ruby Gems. This article covers installation using Gems. This method has three parts: 1) install VirtualBox, 2) install Ruby and 3) install Vagrant itself.
VirtualBox is available from the VirtualBox home page with builds for Windows, OS X, Linux and Solaris. Note that Oracle provides the Oracle VM VirtualBox Extension Pack on the Download site that provides additional features to the virtualizer. The Extension Pack has a separate license (Personal Use and Evaluation License) and is not needed to use Vagrant, but if the Box you are using was created using the Extension Pack, you will need to install the Extension Pack as well.
Ruby is a popular dynamically typed object-oriented scripting language. Ruby is available out of the box in OS X, and most Linux distributions also have a Ruby package available. For Windows users, the RubyInstaller Project provides an easy way to install the Ruby runtime.
Ruby libraries and applications are available in packages called RubyGems or Gems. Ruby comes with a package management tool called gem. To install Vagrant, run the gem command:
> gem install vagrant
Vagrant is a command-line tool. Calling vagrant without additional
arguments will provide the list of available arguments. I'll visit most of
these commands within this article, but here's a quick overview:
-
init— create the base configuration file. -
up— start a new instance of the virtual machine. -
suspend— suspend the running guest. -
halt— stop the running guest, similar to hitting the power button on a real machine. -
resume— restart the suspended guest. -
reload— reboot the guest. -
status— determine the status of vagrant for the current Vagrantfile. -
provision— run the provisioning commands. -
destroy— remove the current instance of the guest, delete the virtual disk and associated files. -
box— the set of commands used to add, list, remove or repackage box files. -
package— used for the creation of new box files. -
ssh—sshto a running guest.
The last thing you need to do in your installation is set up a base image. A
Box, or base image, is the prepackaged virtual machine that Vagrant will
manage. Use the box command to add the Box to your environment.
The vagrant box add command takes two arguments, the
name you use to refer to the Box and
the location of the Box:
> vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
This command adds a new Box to the system called "lucid32" from a remotely hosted site over HTTP. Vagrant also will allow you to install a Box from the local filesystem:
> vagrant box add rhel5.7 rhel5.7-20120120-1223.box
[vagrant] Downloading with Vagrant::Downloaders::File...
[vagrant] Copying box to temporary location...
[vagrant] Extracting box...
[vagrant] Verifying box...
[vagrant] Cleaning up downloaded box...
>
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Sponsored by AMD
If you already use virtualized infrastructure, you are well on your way to leveraging the power of the cloud. Virtualization offers the promise of limitless resources, but how do you manage that scalability when your DevOps team doesn’t scale? In today’s hypercompetitive markets, fast results can make a difference between leading the pack vs. obsolescence. Organizations need more benefits from cloud computing than just raw resources. They need agility, flexibility, convenience, ROI, and control.
Stackato private Platform-as-a-Service technology from ActiveState extends your private cloud infrastructure by creating a private PaaS to provide on-demand availability, flexibility, control, and ultimately, faster time-to-market for your enterprise.
Sponsored by ActiveState
Free Webinar: Hadoop
How to Build an Optimal Hadoop Cluster to Store and Maintain Unlimited Amounts of Data Using Microservers
Realizing the promise of Apache® Hadoop® requires the effective deployment of compute, memory, storage and networking to achieve optimal results. With its flexibility and multitude of options, it is easy to over or under provision the server infrastructure, resulting in poor performance and high TCO. Join us for an in depth, technical discussion with industry experts from leading Hadoop and server companies who will provide insights into the key considerations for designing and deploying an optimal Hadoop cluster.
Some of key questions to be discussed are:
- What is the “typical” Hadoop cluster and what should be installed on the different machine types?
- Why should you consider the typical workload patterns when making your hardware decisions?
- Are all microservers created equal for Hadoop deployments?
- How do I plan for expansion if I require more compute, memory, storage or networking?
| Non-Linux FOSS: libnotify, OS X Style | Jun 18, 2013 |
| Containers—Not Virtual Machines—Are the Future Cloud | Jun 17, 2013 |
| Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer | Jun 12, 2013 |
| Weechat, Irssi's Little Brother | Jun 11, 2013 |
| One Tail Just Isn't Enough | Jun 07, 2013 |
| Introduction to MapReduce with Hadoop on Linux | Jun 05, 2013 |
- Containers—Not Virtual Machines—Are the Future Cloud
- Non-Linux FOSS: libnotify, OS X Style
- Lock-Free Multi-Producer Multi-Consumer Queue on Ring Buffer
- Linux Systems Administrator
- RSS Feeds
- Introduction to MapReduce with Hadoop on Linux
- Validate an E-Mail Address with PHP, the Right Way
- New Products
- Weechat, Irssi's Little Brother
- Tech Tip: Really Simple HTTP Server with Python
- Poul-Henning Kamp: welcome to
23 min 32 sec ago - This has already been done
24 min 32 sec ago - Reply to comment | Linux Journal
1 hour 9 min ago - Welcome to 1998
1 hour 58 min ago - notifier shortcomings
2 hours 21 min ago - heroku?
3 hours 58 min ago - Android User
4 hours 28 sec ago - Reply to comment | Linux Journal
5 hours 53 min ago - compiling
8 hours 43 min ago - This is a good post. This
13 hours 56 min ago



Comments
China may still be a
China may still be a developing country, but the Chinese people have kept up with the fashion and culture of the modern world. While you may still find people in China who regularly wear Mao jackets, tunics and loose traditional-style trousers, the vast majority of people in China dress similarly to people in Western countries in jeans, t-shirts and business suits. Qipao (Mandarin) or cheongsam (Cantonese), the ancient style of long women's formal gowns, are still worn but only during formal occasions or by hostesses in upscale restaurants and hotels. Chinese Dress
Buggy so far...
My experience with Vagrant has been pretty awkward, to say the least.
At first it was working great, but then after a few days using I started to get timeouts and was unable to do the provision without timing out.
Ruby's not a scripting
Ruby's not a scripting language, it's a dynamic language.
RE
I hate it when multiple persons work on the same piece of code, it always takes a lot of guesswork to see who made which error and when...
------
Zorgverzekeringvergelijkenstudenten.nl