How To Set Up Vagrant and VirtualBox for MongoDB Security in Window?

Connect with

Vagrant and Virtualbox on Windows for MongoDB securityHow To configure Vagrant and VirtualBox on windows for MongoDB Security example. This is very simple by follow few step and you are done with set up.

1. Pre-Requisite for MongoDB Exercise on Vagrant and VirtualBox

for Vagrant virtualbox MongoDB exercise, Download m310-vagrant-env.zip or you can download same file from our network m310-vagrant-env-04dce7bfaaf1

2. Step #1. Install VirtualBox

I have installed the binary from VirtualBox and Vagrant

https://www.virtualbox.org/wiki/Downloads

3. Step #2. Install Vagragnt

http://www.vagrantup.com/downloads.html

4. Step #3. Create a new Directory

Go to your prefered directory and create a new directory say “myVagrantTest” in my case it’s “e://noSQL/myVagrantTest”

C:\Users\ranjeet>e:

E:\>cd noSQL
E:\noSQL>mkdir myVagrantTest
E:\noSQL>cd myVagrantTest

5. Initialize VirtualBox by Command

from the command line run the following command:

  • $ vagrant init precise32 http://files.vagrantup.com/precise32.box
  • $ vagrant up
  • $ vagrant ssh
E:\noSQL/myVagrantTest> 
E:\noSQL/myVagrantTest> vagrant init precise32 http://files.vagrantup.com/precise32.box
E:\noSQL/myVagrantTest> vagrant up
E:\noSQL/myVagrantTest> vagrant ssh 

Note: From window system vagrant ssh will not work, so install putty or tabbed putty i.e. mRemoteNG and loggin

serverIP: 102.0.0.0
userName: vagrant
password: vagrant

6. To return to your host machine

To return to your host machine, run the command:

$ exit

7.To Destroy the VM

To destroy the VM and remove the binary disk image:

$ vagrant destroy 

This command must be run from the directory which contains the Vagrantfile for the box you wish to destroy. It will not remove any of your configuration files. To recreate the machine, use the commands in step 4.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\ranjeet>e:

E:\>cd noSQL\mongoDB-security\m310-vagrant-env

E:\noSQL\mongoDB-security\m310-vagrant-env>dir
 Volume in drive E is New Volume
 Volume Serial Number is 50F7-0BAD

 Directory of E:\noSQL\mongoDB-security\m310-vagrant-env

11/13/2016  01:53 PM              .
11/13/2016  01:53 PM              ..
11/07/2016  11:13 PM             1,515 provision-database
11/07/2016  11:13 PM             1,707 provision-infrastructure
11/07/2016  11:13 PM             1,067 Vagrantfile
               3 File(s)          4,289 bytes
               2 Dir(s)  199,087,276,032 bytes free

E:\noSQL\mongoDB-security\m310-vagrant-env>vagrant up
Bringing machine 'database' up with 'virtualbox' provider...
Bringing machine 'infrastructure' up with 'virtualbox' provider...
==> database: Box 'ubuntu/trusty64' could not be found. Attempting to find and install...
    database: Box Provider: virtualbox
    database: Box Version: >= 0
==> database: Loading metadata for box 'ubuntu/trusty64'
    database: URL: https://atlas.hashicorp.com/ubuntu/trusty64
==> database: Adding box 'ubuntu/trusty64' (v20161109.0.0) for provider: virtualbox
    database: Downloading: https://atlas.hashicorp.com/ubuntu/boxes/trusty64/versions/20161109.0.0/providers/virtualbox.b
ox
    database: Progress: 14% (Rate: 829k/s, Estimated time remaining: 0:05:42))

You reached this point it means you like vagrant and Virtualbox on Windows for MongoDB security., so please share and comment on this article to improve.
Happy Learning 🙂

Reference

You can visit docs.mongodb.com for more details.

Thanks for visiting this post for MongoDB config replica set. You can also visit MongoDB Tutorial Listing page for more articles on MongoDB document-oriented database.
Happy Learning 🙂 for MongoDB replica set config.


Connect with

5 thoughts on “How To Set Up Vagrant and VirtualBox for MongoDB Security in Window?”

  1. Hi there, just became alert to your blog through
    Google, and found that it is really informative.
    I’m gonna watch out for brussels. I’ll appreciate if you continue this in future.
    Many people will be benefited from your writing.
    Cheers!

  2. Irwin Morinville

    If you like reading a blog, what kind of interesting things that make you like that blog? Give me your favorite blog links too..

Leave a Comment

Your email address will not be published. Required fields are marked *