Skip to content

Steps on how to setup Vagrant and create project with Scotch Box.

Notifications You must be signed in to change notification settings

mddujali/getting-started-vagrant-scotchbox

Repository files navigation

Getting Started with Vagrant

Virtualization refers to the act of creating a virtual (rather than actual) version of something, including virtual computer hardware platforms, storage devices, and computer network resources.

What is Vagrant?

Vagrant provides the same, easy workflow regardless of your role as a developer, operator, or designer. It leverages a declarative configuration file which describes all your software requirements, packages, operating system configuration, users, and more.

Why use Vagrant?

Vagrant will isolate dependencies and their configuration within a single disposable, consistent environment, without sacrificing any of the tools you are used to working with (editors, browsers, debuggers, etc.). Once you or someone else creates a single Vagrantfile, you just need to vagrant up and everything is installed and configured for you to work. Other members of your team create their development environments from the same configuration, so whether you are working on Linux, Mac OS X, or Windows, all your team members are running code in the same environment, against the same dependencies, all configured the same way. Say goodbye to "works on my machine" bugs.


Requirements

For Linux/Mac

For Windows:


Installation

Note: Use Git Bash for Windows users

Setup SSH Key

$ ssh-keygen -t rsa -C "[email protected]"

You can replace "[email protected]" to any string value but it's recommended to use your email address

Virtualbox

Vagrant

To check version:

$ vagrant -v

Git Bash for Windows

Scotch Box

Scotch Box is a pre-configured Vagrant Box with a full array of features to get you up and running with Vagrant in no time.

Add Scotch Box

$ vagrant box add scotch/box

Clone Scotch Box

$ git clone https://github.com/scotch-io/scotch-box my-project
$ cd my-project

Setup Hostname

  • Open Vagrantfile to any text editor
...
config.vm.hostname = "scotchbox" // By default
...

Change it to whatever you want

...
config.vm.hostname = "my-project"
...

Usage

Start Environment

$ vagrant up

Stop Environment

$ vagrant halt

Enter Inside The Vagrant Box

$ vagrant ssh

For more Commands (CLI)

Note: You can check command by entering vagrant --help

Setup Local DNS

For Linux/Mac

$ sudo nano /etc/hosts

For Windows

  • Run Notepad as Administrator
  • Go to C:\Windows\System32\drivers\etc
  • Open hosts

Enter IP Address and Domain name

192.168.33.10   my-project.local

Note: By default .local is the extension when using Scotch Box.

Extra

How To Access The Database?

Install GUI Tool


Access Database

alt text


From A Desktop Client

alt text


Important Parameters

alt text

About

Steps on how to setup Vagrant and create project with Scotch Box.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published