Giter Site home page Giter Site logo

vagrant's Introduction

Vagrant

Config

config.vm.box - Operating System
config.vm.provider - virtualbox (default)
config.vm.network - How your host sees your box (configure ip-address, port)
config.vm.synced_folder - How you access files from your computer
config.vm.provision - What we want to pre-setup like lamp, apache

Synced Folder

For Directory and File

config.vm.synced_folder ".", "/var/www/html", :mount_options => ["dmode=777", "fmode=666"]

Network File System

config.vm.synced_folder ".", "/var/www/html", :nfs => { :mount_options => ["dmode=777", "fmode=666"] }

dmode - directory mode fmode - file mode

Network Config

config.vm.network "private_network", ip:"192.168.33.10"

Update Hosts

code /etc/hosts 192.168.33.10 ajk.localhost.io

Provision

  • Inline Bash Shell Command
config.vm.provision "shell", inline: <<-SHELL
  apt-get update
  apt-get install -y apache2
SHELL
  • Bash Shell File
config.vm.provision "shell", path: "./bootstrap.sh"

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

vagrant's People

Contributors

ashimjk avatar

Stargazers

Romil Badhe avatar  avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.