I am new in Vagrant and in Apache Storm.
I am following an online course where show the following situation.
There is an Ubuntu virtual machine installed on Virtual Box
On the host machine (the same where is installed Virtual Box and that run the guest Ubuntu VM) it is installed Vagrant.
In the tutorial first download from GitHub a directory that contains some project by this command:
git clone https://github.com/Udacity/ud381
that create this directory on my host Windows machine:
C:\Users\Andrea\Documents\workspaces\Real-Time\ud381
As you can see entering in the previous github repository this directory contain a Vagrantfile that contain:
# -*- mode: ruby -*-
# vi: set ft=ruby :
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing!
VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "udacity/ud381"
config.vm.network :forwarded_port, guest: 5000, host: 5000
end
From what I have understand the Vagrantfile represent the Vagrant configuration and I think that it represent the link with the Ubuntu guest VM that I have previously installed on VirtualBox (I have installed it by myself but I don't know if it is correct).
What exactly represent the previous configurations into my Vagrantfile?
I think that udacity/ud381 is the VM name on VirtualBox but I am not sure about it.
Then in the tutorial show that, using the shell, I have to enter into the directory that contain the Vagrantfile (this: C:\Users\Andrea\Documents\workspaces\Real-Time\ud381) and perform this statement:
vagrant up
it seems that begin to download something (it is very slow). What is it doing? What is it downloading?
udacity/ud381 is a reference to a vagrant box located on atlas.hashicorp : https://atlas.hashicorp.com/udacity/boxes/ud381
when you do vagrant up
with this Vagrantfile it does create a new VM using the box you specified, if the box is not already in your system, it will try to download, hence it appears to be slow. Further vagrant up
with this same box will be much faster as it will create the VM from a local box.
If you plan to use vagrant, you should let it manage the VM and do not create the VM in VirtualBox yourself (there are some ways to make this link but thats not trivial and not sure if its supported). Ideally try not to start VirtualBox once when you do a full cycle with vagrant (init, up, ssh ...) and you will see how smooth it is