Difference between revisions of "Vagrant"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
Tags: Mobile web edit, Mobile edit
Line 29: Line 29:
  
 
== Help ==
 
== Help ==
<pre>
+
* [[vagrant --help]]
vagrant
 
Usage: vagrant [options] <command> [<args>]
 
 
 
    -h, --help                      Print this help.
 
 
 
Common commands:
 
    box            manages boxes: installation, removal, etc.
 
    cloud          manages everything related to Vagrant Cloud
 
    destroy        stops and deletes all traces of the vagrant machine
 
    global-status  outputs status Vagrant environments for this user
 
    halt            stops the vagrant machine
 
    help            shows the help for a subcommand
 
    init            initializes a new Vagrant environment by creating a Vagrantfile
 
    login
 
    package        packages a running vagrant environment into a box
 
    plugin          manages plugins: install, uninstall, update, etc.
 
    port            displays information about guest port mappings
 
    powershell      connects to machine via powershell remoting
 
    provision      provisions the vagrant machine
 
    push            deploys code in this environment to a configured destination
 
    rdp            connects to machine via RDP
 
    reload          restarts vagrant machine, loads new Vagrantfile configuration
 
    resume          resume a suspended vagrant machine
 
    snapshot        manages snapshots: saving, restoring, etc.
 
    ssh            connects to machine via SSH
 
    ssh-config      outputs OpenSSH valid configuration to connect to the machine
 
    status          outputs status of the vagrant machine
 
    suspend        suspends the machine
 
    up              starts and provisions the vagrant environment
 
    upload          upload to machine via communicator
 
    validate        validates the Vagrantfile
 
    version        prints current and latest Vagrant version
 
    winrm          executes commands on a machine via WinRM
 
    winrm-config    outputs WinRM configuration to connect to the machine
 
 
 
For help on any individual command run `vagrant COMMAND -h`
 
 
 
Additional subcommands are available, but are either more advanced
 
or not commonly used. To see all subcommands, run the command
 
`vagrant list-commands`.
 
        --[no-]color                Enable or disable color output
 
        --machine-readable          Enable machine readable output
 
    -v, --version                    Display Vagrant version
 
        --debug                      Enable debug output
 
        --timestamp                  Enable timestamps on log output
 
        --debug-timestamp            Enable debug output with timestamps
 
        --no-tty                    Enable non-interactive output
 
</pre>
 
  
 
== Related terms ==
 
== Related terms ==

Revision as of 06:26, 11 April 2021

Vagrant (2010) is an open-source software product for building and maintaining portable virtual development environments. The core idea behind its creation lies in the fact that the environment maintenance becomes increasingly difficult in a large project with multiple technical stacks.

Vagrant manages all the necessary configurations for the developers in order to avoid the unnecessary maintenance and setup time, and increases development productivity. Vagrant is written in the Ruby language, but its ecosystem supports development in almost all major languages.

Vagrant uses "Provisioners" and "Providers" as building blocks to manage the development environments. Provisioners are tools that allow users to customize the configuration of virtual environments. Puppet and Chef are the two most widely used provisioners in the Vagrant ecosystem. Providers are the services that Vagrant uses to set up and create virtual environments. Support for VirtualBox, Hyper-V, and Docker virtualization ships with Vagrant, while VMWare and AWS are supported via plugins.

Vagrant sits on top of virtualization software as a wrapper and helps the developer interact easily with the providers. It automates the configuration of virtual environments using Chef or Puppet, and the user does not have to directly use any other virtualization software.

Machine and software requirements are written in a file called Vagrantfile[1] to execute necessary steps in order to create a development-ready box. Box is a format and an extension ( .box) for Vagrant environments that is copied to another machine in order to replicate the same environment.

Installation

Vagrant Basic commands

  • vagrant up[2]
    • vagrant up --debug or VAGRANT_LOG=loud vagrant up for debugging

purposes[3]


Help

Related terms

See also

  • https://www.vagrantup.com/docs/vagrantfile/
  • https://www.vagrantup.com/docs/cli/up.html
  • https://www.vagrantup.com/docs/other/debugging.html
  • Advertising: