Vagrant Virtual Development Environment Cookbook

Book description

Over 35 hands-on recipes to help you master Vagrant, and create and manage virtual computational environments

  • Configure and deploy software to Vagrant machines with scripts and configuration management tools

  • Manage and share Vagrant development environments with cloud

  • Packed with practical real-life examples to improve existing working systems

  • In Detail

    Vagrant allows you to use virtualization and cloud technologies to power faster, efficient, and sharable development environments. It duplicates the development environment to allow users to easily share and combine data on different machines and also takes care of security concerns.

    Each recipe of Vagrant Virtual Development Environment Cookbook provides practical information on using Vagrant to solve specific problems and additional resources to help you learn more about the techniques demonstrated.

    With recipes ranging from getting new users acquainted with Vagrant, to setting up multimachine environments, you will be able to develop common project types and solutions with the help of this practical guide.

    Table of contents

    1. Vagrant Virtual Development Environment Cookbook
      1. Table of Contents
      2. Vagrant Virtual Development Environment Cookbook
      3. Credits
      4. About the Author
      5. About the Reviewers
      6. www.PacktPub.com
        1. Support files, eBooks, discount offers, and more
          1. Why Subscribe?
          2. Free Access for Packt account holders
      7. Preface
        1. What this book covers
        2. What you need for this book
        3. Who this book is for
        4. Sections
          1. Getting ready
          2. How to do it…
          3. How it works…
          4. There's more…
          5. See also
        5. Conventions
        6. Reader feedback
        7. Customer support
          1. Downloading the example code
          2. Errata
          3. Piracy
          4. Questions
      8. 1. Setting Up Your Environment
        1. Introduction
        2. Installing Vagrant and VirtualBox
          1. Getting ready
          2. How to do it...
            1. Installing VirtualBox
            2. Installing Vagrant
          3. How it works...
          4. See also
        3. Initializing your first environment
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Installing Vagrant providers
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Finding additional Vagrant boxes
          1. Getting ready
          2. How to do it...
            1. Finding boxes
              1. Initializing an environment with a new box:
              2. Adding a new box without initializing an environment:
          3. There's more...
        6. Using existing virtual machines with Vagrant
          1. Getting ready
          2. How to do it...
            1. Packaging the VirtualBox machine
            2. Configuring a Vagrant environment
          3. How it works...
      9. 2. Single Machine Environments
        1. Introduction
        2. Defining a single machine Vagrant environment
          1. How to do it...
            1. Simple Vagrant environment
            2. A defined single machine environment
          2. How it works...
        3. Forwarding ports from a Vagrant machine
          1. How to do it...
          2. How it works...
        4. Starting a GUI with Vagrant
          1. Getting ready
            1. Introducing Atlas
          2. How to do it...
          3. How it works...
          4. There's more...
        5. Sharing Vagrant guest folders with the host
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        6. Sharing folders using Network File Systems
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
        7. Sharing folders with rsync
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        8. Customizing virtual machine settings (VirtualBox)
          1. Getting ready
          2. How to do it...
          3. How it works...
        9. Customizing virtual machine settings (VMware Desktop)
          1. Getting ready
          2. How to do it...
          3. How it works...
        10. Sharing environments with source control
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      10. 3. Provisioning a Vagrant Environment
        1. Introduction
        2. Running basic shell commands
          1. How to do it...
          2. How it works...
        3. Executing shell scripts in a Vagrantfile
          1. Getting ready
          2. How to do it...
          3. How it works...
            1. Shell scripting in vagrant machines
            2. Script idempotency
          4. See also
        4. Provisioning with external shell scripts
          1. Getting ready
          2. How to do it...
          3. How it works...
            1. Shell provisioning
            2. Provisioning with different shell languages
          4. See also
      11. 4. Provisioning with Configuration Management Tools
        1. Introduction
          1. Configuration management and Vagrant boxes
        2. Configuring Vagrant environments with Puppet
          1. Getting ready
          2. How to do it...
            1. Setting up the Vagrant environment
            2. Configuring Puppet
          3. How it works...
          4. There's more...
          5. See also
        3. Configuring Vagrant environments with Chef
          1. Getting ready
          2. How to do it...
            1. Setting up the Vagrant environment
            2. Setting up Chef provisioning
          3. How it works...
          4. There's more...
            1. Managing environments with Berkshelf
            2. Provisioning with Chef Server
          5. See also
        4. Provisioning Vagrant environments with Salt
          1. Getting ready
          2. How to do it…
            1. Configuring the Vagrant environment
            2. Configuring Salt provisioning
          3. How it works...
          4. See also
        5. Provisioning Vagrant environments with Ansible
          1. Getting ready
          2. How to do it...
            1. Setting up the Vagrant environment
            2. Setting up Ansible playbooks
          3. How it works...
          4. See also
      12. 5. Networked Vagrant Environments
        1. Introduction
        2. Creating a local network
          1. Getting ready
          2. How to do it...
            1. Using a static IP address with a hosts file
          3. How it works...
          4. There's more...
          5. See also
        3. Defining a multimachine environment
          1. Getting ready
          2. How to do it...
          3. How it works...
        4. Specifying the order of machine provisioners
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Creating clusters of Vagrant machines
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. There's more...
            1. Configuring DNS with plugins
            2. Configuring a cluster with etcd
            3. Clustering with Apache Mesos
          5. See also
      13. 6. Vagrant in the Cloud
        1. Introduction
        2. Using Vagrant with Amazon Web Services
          1. Getting ready
          2. How to do it...
            1. Creating a Vagrant IAM account
            2. Setting up a VPC
            3. Creating a security key for Vagrant instances
            4. Installing the Vagrant-AWS plugin
            5. Gathering required information for the provider
            6. Setting up the Vagrant AWS environment
          3. How it works…
            1. Saving configuration data outside the Vagrantfile
            2. Overriding Vagrantfile defaults
            3. Specifying AWS details
          4. There's more...
          5. See also
        3. Using Vagrant with DigitalOcean
          1. Getting ready
            1. Creating a DigitalOcean API token
            2. Creating a new SSH key pair
          2. How to do it...
          3. How it works...
          4. See also
        4. Sharing local machines with HashiCorp Atlas
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
        5. Sharing web applications with HashiCorp Atlas
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      14. 7. Packaging Vagrant Boxes
        1. Introduction
        2. Packaging Vagrant boxes from ISO files
          1. Getting ready
          2. How to do it...
            1. Preparing a virtual machine
            2. Packaging the virtual machine as a Vagrant box
            3. Installing the new Vagrant box
          3. How it works...
          4. There's more...
          5. See also
        3. Building Vagrant boxes with Packer
          1. Getting ready
          2. How to do it...
          3. How it works...
            1. The building blocks of Packer templates
            2. Building Vagrant boxes with VeeWee
          4. See also
        4. Sharing Vagrant boxes
          1. Getting ready
          2. How to do it...
          3. How it works...
        5. Sharing Vagrant boxes with Atlas
          1. Getting ready
          2. How to do it...
          3. There's more...
          4. See also
      15. A. Vagrant Plugins
        1. Setting up a Ruby runtime environment
          1. Getting ready
          2. How to do it...
          3. How it works...
          4. See also
      16. B. A Puppet Development Environment
        1. Setting up a Puppetmaster with the puppet apply provisioner
          1. How to do it...
            1. Setting up a source controlled Puppetmaster
            2. Bootstrapping a Puppetmaster
        2. Provisioning nodes with a Puppetmaster
          1. There's more...
          2. See also
      17. C. Using Docker with Vagrant
        1. Introduction
        2. Running Docker containers with Vagrant
          1. How to do it...
            1. Installing a Docker image from a repository
            2. Building a Docker image with Vagrant
          2. See also
        3. Mixed environments – the Docker provisioner
          1. How to do it...
          2. See also
      18. Index

    Product information

    • Title: Vagrant Virtual Development Environment Cookbook
    • Author(s): Chad Thompson
    • Release date: February 2015
    • Publisher(s): Packt Publishing
    • ISBN: 9781784393748