Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Vagrant Virtual Development Environment Cookbook
  • Table Of Contents Toc
Vagrant Virtual Development Environment Cookbook

Vagrant Virtual Development Environment Cookbook

By : Chad O Thompson
close
close
Vagrant Virtual Development Environment Cookbook

Vagrant Virtual Development Environment Cookbook

By: Chad O Thompson

Overview of this book

If you are a software developer or administrator who wishes to create simple, reusable environments using Vagrant, this book is the perfect choice for you. Whether you are a system administrator with extensive experience in virtualization or a developer wishing to create development scripts for cloud deployment, you will find easy-to-follow recipes and techniques in this book that will allow you to create robust and reproducible virtual environments.
Table of Contents (12 chapters)
close
close
11
Index

Running basic shell commands

The most basic method of provisioning is to run simple shell commands in the Vagrant machine. For Linux environments, this typically means executing basic shell commands with shells that are typically bundled with distributions (sh, bash, zsh, and so on). The provisioning process can also execute other command-line applications if runtime environments are installed (such as system provisioning with Ruby or Perl).

In this example, we'll use a shell command to install a basic Message of The Day command to output a greeting on login using the vagrant ssh command.

How to do it...

  1. We'll start this example with a simple Vagrantfile that boots a basic Ubuntu environment. Here is the complete Vagrantfile:
    # -*- mode: ruby -*-
    # vi: set ft=ruby :
    
    VAGRANTFILE_API_VERSION = "2"
    
    Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
      config.vm.box = "puppetlabs/ubuntu-14.04-32-nocm"
    end

    Booting this environment with vagrant up will start a basic...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Vagrant Virtual Development Environment Cookbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon