Synopses & Reviews
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 Vagrants default operating system to match your production OS
- Extend Vagrant features with plugins, including components you build yourself
How does Vagrant boost the productivity of companies such as Mozilla, RackSpace, LivingSocial, and others? This comprehensive guide shows you how to create and distribute virtualized development environments with this powerful open source tool.
While Virtual machines (VMs) are portable and easy to run, due to their isolation from outside interference, many developers and system administrators have shied away from VMs because of the pain of setup and maintenance. With this book, youll learn how to gain the benefits of VMs without the hassle, using Vagrant to create a virtual machine that matches your production systems.
- Learn about Vagrant's general use, and the concepts behind the tool
- Get a practical, project-oriented approach that takes you from basic to advanced Vagrant use in a simple LAMP web application example
- Explore case studies from various organizations that use Vagrant
- Learn about common errors and get troubleshooting tips
About the Author
Mitchell Hashimoto is an operations engineer and prolific open source contributor. Mitchell created Vagrant, a tool for creating and distributing virtualized development environments. Vagrant is used by companies such as Mozilla, RackSpace, and Nokia, and many more. Mitchell currently works full time as an operations engineer for Kiip, a mobile rewards network. Mitchell also enjoys speaking at conferences about open source, DevOps, and Vagrant, and has spoken at Velocity Conf, FOSDEM, RubyConf, and more.
Table of Contents
Foreword; Preface; Conventions Used in This Book; Using Code Examples; Safari® Books Online; How to Contact Us; Acknowledgements; Chapter 1: An Introduction to Vagrant; 1.1 Why Vagrant?; 1.2 The Tao of Vagrant; 1.3 Alternatives to Vagrant; 1.4 Setting Up Vagrant; 1.5 Using Vagrant Without VirtualBox; 1.6 Help!; Chapter 2: Your First Vagrant Machine; 2.1 Up and Running; 2.2 The Vagrantfile; 2.3 Boxes; 2.4 Up; 2.5 Working with the Vagrant Machine; 2.6 What's Next?; Chapter 3: Provisioning Your Vagrant VM; 3.1 Why Automated Provisioning?; 3.2 Supported Provisioners; 3.3 Manually Setting Up Apache; 3.4 Automated Provisioner Basics; 3.5 Multiple Provisioners; 3.6 "No Provision" Mode; 3.7 In-Depth Provisioner Usage; 3.8 What's Next?; Chapter 4: Networking in Vagrant; 4.1 Forwarded Ports; 4.2 Host-Only Networking; 4.3 Bridged Networking; 4.4 Composing Networking Options; 4.5 NAT Requirement As the First Network Interface; 4.6 What's Next?; Chapter 5: Modeling Multimachine Clusters; 5.1 Running Multiple Virtual Machines; 5.2 Controlling Multiple Machines; 5.3 Communication Between Machines; 5.4 Real Example: MySQL; 5.5 What's Next?; Chapter 6: Boxes; 6.1 Why Boxes?; 6.2 Box Format; 6.3 Basic Box Management with Vagrant; 6.4 Creating New Boxes from an Existing Environment; 6.5 Creating New Boxes from Scratch; 6.6 What's Next?; Chapter 7: Extending Vagrant with Plug-Ins; 7.1 Extensible Features; 7.2 Managing Vagrant Plug-Ins; 7.3 Plug-In Development Basics; 7.4 A Basic Plug-In Development Environment; 7.5 Developing a Custom Command; 7.6 Adding New Configuration Options; 7.7 Adding a Custom Provisioner; 7.8 Modifying Existing Vagrant Behavior; 7.9 Other Plug-In Components; 7.10 Packaging the Plug-In; Vagrant Environmental Variables; VAGRANT_CWD; VAGRANT_HOME; VAGRANT_LOG; VAGRANT_NO_PLUGINS; VAGRANT_VAGRANTFILE; Vagrant Configuration Reference; Troubleshooting and Debugging; IRC; Mailing List/Google Group; Professional Support; Index; Colophon;