Obviously Awesome

Vagrant Tutorial

Getting started
  • Install
  • vagrant auto-added to your system path
  • verify by trying the CLI: $vagrant
  • *beware of system package managers* - often missing dependencies
  • Project setup

  • $mkdir vagrant_getting_started && cd $_
  • $vagrant init hashicorp/bionic64
  • $vagrant box add hashicorp/bionic64
      VagrantFile options:
      config.vm.box = "hashicorp/bionic64"
      config.vm.box_version = 1.1.0"
      config.vm.box_url = "https://vagrantcloud.com/hashicorp/bionic64"
    $vagrant up
    $vagrant ssh
    $vagrant destroy
    $vagrant box remove
  • Synced folders

  • default: Vagrant shares project directory with /vagrant on your guest machine.
  • Provisioning

    Networking

  • *port forwarding*: allows you to pick a guest machine's port for sharing.
  • Share
  • Teardown
  • Rebuild
  • Providers
  • Installation

  • Backwards compatibility
  • Upgrading
  • Upgrading from 1.0.x
  • From source
  • Uninstall
  • CLI

    $vagrant [cmnd[opts]]
    box cloud connect destroy global-status halt init login package plugin port powershell provision rdp reload resume share snapshot ssh ssh-config status suspend up upload validate version (more)

    Vagrant Share

  • over HTTP
  • over SSH
  • Connect
  • Security
  • Custom Providers
  • VagrantFiles

  • Configuration
  • Minimum Vagrant Version
  • Tips & Tricks
  • config.vm config.ssh config.wimrm config.winssh config.vagrant

    Boxes

  • Versioning
  • Creating
  • Box File Format
  • Box Info Format
  • Provisioning

      Basics
        config.vm.provision "shell" [options]
        Running Provisioners
      • vagrant up, vagrant provision, vagrant reload --provision
        Once (default)|Always|Never
    • Multiple Provisioners
    • Overriding Settings
    • Dependency Provisioners
      file
    • Options
    • Caveats
      shell
    • Options
    • Inline Scripts
    • External Scripts
    • Script Arguments
  • CFEngine
  • Chef (Common Config)
  • Chef Solo
  • Chef Zero
  • Chef Client
  • Clef Apply
  • Docker
  • Puppet Apply
  • Puppet Agent
  • Salt
  • Networking

  • Basics
  • Forwarded Ports
  • Private Networks
  • Public Networks
  • Synced Folders

  • Basics
  • Options
  • Enabling, Disabling
  • Owners & Groups
  • Symbolic Links
  • NFS (handles performance penalties) + Prerequisites + Enabling + Folder Options + Global Options + NFS Arguments + Root Privileges + Other Notes
  • RSync + Prerequisites + Options + Example + Restricted Folders
  • SMB (Server Message Block) + Prerequisites + Options + Example + Preventing Idle Disconnects (Windows) + Common Problems
  • VirtualBox + Options + Caveats
  • Disks (experimental)

  • Configuration
  • Usage
  • Multiple Machines

  • Defining
  • Controls
  • Machine Communications
  • Primary Machines
  • Autostarting
  • Providers

  • Install
  • Usage
  • Configuration
  • Default
  • VirtualBox
  • VMware
  • Docker
  • Hyper-V
  • Custom
  • Plugins

  • Usage
  • Basics
  • Action Hooks
  • Commands
  • Configuration
  • Guests
  • Guest Capabilities
  • Hosts
  • Host Capabilities
  • Providers
  • Provisioners
  • Packaging & Distribution
  • Push

  • FTP, SFTP
  • Heroku
  • Local execution
  • Triggers

  • Configuration
  • Usage
  • Experimental Features

  • typed_triggers
  • dependency_provisioners
  • Debug

    Environment Variables

    Vagrant Cloud