Discover why Vagrant is a must-have tool for thousands of developers and ops engineers. This hands-on guide shows you how to use this open source software to build a virtual machine for any purpose—including a completely sandboxed, fully provisioned development environment right on your desktop.
Vagrant creator Mitchell Hashimoto shows you how to share a virtual machine image with members of your team, set up a separate virtualization for each project, and package virtual machines for use by others. This book covers the V1 (1.0.x) configuration syntax running on top of a V2 (1.1+) core, the most stable configuration format running on the latest core.
- Build a simple virtual machine with just two commands and no configuration
- Create a development environment that closely resembles production
- Automate software installation and management with shell scripts, Chef, or Puppet
- Set up a network interface to access your virtual machine from any computer
- Use your own editor and browser to develop and test your applications
- Test complicated multi-machine clusters with a single Vagrantfile
- Change Vagrant’s default operating system to match your production OS
- Extend Vagrant features with plugins, including components you build yourself
Table of contents
1. An Introduction to Vagrant
- Why Vagrant?
- The Tao of Vagrant
- Alternatives to Vagrant
- Vagrant Versions
- Setting Up Vagrant
- Using Vagrant Without VirtualBox
- 2. Your First Vagrant Machine
3. Provisioning Your Vagrant VM
- Why Automated Provisioning?
- Supported Provisioners
- Manually Setting Up Apache
- Automated Provisioner Basics
- Multiple Provisioners
- “No Provision” Mode
- In-Depth Provisioner Usage
- What’s Next?
4. Networking in Vagrant
- Forwarded Ports
- Host-Only Networking
- Bridged Networking
- Composing Networking Options
- NAT Requirement As the First Network Interface
- What’s Next?
- 5. Modeling Multimachine Clusters
- Why Boxes?
- Box Format
- Basic Box Management with Vagrant
- Creating New Boxes from an Existing Environment
- Creating New Boxes from Scratch
- What’s Next?
7. Extending Vagrant with Plug-Ins
- Extensible Features
- Managing Vagrant Plug-Ins
- Plug-In Development Basics
- A Basic Plug-In Development Environment
- Developing a Custom Command
- Adding New Configuration Options
- Adding a Custom Provisioner
- Modifying Existing Vagrant Behavior
- Other Plug-In Components
- Packaging the Plug-In
- A. Vagrant Environmental Variables
- B. Vagrant Configuration Reference
- C. Troubleshooting and Debugging
- About the Author
- Title: Vagrant: Up and Running
- Release date: June 2013
- Publisher(s): O'Reilly Media, Inc.
- ISBN: 9781449335830
You might also like
Head First Design Patterns, 2nd Edition
You know you don’t want to reinvent the wheel, so you look to design patterns—the lessons …
Kubernetes: Up and Running, 2nd Edition
Kubernetes radically changes the way applications are built and deployed in the cloud. Since its introduction …
Head First Go
What will you learn from this book? Go makes it easy to build software that’s simple, …
Prometheus: Up & Running
Get up to speed with Prometheus, the metrics-based monitoring system used by tens of thousands of …