Vagrant tutorial and commands


Read more about Vagrant click me

Let's discussed more details of vagrant commands:

Install the Vagrant from https://hashicorp.com/ or other vendors.

Installation details: Click me

Open the any cmd windows for performing the Vagrant command, I'm using Git Base.

After installation, just type the
$ vagrant --version
Vagrant 1.3.5

Great, now we have Vagrant 1.3.5 version installed it. you can installed as per your requirement.




$ vagrant --help
Usage: vagrant [-v] [-h] command [<args>]

    -v, --version                    Print the version and exit.
    -h, --help                       Print this help.

Available subcommands:
     box
     destroy
     halt
     help
     init
     package
     plugin
     provision
     reload
     resume
     ssh
     ssh-config
     status
     suspend
     up

For help on any individual command run `vagrant COMMAND -h`

$ vagrant box --help
Usage: vagrant box <command> [<args>]

Available subcommands:
     add
     list
     remove
     repackage

$ vagrant destroy --help
Usage: vagrant destroy [vm-name]
    -f, --force                      Destroy without confirmation.
    -h, --help                       Print this help

$ vagrant init --help
Usage: vagrant init [box-name] [box-url]
    -h, --help                       Print this help

$ vagrant package --help
Usage: vagrant package [vm-name] [--base name] [--output name.box]
                       [--include one,two,three] [--vagrantfile file]

        --base NAME                  Name of a VM in virtualbox to package as a base box
        --output NAME                Name of the file to output
        --include x,y,z              Additional files to package with the box.
        --vagrantfile file           Vagrantfile to package with the box.
    -h, --help                       Print this help

$ vagrant plugin --help
Usage: vagrant plugin <command> [<args>]
Available subcommands:
     install
     license
     list
     uninstall
     update

$ vagrant provision --help
Usage: vagrant provision [vm-name] [--provision-with x,y,z]
        --provision-with x,y,z       Enable only certain provisioners, by type.
    -h, --help                       Print this help

$ vagrant reload --help
Usage: vagrant reload [vm-name]

        --[no-]provision             Enable or disable provisioning
        --provision-with x,y,z       Enable only certain provisioners, by type.
    -h, --help                       Print this help

$ vagrant resume --help
Usage: vagrant resume [vm-name]
    -h, --help                       Print this help

$ vagrant ssh --help
Usage: vagrant ssh [vm-name] [-c command] [-- extra ssh args]

    -c, --command COMMAND            Execute an SSH command directly.
    -p, --plain                      Plain mode, leaves authentication up to user.
    -h, --help                       Print this help

$ vagrant ssh-config --help
Usage: vagrant ssh-config [vm-name] [--host name]

        --host COMMAND               Name the host for the config..
    -h, --help                       Print this help

$ vagrant status --help
Usage: vagrant status [machine-name]
    -h, --help                       Print this help

$ vagrant suspend --help
Usage: vagrant suspend [vm-name]
    -h, --help                       Print this help

$ vagrant up --help
Usage: vagrant up [vm-name] [options] [-h]

        --[no-]provision             Enable or disable provisioning
        --provision-with x,y,z       Enable only certain provisioners, by type.
        --[no-]destroy-on-error      Destroy machine if any fatal error happens (default to true).
        --[no-]parallel              Enable or disable parallelism if provider supports it.
        --provider provider          Back the machine with a specific provider.
    -h, --help                       Print this help

While doing the vagrant, most of time I utilized it, vagrant init, vagrant up and vagrant ssh.

Reference: 
https://hashicorp.com/
https://en.wikipedia.org/wiki/Vagrant_(software)

No comments:

Post a Comment

Please provide your input, it will honer for me...