Vagrant Setup Issues

34 views
Skip to first unread message

Alan Nguyen

unread,
Jun 22, 2017, 4:18:21 PM6/22/17
to Vagrant
Hello everyone,

I am new to this Vagrant setup and I have tried to setup the Vagrant environment all day and all night yesterday (really felt like pulling out some of my hair ^-^) but to no success.  It just seems so confusing and all the videos and instructions online don't seem detailed enough to have helped.  Can someone please help me with the Vagrant environment setup?  I need it to complete a MongoDB online course I'm currently taking and I can't do anything without having the environment setup.  I would really appreciate any help. I have a Windows 10 computer and so far I have downloaded Oracle Virtual Machine, Ubuntu, and Git.  Please help, thanks.

Alan

Alvaro Miranda Aguilera

unread,
Jun 23, 2017, 3:31:43 AM6/23/17
to vagra...@googlegroups.com
Hello.

Vagrant does several small things, that when you mix them you can create something bigger.

Basic concepts.

Taking a template, create a VM.
Can run scripts, set hostname, add network configuration.

All this, need to be seen as "vagrant will automate what you want to do", but there is a requirement that you need to know what you vagrant to run when provisioning a VM.

Say you want to create an ubuntu box.

mkdir xenial
cd xenial
vagrant init -m ubuntu/xenial64
vagrant up


That will create a VM based on xenial box from canonical/ubuntu.

From there, you can ssh into the vm like:
vagrant ssh

From there, whatever commands you need to type to get mongodb installed up and running, can be scripted, and then (last step) vagrant can run the script at creating the VM, so you will end with a new VM with mongodb installed.

If you got Vagrant questions, please share.

If you got general linux question, also welcome.

Thanks
Alvaro

Alan Nguyen

unread,
Jun 23, 2017, 2:26:16 PM6/23/17
to Vagrant
Thank you very much Alvaro.  I still can't get the vagrant environment going.  I got a little further this time and was able to run vagrant up, but then when I type vagrant ssh in Git, it keeps telling me to run vagrant up when I already did.  So I can't ssh into it now.  huuuh so frustrating.  Thanks.

Alan Nguyen

unread,
Jun 23, 2017, 3:18:41 PM6/23/17
to Vagrant
Update:  I got the vagrant environment going now after many, many attempts.  I just need to figure out how to start up the environment and connect it to the MongoDB.  Looks like I'll be having more fun trying to figure it all out again :)  
Reply all
Reply to author
Forward
0 new messages