Introduction to Versioning Environments With Vagrant

In this course, you'll learn everything necessary to create virtual environments, version the definition of the environments, and start reaping the benefits of Vagrant for developing and supporting software systems.
Course info
Rating
(235)
Level
Intermediate
Updated
Oct 2, 2014
Duration
4h 19m
Table of contents
Why Vagrant?
Test Drive Vagrant
Web Development Environment and Vagrant Fundamentals
Creating a Hubot Environment
Hubot in the Cloud
Windows Guests
Local Development Databases
Description
Course info
Rating
(235)
Level
Intermediate
Updated
Oct 2, 2014
Duration
4h 19m
Description

Partitioning and automating the creation of environments and incorporating them into development workflows can be immensely valuable. But, historically it's been so much work it has rarely been worth the effort. That's no longer the case, thanks to Vagrant. With Vagrant, you'll know what software is necessary for a project, including software versions and configuration; you will have a history of why, when, who, and how this software was incorporated; you will eliminate surprises by developing in an environment similar to production; and be able to safely create and test scripts to automate the setup of environments. This will help you get projects up and running quickly and effectively onboard new team members. In this course, you'll learn everything necessary to start reaping the benefits of Vagrant for developing and supporting software systems.

About the author
About the author

Wes Higbee is passionate about helping companies achieve remarkable results with technology and software. He’s had extensive experience developing software and working with teams to improve how software is developed to meet business objectives. Wes launched Full City Tech to leverage his expertise to help companies delight customers.

More from the author
What Is DevOps: Executive Briefing
Beginner
22m
Nov 2, 2018
Implementing a Self-hosted Docker Registry
Intermediate
4h 8m
Jun 5, 2018
Webpack: Transpiling and Bundling JavaScript
Intermediate
4h 55m
Jan 30, 2018
More courses by Wes Higbee
Section Introduction Transcripts
Section Introduction Transcripts

Test Drive Vagrant
I know that introduction seems pretty farfetched. Let's take Vagrant for a spin and make this a reality. As I mentioned one of the benefits of Vagrant is that it abstracts virtualization, so we're going to need a hypervisor to run virtual machines. Out of the box Vagrant works with VirtualBox, a free cross platform open source virtualization product from Oracle. To download Vagrant go to the official Vagrant download page at vagrantup. com. Historically Vagrant was installed as a Ruby gem, though that's no longer the preferred approach. You want to use one of the provided installers as it packages everything including its own Ruby environment. This will help avoid installation headaches, and for VirtualBox visit virtualbox. org and click downloads. We could download these packages directly and install them, but in the spirit of automation let's install these tools via the command line. To demonstrate the flexibility of Vagrant I'll show you how to install it in Windows, Mac and Ubuntu environments.

Web Development Environment and Vagrant Fundamentals
With a taste of the possibilities that Vagrant brings to the table let's dive in and learn a little more. In this module we're going to learn more about the fundamentals of Vagrant. We'll build a new environment and this time we'll use something closer to home. We'll build an environment that allows us to host websites with NGINX. If you do web development with NGNX, or any number of alternatives like Apache, IAS, Tomcat, or otherwise, you know that developing an environment unlike production can be problematic. At a minimum you'll have configuration issues when you release to production. What if you could develop in an environment that was a clone of production, or pretty close to it? Even if you're development machine is completely different and what if the configuration of NGINX, or another webserver were entirely scripted, instead of in an outdated read me file, or worse locked away in someone's mind. What if this script were checked into version control and anyone else could clone the repository and spin up the exact same environment, even if they preferred using say OSX instead of Windows. Any developer could make changes with the tools they love and test the site with NGINX running inside an Ubuntu VM. The same environment every other developer tests with, they'd even be able to run the site in whatever browser they like on their own development machine. That's what we're going to set up in this module. We're going to look at how we can use Vagrant to maintain a reusable, predictable development environment.

Windows Guests
We've gone through a ton of great examples of working with Vagrant. So far they've all been based on Ubuntu. Vagrant doesn't just support Linux Guests, it also supports MAC OS and Windows Guests too. In this module were going to talk about how to get to up and running with a Windows Guest VM. Developing ASP. NET applications is one of those areas where it's hard to test in an environment like we'll have in production. Especially, if you have to deal with various different versions of Windows servers; anything 2003 thru 2008, and 2012, not to mention the R2 releases. Add in versions of IIS from 6 through to 8. 5 and we've got our work cut out. This variance isn't going to go away any time soon. Add in the. NET development environments are often built on the Client SKUs, Windows 7 and 8, maybe even XP, and it's about impossible to replicate the server environment. And with these Client SKUs many server side frameworks aren't even available. Having a test environment closer to production can be a huge benefit to ASP. NET development on Windows. In this module we're going to launch a Windows guest with Windows server 2012. We'll install web deploy, and setup IIS. And then we'll use this server to test a sample ASP. NET MVC application. And then in our second example we'll take advantage of easily creating Windows server to play around with the new PowerShell 4 desired state configuration. Along the way we'll talk about differences in working with Windows guests, how to find existing Windows boxes, and how to create Windows boxes with Packer, specifically, how to use Packer-Windows templates.